@@ -46,7 +46,10 @@ enum DecayChannel { DplusToPiKPi = 0,
4646 D0ToPiK,
4747 D0ToKPi,
4848 LcToPKPi,
49- LcToPiKP };
49+ LcToPiKP,
50+ XicToPKPi,
51+ XicToPiKP
52+ };
5053
5154enum QvecEstimator { FV0A = 0 ,
5255 FT0M,
@@ -66,6 +69,7 @@ struct HfTaskFlowCharmHadrons {
6669 Configurable<bool > storeEP{" storeEP" , false , " Flag to store EP-related axis" };
6770 Configurable<bool > storeMl{" storeMl" , false , " Flag to store ML scores" };
6871 Configurable<bool > storeResoOccu{" storeResoOccu" , false , " Flag to store Occupancy in resolution ThnSparse" };
72+ Configurable<bool > storeEpCosSin{" storeEpCosSin" , false , " Flag to store cos and sin of EP angle in ThnSparse" };
6973 Configurable<int > occEstimator{" occEstimator" , 0 , " Occupancy estimation (0: None, 1: ITS, 2: FT0C)" };
7074 Configurable<bool > saveEpResoHisto{" saveEpResoHisto" , false , " Flag to save event plane resolution histogram" };
7175 Configurable<std::string> ccdbUrl{" ccdbUrl" , " http://alice-ccdb.cern.ch" , " url of the ccdb repository" };
@@ -75,6 +79,7 @@ struct HfTaskFlowCharmHadrons {
7579 ConfigurableAxis thnConfigAxisPt{" thnConfigAxisPt" , {10 , 0 ., 10 .}, " " };
7680 ConfigurableAxis thnConfigAxisCent{" thnConfigAxisCent" , {10000 , 0 ., 100 .}, " " };
7781 ConfigurableAxis thnConfigAxisCosNPhi{" thnConfigAxisCosNPhi" , {100 , -1 ., 1 .}, " " };
82+ ConfigurableAxis thnConfigAxisPsi{" thnConfigAxisPsi" , {6000 , 2 . * TMath::Pi (), 2 . * TMath::Pi ()}, " " };
7883 ConfigurableAxis thnConfigAxisCosDeltaPhi{" thnConfigAxisCosDeltaPhi" , {100 , -1 ., 1 .}, " " };
7984 ConfigurableAxis thnConfigAxisScalarProd{" thnConfigAxisScalarProd" , {100 , 0 ., 1 .}, " " };
8085 ConfigurableAxis thnConfigAxisMlOne{" thnConfigAxisMlOne" , {1000 , 0 ., 1 .}, " " };
@@ -96,6 +101,8 @@ struct HfTaskFlowCharmHadrons {
96101 using CandDplusData = soa::Filtered<soa::Join<aod::HfCand3Prong, aod::HfSelDplusToPiKPi>>;
97102 using CandLcData = soa::Filtered<soa::Join<aod::HfCand3Prong, aod::HfSelLc>>;
98103 using CandLcDataWMl = soa::Filtered<soa::Join<aod::HfCand3Prong, aod::HfSelLc, aod::HfMlLcToPKPi>>;
104+ using CandXicData = soa::Filtered<soa::Join<aod::HfCand3Prong, aod::HfSelXicToPKPi>>;
105+ using CandXicDataWMl = soa::Filtered<soa::Join<aod::HfCand3Prong, aod::HfSelXicToPKPi, aod::HfMlXicToPKPi>>;
99106 using CandD0DataWMl = soa::Filtered<soa::Join<aod::HfCand2Prong, aod::HfSelD0, aod::HfMlD0>>;
100107 using CandD0Data = soa::Filtered<soa::Join<aod::HfCand2Prong, aod::HfSelD0>>;
101108 using CollsWithQvecs = soa::Join<aod::Collisions, aod::EvSels, aod::QvectorFT0Cs, aod::QvectorFT0As, aod::QvectorFT0Ms, aod::QvectorFV0As, aod::QvectorBPoss, aod::QvectorBNegs, aod::QvectorBTots, aod::CentFV0As, aod::CentFT0Ms, aod::CentFT0As, aod::CentFT0Cs>;
@@ -104,6 +111,7 @@ struct HfTaskFlowCharmHadrons {
104111 Filter filterSelectDplusCandidates = aod::hf_sel_candidate_dplus::isSelDplusToPiKPi >= selectionFlag;
105112 Filter filterSelectD0Candidates = aod::hf_sel_candidate_d0::isSelD0 >= selectionFlag || aod::hf_sel_candidate_d0::isSelD0bar >= selectionFlag;
106113 Filter filterSelectLcCandidates = aod::hf_sel_candidate_lc::isSelLcToPKPi >= selectionFlag || aod::hf_sel_candidate_lc::isSelLcToPiKP >= selectionFlag;
114+ Filter filterSelectXicCandidates = aod::hf_sel_candidate_xic::isSelXicToPKPi >= selectionFlag || aod::hf_sel_candidate_xic::isSelXicToPiKP >= selectionFlag;
107115
108116 Partition<CandDsData> selectedDsToKKPi = aod::hf_sel_candidate_ds::isSelDsToKKPi >= selectionFlag;
109117 Partition<CandDsData> selectedDsToPiKK = aod::hf_sel_candidate_ds::isSelDsToPiKK >= selectionFlag;
@@ -117,6 +125,10 @@ struct HfTaskFlowCharmHadrons {
117125 Partition<CandLcData> selectedLcToPiKP = aod::hf_sel_candidate_lc::isSelLcToPiKP >= selectionFlag;
118126 Partition<CandLcDataWMl> selectedLcToPKPiWMl = aod::hf_sel_candidate_lc::isSelLcToPKPi >= selectionFlag;
119127 Partition<CandLcDataWMl> selectedLcToPiKPWMl = aod::hf_sel_candidate_lc::isSelLcToPiKP >= selectionFlag;
128+ Partition<CandXicData> selectedXicToPKPi = aod::hf_sel_candidate_xic::isSelXicToPKPi >= selectionFlag;
129+ Partition<CandXicData> selectedXicToPiKP = aod::hf_sel_candidate_xic::isSelXicToPiKP >= selectionFlag;
130+ Partition<CandXicDataWMl> selectedXicToPKPiWMl = aod::hf_sel_candidate_xic::isSelXicToPKPi >= selectionFlag;
131+ Partition<CandXicDataWMl> selectedXicToPiKPWMl = aod::hf_sel_candidate_xic::isSelXicToPiKP >= selectionFlag;
120132
121133 SliceCache cache;
122134 HfHelper hfHelper;
@@ -135,6 +147,8 @@ struct HfTaskFlowCharmHadrons {
135147 const AxisSpec thnAxisPt{thnConfigAxisPt, " #it{p}_{T} (GeV/#it{c})" };
136148 const AxisSpec thnAxisCent{thnConfigAxisCent, " Centrality" };
137149 const AxisSpec thnAxisCosNPhi{thnConfigAxisCosNPhi, Form (" cos(%d#varphi)" , harmonic.value )};
150+ const AxisSpec thnAxisSinNPhi{thnConfigAxisCosNPhi, Form (" sin(%d#varphi)" , harmonic.value )};
151+ const AxisSpec thnAxisPsi{thnConfigAxisPsi, Form (" #Psi_{%d}" , harmonic.value )};
138152 const AxisSpec thnAxisCosDeltaPhi{thnConfigAxisCosDeltaPhi, Form (" cos(%d(#varphi - #Psi_{sub}))" , harmonic.value )};
139153 const AxisSpec thnAxisScalarProd{thnConfigAxisScalarProd, " SP" };
140154 const AxisSpec thnAxisMlOne{thnConfigAxisMlOne, " Bkg score" };
@@ -153,7 +167,7 @@ struct HfTaskFlowCharmHadrons {
153167
154168 std::vector<AxisSpec> axes = {thnAxisInvMass, thnAxisPt, thnAxisCent, thnAxisScalarProd};
155169 if (storeEP) {
156- axes.insert (axes.end (), {thnAxisCosNPhi, thnAxisCosDeltaPhi});
170+ axes.insert (axes.end (), {thnAxisCosNPhi, thnAxisSinNPhi, thnAxisCosDeltaPhi});
157171 }
158172 if (storeMl) {
159173 axes.insert (axes.end (), {thnAxisMlOne, thnAxisMlTwo});
@@ -173,6 +187,10 @@ struct HfTaskFlowCharmHadrons {
173187 registry.add (" trackOccVsFT0COcc" , " trackOccVsFT0COcc; trackOcc; FT0COcc" , {HistType::kTH2F , {thnAxisOccupancyITS, thnAxisOccupancyFT0C}});
174188 }
175189
190+ if (storeEpCosSin) {
191+ registry.add (" ep/hSparseEp" , " THn for Event Plane distirbution" , {HistType::kTHnSparseF , {thnAxisCent, thnAxisPsi, thnAxisCosNPhi, thnAxisSinNPhi}});
192+ }
193+
176194 if (doprocessResolution) { // enable resolution histograms only for resolution process
177195 registry.add (" spReso/hSpResoFT0cFT0a" , " hSpResoFT0cFT0a; centrality; Q_{FT0c} #bullet Q_{FT0a}" , {HistType::kTH2F , {thnAxisCent, thnAxisScalarProd}});
178196 registry.add (" spReso/hSpResoFT0cFV0a" , " hSpResoFT0cFV0a; centrality; Q_{FT0c} #bullet Q_{FV0a}" , {HistType::kTH2F , {thnAxisCent, thnAxisScalarProd}});
@@ -300,6 +318,7 @@ struct HfTaskFlowCharmHadrons {
300318 // / \param pt is the transverse momentum of the candidate
301319 // / \param cent is the centrality of the collision
302320 // / \param cosNPhi is the cosine of the n*phi angle
321+ // / \param sinNPhi is the sine of the n*phi angle
303322 // / \param cosDeltaPhi is the cosine of the n*(phi - evtPl) angle
304323 // / \param sp is the scalar product
305324 // / \param outputMl are the ML scores
@@ -309,6 +328,7 @@ struct HfTaskFlowCharmHadrons {
309328 float & pt,
310329 float & cent,
311330 float & cosNPhi,
331+ float & sinNPhi,
312332 float & cosDeltaPhi,
313333 float & sp,
314334 std::vector<float >& outputMl,
@@ -319,15 +339,15 @@ struct HfTaskFlowCharmHadrons {
319339 std::vector<int > evtSelFlags = getEventSelectionFlags (hfevselflag);
320340 if (storeMl) {
321341 if (storeEP) {
322- registry.fill (HIST (" hSparseFlowCharm" ), mass, pt, cent, sp, cosNPhi, cosDeltaPhi, outputMl[0 ], outputMl[1 ], occupancy,
342+ registry.fill (HIST (" hSparseFlowCharm" ), mass, pt, cent, sp, cosNPhi, sinNPhi, cosDeltaPhi, outputMl[0 ], outputMl[1 ], occupancy,
323343 evtSelFlags[0 ], evtSelFlags[1 ], evtSelFlags[2 ], evtSelFlags[3 ], evtSelFlags[4 ]);
324344 } else {
325345 registry.fill (HIST (" hSparseFlowCharm" ), mass, pt, cent, sp, outputMl[0 ], outputMl[1 ], occupancy,
326346 evtSelFlags[0 ], evtSelFlags[1 ], evtSelFlags[2 ], evtSelFlags[3 ], evtSelFlags[4 ]);
327347 }
328348 } else {
329349 if (storeEP) {
330- registry.fill (HIST (" hSparseFlowCharm" ), mass, pt, cent, sp, cosNPhi, cosDeltaPhi, occupancy,
350+ registry.fill (HIST (" hSparseFlowCharm" ), mass, pt, cent, sp, cosNPhi, sinNPhi, cosDeltaPhi, occupancy,
331351 evtSelFlags[0 ], evtSelFlags[1 ], evtSelFlags[2 ], evtSelFlags[3 ], evtSelFlags[4 ]);
332352 } else {
333353 registry.fill (HIST (" hSparseFlowCharm" ), mass, pt, cent, sp, occupancy,
@@ -337,13 +357,13 @@ struct HfTaskFlowCharmHadrons {
337357 } else {
338358 if (storeMl) {
339359 if (storeEP) {
340- registry.fill (HIST (" hSparseFlowCharm" ), mass, pt, cent, sp, cosNPhi, cosDeltaPhi, outputMl[0 ], outputMl[1 ]);
360+ registry.fill (HIST (" hSparseFlowCharm" ), mass, pt, cent, sp, cosNPhi, sinNPhi, cosDeltaPhi, outputMl[0 ], outputMl[1 ]);
341361 } else {
342362 registry.fill (HIST (" hSparseFlowCharm" ), mass, pt, cent, sp, outputMl[0 ], outputMl[1 ]);
343363 }
344364 } else {
345365 if (storeEP) {
346- registry.fill (HIST (" hSparseFlowCharm" ), mass, pt, cent, sp, cosNPhi, cosDeltaPhi);
366+ registry.fill (HIST (" hSparseFlowCharm" ), mass, pt, cent, sp, cosNPhi, sinNPhi, cosDeltaPhi);
347367 } else {
348368 registry.fill (HIST (" hSparseFlowCharm" ), mass, pt, cent, sp);
349369 }
@@ -513,6 +533,25 @@ struct HfTaskFlowCharmHadrons {
513533 default :
514534 break ;
515535 }
536+ } else if constexpr (std::is_same_v<T1, CandXicData> || std::is_same_v<T1, CandXicDataWMl>) {
537+ switch (channel) {
538+ case DecayChannel::XicToPKPi:
539+ massCand = hfHelper.invMassXicToPKPi (candidate);
540+ if constexpr (std::is_same_v<T1, CandXicDataWMl>) {
541+ for (unsigned int iclass = 0 ; iclass < classMl->size (); iclass++)
542+ outputMl[iclass] = candidate.mlProbXicToPKPi ()[classMl->at (iclass)];
543+ }
544+ break ;
545+ case DecayChannel::XicToPiKP:
546+ massCand = hfHelper.invMassXicToPiKP (candidate);
547+ if constexpr (std::is_same_v<T1, CandXicDataWMl>) {
548+ for (unsigned int iclass = 0 ; iclass < classMl->size (); iclass++)
549+ outputMl[iclass] = candidate.mlProbXicToPiKP ()[classMl->at (iclass)];
550+ }
551+ break ;
552+ default :
553+ break ;
554+ }
516555 }
517556
518557 float ptCand = candidate.pt ();
@@ -536,7 +575,7 @@ struct HfTaskFlowCharmHadrons {
536575 float scalprodCand = cosNPhi * xQVec + sinNPhi * yQVec;
537576 float cosDeltaPhi = std::cos (harmonic * (phiCand - evtPl));
538577
539- fillThn (massCand, ptCand, cent, cosNPhi, cosDeltaPhi, scalprodCand, outputMl, occupancy, hfevflag);
578+ fillThn (massCand, ptCand, cent, cosNPhi, sinNPhi, cosDeltaPhi, scalprodCand, outputMl, occupancy, hfevflag);
540579 }
541580 }
542581
@@ -622,6 +661,28 @@ struct HfTaskFlowCharmHadrons {
622661 }
623662 PROCESS_SWITCH (HfTaskFlowCharmHadrons, processLc, " Process Lc candidates" , false );
624663
664+ // Xic with ML
665+ void processXicMl (CollsWithQvecs::iterator const & collision,
666+ CandXicDataWMl const &)
667+ {
668+ auto candsXicToPKPiWMl = selectedXicToPKPiWMl->sliceByCached (aod::hf_cand::collisionId, collision.globalIndex (), cache);
669+ auto candsXicToPiKPWMl = selectedXicToPiKPWMl->sliceByCached (aod::hf_cand::collisionId, collision.globalIndex (), cache);
670+ runFlowAnalysis<DecayChannel::XicToPKPi>(collision, candsXicToPKPiWMl);
671+ runFlowAnalysis<DecayChannel::XicToPiKP>(collision, candsXicToPiKPWMl);
672+ }
673+ PROCESS_SWITCH (HfTaskFlowCharmHadrons, processXicMl, " Process Xic candidates with ML" , false );
674+
675+ // Xic with rectangular cuts
676+ void processXic (CollsWithQvecs::iterator const & collision,
677+ CandXicData const &)
678+ {
679+ auto candsXicToPKPi = selectedXicToPKPi->sliceByCached (aod::hf_cand::collisionId, collision.globalIndex (), cache);
680+ auto candsXicToPiKP = selectedXicToPiKP->sliceByCached (aod::hf_cand::collisionId, collision.globalIndex (), cache);
681+ runFlowAnalysis<DecayChannel::XicToPKPi>(collision, candsXicToPKPi);
682+ runFlowAnalysis<DecayChannel::XicToPiKP>(collision, candsXicToPiKP);
683+ }
684+ PROCESS_SWITCH (HfTaskFlowCharmHadrons, processXic, " Process Xic candidates" , false );
685+
625686 // Resolution
626687 void processResolution (CollsWithQvecs::iterator const & collision,
627688 aod::BCsWithTimestamps const & bcs)
@@ -705,6 +766,13 @@ struct HfTaskFlowCharmHadrons {
705766 registry.fill (HIST (" epReso/hEpResoFV0aTPCtot" ), centrality, std::cos (harmonic * getDeltaPsiInRange (epFV0a, epBTots)));
706767 registry.fill (HIST (" epReso/hEpResoTPCposTPCneg" ), centrality, std::cos (harmonic * getDeltaPsiInRange (epBPoss, epBNegs)));
707768 }
769+
770+ if (storeEpCosSin) {
771+ registry.fill (HIST (" ep/hSparseEp" ), centrality,
772+ epHelper.GetEventPlane (xQVecFT0c, yQVecFT0c, harmonic),
773+ std::cos (harmonic * epHelper.GetEventPlane (xQVecFT0c, yQVecFT0c, harmonic)),
774+ std::sin (harmonic * epHelper.GetEventPlane (xQVecFT0c, yQVecFT0c, harmonic)));
775+ }
708776 }
709777 PROCESS_SWITCH (HfTaskFlowCharmHadrons, processResolution, " Process resolution" , false );
710778
0 commit comments