@@ -190,8 +190,8 @@ struct HfCorrelatorDsHadrons {
190190 using CandDsData = soa::Filtered<soa::Join<aod::HfCand3Prong, aod::HfSelDsToKKPi>>; // flagDsFilter applied
191191 using CandDsMcReco = soa::Filtered<soa::Join<aod::HfCand3Prong, aod::HfSelDsToKKPi, aod::HfCand3ProngMcRec>>; // flagDsFilter applied
192192 using CandDsMcGen = soa::Join<aod::McParticles, aod::HfCand3ProngMcGen>; // flagDsFilter applied
193- using MyTracksData = soa::Filtered<aod::TracksWDca>; // trackFilter applied
194- using TracksWithMc = soa::Filtered<soa::Join<aod::TracksWDca, o2::aod::McTrackLabels>>; // trackFilter applied
193+ using MyTracksData = soa::Filtered<soa::Join< aod::TracksWDca, aod::TrackSelection>>; // trackFilter applied
194+ using TracksWithMc = soa::Filtered<soa::Join<aod::TracksWDca, aod::TrackSelection, o2::aod::McTrackLabels>>; // trackFilter applied
195195
196196 Filter collisionFilter = aod::hf_selection_dmeson_collision::dmesonSel == true && o2::aod::evsel::sel8 == true ;
197197 Filter flagDsFilter = ((o2::aod::hf_track_index::hfflag & static_cast <uint8_t >(1 << aod::hf_cand_3prong::DecayType::DsToKKPi)) != static_cast <uint8_t >(0 )) && (aod::hf_sel_candidate_ds::isSelDsToKKPi >= selectionFlagDs || aod::hf_sel_candidate_ds::isSelDsToPiKK >= selectionFlagDs);
@@ -389,6 +389,9 @@ struct HfCorrelatorDsHadrons {
389389 if ((candidate.prong0Id () == track.globalIndex ()) || (candidate.prong1Id () == track.globalIndex ()) || (candidate.prong2Id () == track.globalIndex ())) {
390390 continue ;
391391 }
392+ if (!track.isGlobalTrackWoDCA ()) {
393+ continue ;
394+ }
392395 registry.fill (HIST (" hEtaVsPtPartAssoc" ), track.eta (), candidate.pt ());
393396 registry.fill (HIST (" hPhiVsPtPartAssoc" ), RecoDecay::constrainAngle (track.phi (), -PIHalf), candidate.pt ());
394397 if (candidate.isSelDsToKKPi () >= selectionFlagDs) {
@@ -485,6 +488,9 @@ struct HfCorrelatorDsHadrons {
485488 if ((candidate.prong0Id () == track.globalIndex ()) || (candidate.prong1Id () == track.globalIndex ()) || (candidate.prong2Id () == track.globalIndex ())) {
486489 continue ;
487490 }
491+ if (!track.isGlobalTrackWoDCA ()) {
492+ continue ;
493+ }
488494 bool isPhysicalPrimary = false ;
489495 // DsToKKPi and DsToPiKK division
490496 if (candidate.isSelDsToKKPi () >= selectionFlagDs) {
@@ -624,6 +630,9 @@ struct HfCorrelatorDsHadrons {
624630 // recontructed tracks loop
625631 for (auto & track : tracksData) {
626632 if (track.has_collision ()) {
633+ if (!track.isGlobalTrackWoDCA ()) {
634+ continue ;
635+ }
627636 auto collision = track.template collision_as <soa::Join<aod::Collisions, aod::FT0Mults>>();
628637 multiplicity = collision.multFT0M ();
629638 posZ = collision.posZ ();
@@ -691,7 +700,6 @@ struct HfCorrelatorDsHadrons {
691700 if (particleAssoc.pt () < ptTrackMin) {
692701 continue ;
693702 }
694-
695703 if ((std::abs (particleAssoc.pdgCode ()) != kElectron ) && (std::abs (particleAssoc.pdgCode ()) != kMuonMinus ) && (std::abs (particleAssoc.pdgCode ()) != kPiPlus ) && (std::abs (particleAssoc.pdgCode ()) != kKPlus ) && (std::abs (particleAssoc.pdgCode ()) != kProton )) {
696704 continue ;
697705 }
@@ -735,16 +743,18 @@ struct HfCorrelatorDsHadrons {
735743 // LOGF(info, "Mixed event collisions: Index = (%d, %d), tracks Size: (%d, %d), Z Vertex: (%f, %f), Pool Bin: (%d, %d)", c1.globalIndex(), c2.globalIndex(), tracks1.size(), tracks2.size(), c1.posZ(), c2.posZ(), corrBinning.getBin(std::make_tuple(c1.posZ(), c1.multFT0M())), corrBinning.getBin(std::make_tuple(c2.posZ(), c2.multFT0M())));
736744 int poolBin = corrBinning.getBin (std::make_tuple (c2.posZ (), c2.multFT0M ()));
737745 int poolBinDs = corrBinning.getBin (std::make_tuple (c1.posZ (), c1.multFT0M ()));
738- registry.fill (HIST (" hTracksPoolBin" ), poolBin);
739- registry.fill (HIST (" hDsPoolBin" ), poolBinDs);
746+ registry.fill (HIST (" hTracksPoolBin" ), poolBin); // note that the selections here are not yet applied
747+ registry.fill (HIST (" hDsPoolBin" ), poolBinDs); // note that the selections here are not yet applied
740748 for (const auto & [cand, pAssoc] : o2::soa::combinations (o2::soa::CombinationsFullIndexPolicy (tracks1, tracks2))) {
741749 if (!(cand.hfflag () & 1 << aod::hf_cand_3prong::DecayType::DsToKKPi)) {
742750 continue ;
743751 }
744752 if (std::abs (hfHelper.yDs (cand)) > yCandMax || cand.pt () < ptCandMin || cand.pt () > ptCandMax) {
745753 continue ;
746754 }
747-
755+ if (!pAssoc.isGlobalTrackWoDCA ()) {
756+ continue ;
757+ }
748758 // DsToKKPi and DsToPiKK division
749759 if (cand.isSelDsToKKPi () >= selectionFlagDs) {
750760 // LOGF(info, "Mixed event tracks pair: (%d, %d) from events (%d, %d), track event: (%d, %d), KKPi", cand.index(), pAssoc.index(), c1.index(), c2.index(), cand.collision().index(), pAssoc.collision().index());
@@ -802,13 +812,15 @@ struct HfCorrelatorDsHadrons {
802812 int poolBinDs = corrBinning.getBin (std::make_tuple (c1.posZ (), c1.multFT0M ()));
803813 registry.fill (HIST (" hMultFT0M" ), c1.multFT0M ());
804814 registry.fill (HIST (" hZVtx" ), c1.posZ ());
805- registry.fill (HIST (" hTracksPoolBin" ), poolBin);
806- registry.fill (HIST (" hDsPoolBin" ), poolBinDs);
815+ registry.fill (HIST (" hTracksPoolBin" ), poolBin); // note that the selections here are not yet applied
816+ registry.fill (HIST (" hDsPoolBin" ), poolBinDs); // note that the selections here are not yet applied
807817 for (const auto & [candidate, pAssoc] : o2::soa::combinations (o2::soa::CombinationsFullIndexPolicy (tracks1, tracks2))) {
808-
809818 if (std::abs (hfHelper.yDs (candidate)) > yCandMax || candidate.pt () < ptCandMin || candidate.pt () > ptCandMax) {
810819 continue ;
811820 }
821+ if (!pAssoc.isGlobalTrackWoDCA ()) {
822+ continue ;
823+ }
812824 // prompt and non-prompt division
813825 isDsPrompt = candidate.originMcRec () == RecoDecay::OriginType::Prompt;
814826 // Ds Signal
0 commit comments