@@ -75,6 +75,7 @@ struct HfCorrelatorLcHadronsSelection {
7575 // filter on selection of Lc and decay channel Lc->PKPi
7676 Filter lcFilter = ((o2::aod::hf_track_index::hfflag & static_cast <uint8_t >(1 << aod::hf_cand_3prong::DecayType::LcToPKPi)) != static_cast <uint8_t >(0 )) && (aod::hf_sel_candidate_lc::isSelLcToPKPi >= selectionFlagLc || aod::hf_sel_candidate_lc::isSelLcToPiKP >= selectionFlagLc);
7777
78+ // / Code to select collisions with at least one Lc - for real data and data-like analysis
7879 void processLcSelectionData (SelCollisions::iterator const & collision,
7980 CandidatesLcData const & candidates)
8081 {
@@ -182,21 +183,11 @@ struct HfCorrelatorLcHadrons {
182183 Configurable<std::vector<double >> binsPtHadron{" binsPtHadron" , std::vector<double >{0.3 , 2 ., 4 ., 8 ., 12 ., 50 .}, " pT bin limits for assoc particle" };
183184 Configurable<std::vector<double >> binsPtEfficiencyLc{" binsPtEfficiencyLc" , std::vector<double >{o2::analysis::hf_cuts_lc_to_p_k_pi::vecBinsPt}, " pT bin limits for efficiency" };
184185 Configurable<std::vector<double >> efficiencyLc{" efficiencyLc" , {1 ., 1 ., 1 ., 1 ., 1 ., 1 .}, " efficiency values for Lc" };
185- ConfigurableAxis binsMultiplicity{" binsMultiplicity" , {VARIABLE_WIDTH, 0 .0f , 2000 .0f , 6000 .0f , 100000 .0f }, " Mixing bins - multiplicity" };
186- ConfigurableAxis binsZVtx{" binsZVtx" , {VARIABLE_WIDTH, -10 .0f , -2 .5f , 2 .5f , 10 .0f }, " Mixing bins - z-vertex" };
187- ConfigurableAxis binsMultiplicityMc{" binsMultiplicityMc" , {VARIABLE_WIDTH, 0 .0f , 20 .0f , 50 .0f , 500 .0f }, " Mixing bins - MC multiplicity" }; // In MCGen multiplicity is defined by counting tracks
188- ConfigurableAxis binsBdtScore{" binsBdtScore" , {100 , 0 ., 1 .}, " Bdt output scores" };
189- ConfigurableAxis binsEta{" binsEta" , {50 , -2 ., 2 .}, " #it{#eta}" };
190- ConfigurableAxis binsPhi{" binsPhi" , {64 , -PIHalf, 3 . * PIHalf}, " #it{#varphi}" };
191- ConfigurableAxis binsPoolBin{" binsPoolBin" , {9 , 0 ., 9 .}, " PoolBin" };
192- ConfigurableAxis binsMultFT0M{" binsMultFT0M" , {600 , 0 ., 6000 .}, " Multiplicity as FT0M signal amplitude" };
193- ConfigurableAxis binsMassLc{" binsMassLc" , {200 , 1.98 , 2.58 }, " inv. mass (p K #pi) (GeV/#it{c}^{2})" };
194186 Configurable<bool > storeAutoCorrelationFlag{" storeAutoCorrelationFlag" , false , " Store flag that indicates if the track is paired to its Lc mother instead of skipping it" };
195187 Configurable<bool > correlateLcWithLeadingParticle{" correlateLcWithLeadingParticle" , false , " Switch for correlation of Lc baryons with leading particle only" };
196188
197189 HfHelper hfHelper;
198190 SliceCache cache;
199- BinningType corrBinning{{binsZVtx, binsMultiplicity}, true };
200191 int leadingIndex = 0 ;
201192 bool correlationStatus = false ;
202193
@@ -218,6 +209,19 @@ struct HfCorrelatorLcHadrons {
218209 Filter lcFilter = ((o2::aod::hf_track_index::hfflag & static_cast <uint8_t >(1 << aod::hf_cand_3prong::DecayType::LcToPKPi)) != static_cast <uint8_t >(0 )) && (aod::hf_sel_candidate_lc::isSelLcToPKPi >= selectionFlagLc || aod::hf_sel_candidate_lc::isSelLcToPiKP >= selectionFlagLc);
219210 Filter trackFilter = (nabs(aod::track::eta) < etaTrackMax) && (nabs(aod::track::pt) > ptTrackMin) && (nabs(aod::track::dcaXY) < dcaXYTrackMax) && (nabs(aod::track::dcaZ) < dcaZTrackMax);
220211
212+ // configurable axis definition
213+ ConfigurableAxis binsMultiplicity{" binsMultiplicity" , {VARIABLE_WIDTH, 0 .0f , 2000 .0f , 6000 .0f , 100000 .0f }, " Mixing bins - multiplicity" };
214+ ConfigurableAxis binsZVtx{" binsZVtx" , {VARIABLE_WIDTH, -10 .0f , -2 .5f , 2 .5f , 10 .0f }, " Mixing bins - z-vertex" };
215+ ConfigurableAxis binsMultiplicityMc{" binsMultiplicityMc" , {VARIABLE_WIDTH, 0 .0f , 20 .0f , 50 .0f , 500 .0f }, " Mixing bins - MC multiplicity" }; // In MCGen multiplicity is defined by counting tracks
216+ ConfigurableAxis binsBdtScore{" binsBdtScore" , {100 , 0 ., 1 .}, " Bdt output scores" };
217+ ConfigurableAxis binsEta{" binsEta" , {50 , -2 ., 2 .}, " #it{#eta}" };
218+ ConfigurableAxis binsPhi{" binsPhi" , {64 , -PIHalf, 3 . * PIHalf}, " #it{#varphi}" };
219+ ConfigurableAxis binsPoolBin{" binsPoolBin" , {9 , 0 ., 9 .}, " PoolBin" };
220+ ConfigurableAxis binsMultFT0M{" binsMultFT0M" , {600 , 0 ., 6000 .}, " Multiplicity as FT0M signal amplitude" };
221+ ConfigurableAxis binsMassLc{" binsMassLc" , {200 , 1.98 , 2.58 }, " inv. mass (p K #pi) (GeV/#it{c}^{2})" };
222+
223+ BinningType corrBinning{{binsZVtx, binsMultiplicity}, true };
224+
221225 HistogramRegistry registry{" registry" , {}, OutputObjHandlingPolicy::AnalysisObject};
222226 void init (InitContext&)
223227 {
@@ -242,7 +246,7 @@ struct HfCorrelatorLcHadrons {
242246 registry.add (" hEta" , " Lc,Hadron candidates;candidate #it{#eta};entries" , {HistType::kTH1F , {axisEta}});
243247 registry.add (" hPhi" , " Lc,Hadron candidates;candidate #it{#varphi};entries" , {HistType::kTH1F , {axisPhi}});
244248 registry.add (" hY" , " Lc,Hadron candidates;candidate #it{#y};entries" , {HistType::kTH1F , {axisRapidity}});
245- registry.add (" hcountLcHadronPerEvent " , " Lc,Hadron particles - MC gen;Number per event;entries" , {HistType::kTH1F , {{21 , -0.5 , 20.5 }}});
249+ registry.add (" hCountLcHadronPerEvent " , " Lc,Hadron particles - MC gen;Number per event;entries" , {HistType::kTH1F , {{21 , -0.5 , 20.5 }}});
246250 registry.add (" hMultiplicityPreSelection" , " multiplicity prior to selection;multiplicity;entries" , {HistType::kTH1F , {{10000 , 0 ., 10000 .}}});
247251 registry.add (" hMultiplicity" , " multiplicity;multiplicity;entries" , {HistType::kTH1F , {{10000 , 0 ., 10000 .}}});
248252 registry.add (" hMultFT0M" , " multiplicity;multiplicity;entries" , {HistType::kTH1F , {{10000 , 0 ., 10000 .}}});
@@ -293,6 +297,7 @@ struct HfCorrelatorLcHadrons {
293297 corrBinning = {{binsZVtx, binsMultiplicity}, true };
294298 }
295299
300+ // / Lc-hadron correlation pair builder - for real data and data-like analysis (i.e. reco-level w/o matching request via MC truth)
296301 void processData (SelCollisionsWithLc::iterator const & collision,
297302 TracksData const & tracks,
298303 CandidatesLcData const & candidates)
@@ -409,7 +414,7 @@ struct HfCorrelatorLcHadrons {
409414 cntLc++;
410415 } // end outer Lc loop
411416 registry.fill (HIST (" hZvtx" ), collision.posZ ());
412- registry.fill (HIST (" hMultT0M " ), collision.multFT0M ());
417+ registry.fill (HIST (" hMultFT0M " ), collision.multFT0M ());
413418 }
414419 PROCESS_SWITCH (HfCorrelatorLcHadrons, processData, " Process data" , true );
415420
@@ -486,7 +491,7 @@ struct HfCorrelatorLcHadrons {
486491 registry.fill (HIST (" hMassLcMcRec" ), hfHelper.invMassLcToPKPi (candidate), efficiencyWeightLc);
487492 registry.fill (HIST (" hMassLcMcRecSig" ), hfHelper.invMassLcToPKPi (candidate), candidate.pt (), efficiencyWeightLc);
488493 registry.fill (HIST (" hMassLcVsPtMcRec" ), hfHelper.invMassLcToPKPi (candidate), candidate.pt (), efficiencyWeightLc);
489- registry.fill (HIST (" hSelectionStatusMcRec " ), candidate.isSelLcToPKPi ());
494+ registry.fill (HIST (" hSelectionStatusLcToPKPiMcRec " ), candidate.isSelLcToPKPi ());
490495 entryLcCandRecoInfo (hfHelper.invMassLcToPKPi (candidate), candidate.pt (), outputMl[0 ], outputMl[1 ]); // 0: BkgBDTScore, 1:PromptBDTScore
491496 entryLcCandGenInfo (isLcPrompt);
492497 }
@@ -504,7 +509,7 @@ struct HfCorrelatorLcHadrons {
504509 registry.fill (HIST (" hMassLcMcRec" ), hfHelper.invMassLcToPiKP (candidate), efficiencyWeightLc);
505510 registry.fill (HIST (" hMassLcMcRecSig" ), hfHelper.invMassLcToPiKP (candidate), candidate.pt (), efficiencyWeightLc);
506511 registry.fill (HIST (" hMassLcVsPtMcRec" ), hfHelper.invMassLcToPiKP (candidate), candidate.pt (), efficiencyWeightLc);
507- registry.fill (HIST (" hSelectionStatusMcRec " ), candidate.isSelLcToPiKP ());
512+ registry.fill (HIST (" hSelectionStatusLcToPiKPMcRec " ), candidate.isSelLcToPiKP ());
508513 entryLcCandRecoInfo (hfHelper.invMassLcToPiKP (candidate), candidate.pt (), outputMl[0 ], outputMl[1 ]); // 0: BkgBDTScore, 1:PromptBDTScore
509514 entryLcCandGenInfo (isLcPrompt);
510515 }
@@ -521,7 +526,7 @@ struct HfCorrelatorLcHadrons {
521526 registry.fill (HIST (" hMassLcMcRec" ), hfHelper.invMassLcToPKPi (candidate), efficiencyWeightLc);
522527 registry.fill (HIST (" hMassLcMcRecBkg" ), hfHelper.invMassLcToPKPi (candidate), candidate.pt (), efficiencyWeightLc);
523528 registry.fill (HIST (" hMassLcVsPtMcRec" ), hfHelper.invMassLcToPKPi (candidate), candidate.pt (), efficiencyWeightLc);
524- registry.fill (HIST (" hSelectionStatusMcRec " ), candidate.isSelLcToPKPi ());
529+ registry.fill (HIST (" hSelectionStatusLcToPKPiMcRec " ), candidate.isSelLcToPKPi ());
525530 }
526531 if (candidate.isSelLcToPiKP () >= selectionFlagLc) {
527532 for (unsigned int iclass = 0 ; iclass < classMl->size (); iclass++) {
@@ -530,7 +535,7 @@ struct HfCorrelatorLcHadrons {
530535 registry.fill (HIST (" hMassLcMcRec" ), hfHelper.invMassLcToPiKP (candidate), efficiencyWeightLc);
531536 registry.fill (HIST (" hMassLcMcRecBkg" ), hfHelper.invMassLcToPiKP (candidate), candidate.pt (), efficiencyWeightLc);
532537 registry.fill (HIST (" hMassLcVsPtMcRec" ), hfHelper.invMassLcToPiKP (candidate), candidate.pt (), efficiencyWeightLc);
533- registry.fill (HIST (" hSelectionStatusMcRec " ), candidate.isSelLcToPiKP ());
538+ registry.fill (HIST (" hSelectionStatusLcToPiKPMcRec " ), candidate.isSelLcToPiKP ());
534539 }
535540 }
536541 registry.fill (HIST (" hLcBin" ), poolBin);
@@ -612,11 +617,11 @@ struct HfCorrelatorLcHadrons {
612617 } // end inner loop (Tracks)
613618 } // end outer Lc loop
614619 registry.fill (HIST (" hZvtx" ), collision.posZ ());
615- registry.fill (HIST (" hMultT0M " ), collision.multFT0M ());
620+ registry.fill (HIST (" hMultFT0M " ), collision.multFT0M ());
616621 }
617622 PROCESS_SWITCH (HfCorrelatorLcHadrons, processMcRec, " Process Mc Reco mode" , false );
618623
619- // / Lc-Hadron correlation pair builder - for Mc gen -level analysis
624+ // / Lc-Hadron correlation pair builder - for Mc Gen -level analysis
620625 void processMcGen (SelCollisionsWithLcMc::iterator const & mcCollision,
621626 CandidatesLcMcGen const & mcParticles)
622627 {
@@ -635,7 +640,7 @@ struct HfCorrelatorLcHadrons {
635640 leadingIndex = findLeadingParticleMcGen (mcParticles, etaTrackMax.value , ptTrackMin.value );
636641 }
637642
638- // Mc gen level
643+ // Mc Gen level
639644 for (const auto & particle : mcParticles) {
640645 if (std::abs (particle.pdgCode ()) != Pdg::kLambdaCPlus ) {
641646 continue ;
@@ -684,14 +689,14 @@ struct HfCorrelatorLcHadrons {
684689 continue ;
685690 }
686691 if (particleAssoc.globalIndex () == prongsId[0 ] || particleAssoc.globalIndex () == prongsId[1 ] || particleAssoc.globalIndex () == prongsId[2 ]) {
687- continue ;
688- }
689- if ((std::abs (particleAssoc.pdgCode ()) != kElectron ) && (std::abs (particleAssoc.pdgCode ()) != kMuonMinus ) && (std::abs (particleAssoc.pdgCode ()) != kPiPlus ) && (std::abs (particle.pdgCode ()) != kKPlus ) && (std::abs (particleAssoc.pdgCode ()) != kProton )) {
690692 if (!storeAutoCorrelationFlag) {
691693 continue ;
692694 }
693695 correlationStatus = true ;
694696 }
697+ if ((std::abs (particleAssoc.pdgCode ()) != kElectron ) && (std::abs (particleAssoc.pdgCode ()) != kMuonMinus ) && (std::abs (particleAssoc.pdgCode ()) != kPiPlus ) && (std::abs (particle.pdgCode ()) != kKPlus ) && (std::abs (particleAssoc.pdgCode ()) != kProton )) {
698+ continue ;
699+ }
695700 if (!particleAssoc.isPhysicalPrimary ()) {
696701 continue ;
697702 }
@@ -723,9 +728,6 @@ struct HfCorrelatorLcHadrons {
723728 CandidatesLcData const & candidates,
724729 TracksData const & tracks)
725730 {
726- if (candidates.size () == 0 ) {
727- return ;
728- }
729731 auto tracksTuple = std::make_tuple (candidates, tracks);
730732 Pair<SelCollisionsWithLc, CandidatesLcData, TracksData, BinningType> pairData{corrBinning, numberEventsMixed, -1 , collisions, tracksTuple, &cache};
731733
@@ -819,8 +821,8 @@ struct HfCorrelatorLcHadrons {
819821 int poolBin = corrBinning.getBin (std::make_tuple (c2.posZ (), c2.multFT0M ()));
820822 int poolBinLc = corrBinning.getBin (std::make_tuple (c1.posZ (), c1.multFT0M ()));
821823 registry.fill (HIST (" hMultFT0M" ), c1.multFT0M ());
822- registry.fill (HIST (" hZVtx " ), c1.posZ ());
823- registry.fill (HIST (" TracksPoolBin " ), poolBin);
824+ registry.fill (HIST (" hZvtx " ), c1.posZ ());
825+ registry.fill (HIST (" hTracksPoolBin " ), poolBin);
824826 registry.fill (HIST (" hLcPoolBin" ), poolBinLc);
825827 for (const auto & [candidate, pAssoc] : o2::soa::combinations (o2::soa::CombinationsFullIndexPolicy (tracks1, tracks2))) {
826828 if (std::abs (hfHelper.yLc (candidate)) > yCandMax || candidate.pt () < ptCandMin || candidate.pt () > ptCandMax) {
0 commit comments