Skip to content

Commit 981987c

Browse files
author
Iulian
committed
Update mean-pT profiles for angular correlation regions in delta phi
1 parent 8df01f1 commit 981987c

1 file changed

Lines changed: 55 additions & 24 deletions

File tree

‎PWGCF/TwoParticleCorrelations/Tasks/FoxWolframCorrelation.cxx‎

Lines changed: 55 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,9 @@ struct FoxWolframCorrelation {
190190
Configurable<int> topologyMode{"topologyMode", kTriEvSetNom,
191191
"SelOpt: 0 AllEv, 1 TriNom, 2 IsoNom, 3 TriSet1p, 4 TriSet2p, 5 TriSet3p, 6 TriSet1m, 7 TriSet2m, 8 TriSet3m"};
192192

193+
//// Minimum associated pT included in mean-pT profiles ////
194+
Configurable<double> meanPtMin{"meanPtMin", 0.5, "Associated pT threshold for mean-pT profiles (GeV/c)"};
195+
193196
// Choose the pair selection for same-event correlations.
194197
Configurable<int> leadAssocMode{"leadAssocMode", 2, "0: ALL i-j pairs (pT<3); 1: pTLead in (2,3) & pTAssoc < 2; 2: pTAssoc < pTLead"};
195198

@@ -254,6 +257,15 @@ struct FoxWolframCorrelation {
254257
"awayPtD0_", "awayPtD1_", "awayPtD2_",
255258
"awayPtD3_", "awayPtD4_", "awayPtD5_"};
256259

260+
//// Profile names match the folded LR declarations ////
261+
static constexpr std::array<std::string_view, 6> nearMeanNames = {
262+
"nearPtDMean0_", "nearPtDMean1_", "nearPtDMean2_",
263+
"nearPtDMean3_", "nearPtDMean4_", "nearPtDMean5_"};
264+
265+
static constexpr std::array<std::string_view, 6> awayMeanNames = {
266+
"awayPtDMean0_", "awayPtDMean1_", "awayPtDMean2_",
267+
"awayPtDMean3_", "awayPtDMean4_", "awayPtDMean5_"};
268+
257269
static constexpr std::array<std::string_view, 3> allLRNames = {
258270
"allLRNear", "allLRValley", "allLRAway"};
259271

@@ -417,10 +429,14 @@ struct FoxWolframCorrelation {
417429
histos.add(fmt::format("Spectra/etaphiTriEv_BIN{}", i).c_str(), fmt::format("etaphiTriEv_BIN{}", i).c_str(), kTH2D, {axisPhi, axisEta});
418430
histos.add(fmt::format("Spectra/ptphiTriEv_BIN{}", i).c_str(), fmt::format("ptphiTriEv_BIN{}", i).c_str(), kTH2D, {axisPhi, axispT});
419431

420-
//// Six near spectra and six combined 120/240-degree spectra per multiplicity bin ////
421-
for (int angularBin = 0; angularBin < 6; ++angularBin) {
422-
foldedHistos.add(fmt::format("triEvFoldedLR/nearPtD{}_BIN{}", angularBin, i).c_str(), fmt::format("LR near: {}-{} deg from 0", 10 * angularBin, 10 * (angularBin + 1)).c_str(), kTH1D, {axispT});
423-
foldedHistos.add(fmt::format("triEvFoldedLR/awayPtD{}_BIN{}", angularBin, i).c_str(), fmt::format("LR away: {}-{} deg from 120 and 240", 10 * angularBin, 10 * (angularBin + 1)).c_str(), kTH1D, {axispT});
432+
//// Folded LR pT spectra and mean pT versus multiplicity ////
433+
for (int angBin = 0; angBin < 6; ++angBin) {
434+
435+
foldedHistos.add(fmt::format("triEvFoldedLR/nearPtD{}_BIN{}", angBin, i).c_str(), fmt::format("LR near: {}-{} deg from 0", 10 * angBin, 10 * (angBin + 1)).c_str(), kTH1D, {axispT});
436+
foldedHistos.add(fmt::format("triEvFoldedLR/nearPtDMean{}_BIN{}", angBin, i).c_str(), fmt::format("LR near: {}-{} deg from 0", 10 * angBin, 10 * (angBin + 1)).c_str(), kTProfile, {axisMultip});
437+
438+
foldedHistos.add(fmt::format("triEvFoldedLR/awayPtD{}_BIN{}", angBin, i).c_str(), fmt::format("LR away: {}-{} deg from 120 and 240", 10 * angBin, 10 * (angBin + 1)).c_str(), kTH1D, {axispT});
439+
foldedHistos.add(fmt::format("triEvFoldedLR/awayPtDMean{}_BIN{}", angBin, i).c_str(), fmt::format("LR away: {}-{} deg from 120 and 240", 10 * angBin, 10 * (angBin + 1)).c_str(), kTProfile, {axisMultip});
424440
}
425441

426442
//// ALL: pT spectra (TH1D) and mean associated pT versus multiplicity (TProfile) ////
@@ -479,7 +495,6 @@ struct FoxWolframCorrelation {
479495
if (doFWMCorrelations) {
480496

481497
for (size_t k = 0; k < fwmCorrelationNames.size(); ++k) {
482-
483498
const int first = fwmCorrelationFirst[k] + 1;
484499
const int second = fwmCorrelationSecond[k] + 1;
485500

@@ -658,22 +673,25 @@ struct FoxWolframCorrelation {
658673
//// Helper for one multiplicity bin (Idx is a template parameter, not a captured lambda variable) ////
659674
//// Avoids the GCC 14 ICE in tsubst_expr caused by nested generic static_for lambdas ////
660675
template <int Idx>
661-
void fillFoldedBin(double deltaPhi, double pt)
676+
void fillFoldedBin(int nTracks, double deltaPhi, double pt)
662677
{
663678
const double degToRad = constants::math::PI / 180.;
664679

665-
//// Adjacent windows include the lower edge and exclude the upper edge ////
680+
//// Six angular intervals with the existing strict boundary cuts ////
666681
static_for<0, 5>([&](auto j) {
667-
constexpr int angularBin = j.value;
668-
constexpr double lo = 10. * angularBin;
669-
constexpr double hi = 10. * (angularBin + 1);
682+
constexpr int angBin = j.value;
683+
constexpr double lo = 10. * angBin;
684+
constexpr double hi = 10. * (angBin + 1);
670685

671686
//// Combine the two sides of the near peak at zero ////
672687
const bool inNear = (deltaPhi > -hi * degToRad && deltaPhi < -lo * degToRad) || (deltaPhi > lo * degToRad && deltaPhi < hi * degToRad);
673688

674689
if (inNear) {
675-
foldedHistos.fill(HIST("triEvFoldedLR/") + HIST(nearNames[angularBin]) + HIST(binNames[Idx]), pt);
676-
}
690+
if (pt > meanPtMin.value) {
691+
foldedHistos.fill(HIST("triEvFoldedLR/") + HIST(nearNames[angBin]) + HIST(binNames[Idx]), pt);
692+
foldedHistos.fill(HIST("triEvFoldedLR/") + HIST(nearMeanNames[angBin]) + HIST(binNames[Idx]), nTracks, pt);
693+
} // for pt > meanPtMin
694+
} // PEAK 1
677695

678696
//// Combine both sides of 120 and 240 degrees ////
679697
//// The final window maps angles above 270 degrees to negative deltaPhi ////
@@ -682,14 +700,18 @@ struct FoxWolframCorrelation {
682700
(deltaPhi > (240. + lo - 360.) * degToRad && deltaPhi < (240. + hi - 360.) * degToRad);
683701

684702
if (inAway) {
685-
foldedHistos.fill(HIST("triEvFoldedLR/") + HIST(awayNames[angularBin]) + HIST(binNames[Idx]), pt);
686-
}
703+
if (pt > meanPtMin.value) {
704+
foldedHistos.fill(HIST("triEvFoldedLR/") + HIST(awayNames[angBin]) + HIST(binNames[Idx]), pt);
705+
foldedHistos.fill(HIST("triEvFoldedLR/") + HIST(awayMeanNames[angBin]) + HIST(binNames[Idx]), nTracks, pt);
706+
} // for pt > meanPtMin
707+
} // PEAKS 2 AND 3
687708
});
688709
}
689710

690711
//// TRI LR pT spectra in six symmetric angular intervals ////
691712
template <typename Track>
692713
void fillSameEventFoldedLR(int binIndex,
714+
int nTracks,
693715
Track const& associatedTrack,
694716
double deltaPhi,
695717
double deltaEta,
@@ -722,7 +744,7 @@ struct FoxWolframCorrelation {
722744
return;
723745
}
724746

725-
fillFoldedBin<idx>(deltaPhi, associatedTrack.pt());
747+
fillFoldedBin<idx>(nTracks, deltaPhi, associatedTrack.pt());
726748
});
727749
}
728750

@@ -742,13 +764,18 @@ struct FoxWolframCorrelation {
742764
}
743765

744766
if (inLR) {
745-
histos.fill(HIST("allEvPkVall/") + HIST(allLRNames[region]) + HIST("Pt_") + HIST(binNames[Idx]), pt);
746-
histos.fill(HIST("allEvPkVall/") + HIST(allLRNames[region]) + HIST("PtMultip_") + HIST(binNames[Idx]), nTracks, pt);
767+
if (pt > meanPtMin.value) {
768+
histos.fill(HIST("allEvPkVall/") + HIST(allLRNames[region]) + HIST("Pt_") + HIST(binNames[Idx]), pt);
769+
histos.fill(HIST("allEvPkVall/") + HIST(allLRNames[region]) + HIST("PtMultip_") + HIST(binNames[Idx]), nTracks, pt);
770+
} // for pt > meanPtMin
747771
}
748772

749773
if (inSR) {
750-
histos.fill(HIST("allEvPkVall/") + HIST(allSRNames[region]) + HIST("Pt_") + HIST(binNames[Idx]), pt);
751-
histos.fill(HIST("allEvPkVall/") + HIST(allSRNames[region]) + HIST("PtMultip_") + HIST(binNames[Idx]), nTracks, pt);
774+
775+
if (pt > meanPtMin.value) {
776+
histos.fill(HIST("allEvPkVall/") + HIST(allSRNames[region]) + HIST("Pt_") + HIST(binNames[Idx]), pt);
777+
histos.fill(HIST("allEvPkVall/") + HIST(allSRNames[region]) + HIST("PtMultip_") + HIST(binNames[Idx]), nTracks, pt);
778+
} // for pt > meanPtMin
752779
}
753780
});
754781
}
@@ -763,13 +790,17 @@ struct FoxWolframCorrelation {
763790
}
764791

765792
if (inLR) {
766-
histos.fill(HIST("triEvPkVall/") + HIST(triLRNames[region]) + HIST("Pt_") + HIST(binNames[Idx]), pt);
767-
histos.fill(HIST("triEvPkVall/") + HIST(triLRNames[region]) + HIST("PtMultip_") + HIST(binNames[Idx]), nTracks, pt);
793+
if (pt > meanPtMin.value) {
794+
histos.fill(HIST("triEvPkVall/") + HIST(triLRNames[region]) + HIST("Pt_") + HIST(binNames[Idx]), pt);
795+
histos.fill(HIST("triEvPkVall/") + HIST(triLRNames[region]) + HIST("PtMultip_") + HIST(binNames[Idx]), nTracks, pt);
796+
} // for pt > meanPtMin
768797
}
769798

770799
if (inSR) {
771-
histos.fill(HIST("triEvPkVall/") + HIST(triSRNames[region]) + HIST("Pt_") + HIST(binNames[Idx]), pt);
772-
histos.fill(HIST("triEvPkVall/") + HIST(triSRNames[region]) + HIST("PtMultip_") + HIST(binNames[Idx]), nTracks, pt);
800+
if (pt > meanPtMin.value) {
801+
histos.fill(HIST("triEvPkVall/") + HIST(triSRNames[region]) + HIST("Pt_") + HIST(binNames[Idx]), pt);
802+
histos.fill(HIST("triEvPkVall/") + HIST(triSRNames[region]) + HIST("PtMultip_") + HIST(binNames[Idx]), nTracks, pt);
803+
} // for pt > meanPtMin
773804
}
774805
});
775806
}
@@ -1041,7 +1072,7 @@ struct FoxWolframCorrelation {
10411072
//// Fixed-window spectra and mean-pT profiles ////
10421073
fillSameEventPtHist(i + 1, nGlobalTracks, track2, deltaPhi, deltaEta, isLeadAssocPair);
10431074
//// TRI LR spectra in symmetric 10-degree windows ////
1044-
fillSameEventFoldedLR(i + 1, track2, deltaPhi, deltaEta, isLeadAssocPair);
1075+
fillSameEventFoldedLR(i + 1, nGlobalTracks, track2, deltaPhi, deltaEta, isLeadAssocPair);
10451076
}
10461077
}
10471078
}

0 commit comments

Comments
 (0)