@@ -226,8 +226,8 @@ struct HfCorrelatorLcHadrons {
226226 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);
227227 Filter trackFilter = (nabs(aod::track::eta) < etaTrackMax) && (nabs(aod::track::pt) > ptTrackMin) && (nabs(aod::track::dcaXY) < dcaXYTrackMax) && (nabs(aod::track::dcaZ) < dcaZTrackMax);
228228
229- // Preslice<aod::McParticles> perTrueCollision = o2::aod::mcparticle::McCollisionId;
230- Preslice<aod::McParticles> perTrueCollision = o2::aod::mcparticle::mcCollisionId;
229+ // Preslice<aod::McParticles> perTrueCollision = o2::aod::mcparticle::McCollisionId;
230+ Preslice<aod::McParticles> perTrueCollision = o2::aod::mcparticle::mcCollisionId;
231231 // configurable axis definition
232232 ConfigurableAxis binsMultiplicity{" binsMultiplicity" , {VARIABLE_WIDTH, 0 .0f , 2000 .0f , 6000 .0f , 100000 .0f }, " Mixing bins - multiplicity" };
233233 ConfigurableAxis binsZVtx{" binsZVtx" , {VARIABLE_WIDTH, -10 .0f , -2 .5f , 2 .5f , 10 .0f }, " Mixing bins - z-vertex" };
@@ -249,7 +249,7 @@ Preslice<aod::McParticles> perTrueCollision = o2::aod::mcparticle::mcCollisionId
249249 AxisSpec axisPhi = {binsPhi, " #it{#varphi}" };
250250 AxisSpec axisPtLc = {(std::vector<double >)binsPtLc, " #it{p}_{T} (GeV/#it{c})" };
251251 AxisSpec axisPtHadron = {(std::vector<double >)binsPtHadron, " #it{p}_{T} Hadron (GeV/#it{c})" };
252- AxisSpec axisTrackPt = {500 ,0 , 50 , " #it{p}_{T} Hadron (GeV/#it{c})" };
252+ AxisSpec axisTrackPt = {500 , 0 , 50 , " #it{p}_{T} Hadron (GeV/#it{c})" };
253253 AxisSpec axisMultiplicity = {binsMultiplicity, " Multiplicity" };
254254 AxisSpec axisMultFT0M = {binsMultFT0M, " MultiplicityFT0M" };
255255 AxisSpec axisPosZ = {binsZVtx, " PosZ" };
@@ -450,7 +450,7 @@ Preslice<aod::McParticles> perTrueCollision = o2::aod::mcparticle::mcCollisionId
450450 }
451451 }
452452 if (countLc == 0 ) {
453- entryHadron (track.phi (), track.eta (), track.pt ()* track.sign (), poolBin, gCollisionId , timeStamp);
453+ entryHadron (track.phi (), track.eta (), track.pt () * track.sign (), poolBin, gCollisionId , timeStamp);
454454 if (fillTrkPID) {
455455 entryTrkPID (track.tpcNSigmaPr (), track.tpcNSigmaKa (), track.tpcNSigmaPi (), track.tofNSigmaPr (), track.tofNSigmaKa (), track.tofNSigmaPi ());
456456 }
@@ -589,42 +589,41 @@ Preslice<aod::McParticles> perTrueCollision = o2::aod::mcparticle::mcCollisionId
589589 }
590590 }
591591 registry.fill (HIST (" hLcBin" ), poolBin);
592-
593592
594- if (calTrkEff && countLc== 1 && (isLcSignal || !calEffLcEvent)){
595- // genrated tracks
596- decltype (trackPos1.mcParticle_as <aod::McParticles>()) mctrk{};
597- if (trackPos1.has_mcParticle ()){ // ambiguous tracks should be small
593+ if (calTrkEff && countLc == 1 && (isLcSignal || !calEffLcEvent)) {
594+ // genrated tracks
595+ decltype (trackPos1.mcParticle_as <aod::McParticles>()) mctrk{};
596+ if (trackPos1.has_mcParticle ()) { // ambiguous tracks should be small
598597 mctrk = trackPos1.template mcParticle_as <aod::McParticles>();
599- } else if (trackPos2.has_mcParticle ()){
598+ } else if (trackPos2.has_mcParticle ()) {
600599 mctrk = trackPos2.template mcParticle_as <aod::McParticles>();
601600 } else {
602601 continue ;
603602 }
604603 auto Gentracks = mcParticles.sliceBy (perTrueCollision, mctrk.mcCollisionId ());
605- for (const auto & track : Gentracks) {
606- if (std::abs (track.eta ()) > etaTrackMax || track.pt () < ptTrackMin || track.pt () > ptTrackMax) {
607- continue ;
608- }
609- if ((std::abs (track.pdgCode ()) != kElectron ) && (std::abs (track.pdgCode ()) != kMuonMinus ) && (std::abs (track.pdgCode ()) != kPiPlus ) && (std::abs (track.pdgCode ()) != kKPlus ) && (std::abs (track.pdgCode ()) != kProton )) {
610- continue ;
611- }
604+ for (const auto & track : Gentracks) {
605+ if (std::abs (track.eta ()) > etaTrackMax || track.pt () < ptTrackMin || track.pt () > ptTrackMax) {
606+ continue ;
607+ }
608+ if ((std::abs (track.pdgCode ()) != kElectron ) && (std::abs (track.pdgCode ()) != kMuonMinus ) && (std::abs (track.pdgCode ()) != kPiPlus ) && (std::abs (track.pdgCode ()) != kKPlus ) && (std::abs (track.pdgCode ()) != kProton )) {
609+ continue ;
610+ }
612611
613- if (pidTrkApplied && (std::abs (track.pdgCode ()) != kProton ))
614- continue ; // proton PID
612+ if (pidTrkApplied && (std::abs (track.pdgCode ()) != kProton ))
613+ continue ; // proton PID
615614
616- if (!track.isPhysicalPrimary ()) {
617- continue ;
618- }
615+ if (!track.isPhysicalPrimary ()) {
616+ continue ;
617+ }
619618
620- auto motherTrkGen = mcParticles.iteratorAt (track.mothersIds ()[0 ]);
621- if (std::abs (motherTrkGen.pdgCode () == kLambdaCPlus )) continue ;
619+ auto motherTrkGen = mcParticles.iteratorAt (track.mothersIds ()[0 ]);
620+ if (std::abs (motherTrkGen.pdgCode () == kLambdaCPlus ))
621+ continue ;
622622
623- auto chargeTrack = pdg->GetParticle (track.pdgCode ())->Charge (); // Retrieve charge
624- registry.fill (HIST (" hPtTracksVsSignGen" ), track.pt (),chargeTrack/(2 *std::abs (chargeTrack)));
625- }
626- // }
627-
623+ auto chargeTrack = pdg->GetParticle (track.pdgCode ())->Charge (); // Retrieve charge
624+ registry.fill (HIST (" hPtTracksVsSignGen" ), track.pt (), chargeTrack / (2 * std::abs (chargeTrack)));
625+ }
626+ // }
628627 }
629628
630629 // Lc-Hadron correlation dedicated section
@@ -641,16 +640,19 @@ Preslice<aod::McParticles> perTrueCollision = o2::aod::mcparticle::mcCollisionId
641640 continue ;
642641 }
643642
644- if (calTrkEff && countLc==1 && (isLcSignal || !calEffLcEvent) && track.has_mcParticle ()){
645- auto mcParticle = track.template mcParticle_as <aod::McParticles>();
646- if (!mcParticle.isPhysicalPrimary () && isRecTrkPhyPrimary) continue ;
643+ if (calTrkEff && countLc == 1 && (isLcSignal || !calEffLcEvent) && track.has_mcParticle ()) {
644+ auto mcParticle = track.template mcParticle_as <aod::McParticles>();
645+ if (!mcParticle.isPhysicalPrimary () && isRecTrkPhyPrimary)
646+ continue ;
647647
648- auto motherTrk = mcParticles.iteratorAt (mcParticle.mothersIds ()[0 ]);
649- if (std::abs (motherTrk.pdgCode () == kLambdaCPlus )) continue ;
648+ auto motherTrk = mcParticles.iteratorAt (mcParticle.mothersIds ()[0 ]);
649+ if (std::abs (motherTrk.pdgCode () == kLambdaCPlus ))
650+ continue ;
650651
651- registry.fill (HIST (" hPtTracksVsSignRec" ), track.pt (),track.sign ()/2 .);
652- if (std::abs (mcParticle.pdgCode ()) == kProton ) registry.fill (HIST (" hPtTracksVsSignRecTrue" ), track.pt (),track.sign ()/2 .);
653- }
652+ registry.fill (HIST (" hPtTracksVsSignRec" ), track.pt (), track.sign () / 2 .);
653+ if (std::abs (mcParticle.pdgCode ()) == kProton )
654+ registry.fill (HIST (" hPtTracksVsSignRecTrue" ), track.pt (), track.sign () / 2 .);
655+ }
654656
655657 // Removing Lc daughters by checking track indices
656658 if ((candidate.prong0Id () == track.globalIndex ()) || (candidate.prong1Id () == track.globalIndex ()) || (candidate.prong2Id () == track.globalIndex ())) {
0 commit comments