@@ -68,7 +68,6 @@ struct HfTaskDeuteronFromLb {
6868 Configurable<float > cfgMinPt{" cfgMinPt" , 0 .5f , " Minimum pT cut" };
6969 Configurable<float > cfgTPCNsigma{" cfgTPCNsigma" , 3 .0f , " TPC n sigma for deuteron PID" };
7070 Configurable<float > cfgTofNsigma{" cfgTofNsigma" , 3 .0f , " TOF n sigma for deuteron PID" };
71- Configurable<float > ptThresholdPid{" ptThresholdPid" , 0 .5f , " pT threshold to switch between TPC and TPC+TOF PID" };
7271 Configurable<float > cfgDCAmin{" cfgDCAmin" , 0 .05f , " Minimum DCA for deuteron PID" };
7372 Configurable<float > cfgDCAmax{" cfgDCAmax" , 1000 .0f , " Maximum DCA for deuteron PID" };
7473 Configurable<float > rapidityCut{" rapidityCut" , 0 .5f , " Rapidity cut" };
@@ -84,7 +83,7 @@ struct HfTaskDeuteronFromLb {
8483 framework::Service<ccdb::BasicCCDBManager> ccdb{};
8584
8685 using CollisionCandidates = o2::soa::Join<o2::aod::Collisions, o2::aod::EvSels>;
87- using MCTrackCandidates = o2::soa::Join<o2::aod::TracksIU, o2::aod::TracksExtra, o2::aod::TracksDCA, o2::aod::McTrackLabels>;
86+ using MCTrackCandidates = o2::soa::Join<o2::aod::TracksIU, o2::aod::TracksExtra, o2::aod::TracksDCA, o2::aod::McTrackLabels, o2::aod::pidTPCFullDe, o2::aod::pidTOFFullDe >;
8887 using MCCollisionCandidates = o2::soa::Join<o2::aod::Collisions, o2::aod::EvSels, o2::aod::McCollisionLabels>;
8988 using TrackCandidates = o2::soa::Join<o2::aod::Tracks, o2::aod::TracksCov, o2::aod::TracksExtra, o2::aod::TracksDCA, o2::aod::TrackSelection, o2::aod::pidTPCFullDe, o2::aod::pidTOFFullDe>;
9089
@@ -154,13 +153,28 @@ struct HfTaskDeuteronFromLb {
154153 qaHistos.add (" MCReco/ptAntiDeuteronFromAntiLambdaB" ,
155154 " p_{T} #bar{d} from #bar{#Lambda}_{b} reco/MC anchored;p_{T} (GeV/c);Counts" ,
156155 HistType::kTH1F , {ptAxis});
156+ qaHistos.add (
157+ " MCReco/ptAntiDeuteronPrimary" ,
158+ " p_{T} #bar{d} primary reco/MC anchored;p_{T} (GeV/c);Counts" ,
159+ HistType::kTH1F ,
160+ {ptAxis});
157161 qaHistos.add (" MCGen/ptAntiDeuteronFromBminus" , " p_{T} #bar{d} from B^{-} gen;p_{T} (GeV/c);Counts" , HistType::kTH1F , {ptAxis});
158162 qaHistos.add (" MCGen/ptAntiDeuteronFromAntiLambdaB" , " p_{T} #bar{d} from #bar{#Lambda}_{b} gen;p_{T} (GeV/c);Counts" , HistType::kTH1F , {ptAxis});
159163 qaHistos.add (" MCReco/hDCAxy-Primary" , " DCAxy primary reco/MC anchored;DCA xy (cm);Counts" , {HistType::kTH1D , {{400 , -0 .2f , 0 .2f , " DCA xy (cm)" }}});
160164 qaHistos.add (" MCReco/hDCAxy-FromBeautyHadron" , " DCAxy from beauty reco/MC anchored;DCA xy (cm);Counts" , {HistType::kTH1D , {{400 , -0 .2f , 0 .2f , " DCA xy (cm)" }}});
161165 qaHistos.add (" MCReco/hMotherPdgCode" , " PDG code of mother, reco/MC anchored;PDG code;Counts" , HistType::kTH1I , {{12000 , -6000 , 6000 }});
162166 qaHistos.add (" MCReco/ctauBminus" , " ctau of B^{-}, reco/MC anchored;ctau (#mu m);Counts" , HistType::kTH1F , {{25 , 0 ., 2000 .f }});
163167 qaHistos.add (" MCReco/ctauAntiLambdaB" , " ctau of #bar{#Lambda}_{b}, reco/MC anchored;ctau (#mu m);Counts" , HistType::kTH1F , {{25 , 0 ., 2000 .f }});
168+ qaHistos.add (" MCReco/ptAntiDeuteronPIDSelected" , " p_{T} #bar{d} reco/MC anchored PID selection;p_{T} (GeV/c);Counts" , HistType::kTH1F , {ptAxis});
169+ qaHistos.add (" MCReco/ptAntiDeuteronPIDSelectedTrue" , " p_{T} #bar{d} reco/MC anchored PID and PDG;p_{T} (GeV/c);Counts" , HistType::kTH1F , {ptAxis});
170+ qaHistos.add (" MCReco/hnSigmaTPCVsPt" , " n#sigma TPC vs p_{T} for #bar{d} hypothesis for MC; p_{T} (GeV/c); n#sigma TPC" , {HistType::kTH2D , {ptAxis, nSigmaAxis}});
171+ qaHistos.add (" MCReco/hnSigmaTOFVsPt" , " n#sigma TOF vs p_{T} for #bar{d} hypothesis for MC; p_{T} (GeV/c); n#sigma TOF" , {HistType::kTH2D , {ptAxis, nSigmaAxis}});
172+ qaHistos.add (" Data/hnSigmaTOFVsPtPurity" , " n#sigma TOF vs p_{T} for #bar{d} hypothesis for Data-driven purity check; p_{T} (GeV/c); n#sigma TOF" , {HistType::kTH2D , {ptAxis, nSigmaAxis}});
173+ qaHistos.add (" Data/hnSigmaTPCVsPtPurity" , " n#sigma TPC vs p_{T} for #bar{d} hypothesis for Data-driven purity check; p_{T} (GeV/c); n#sigma TPC" , {HistType::kTH2D , {ptAxis, nSigmaAxis}});
174+ qaHistos.add (" MCReco/ptAntiDeuteronTPCOnlyPIDSelected" , " p_{T} #bar{d} reco/MC anchored TPC only PID selection;p_{T} (GeV/c);Counts" , HistType::kTH1F , {ptAxis});
175+ qaHistos.add (" MCReco/ptAntiDeuteronTPCOnlyPIDSelectedTrue" , " p_{T} #bar{d} reco/MC anchored TPC only PID and PDG;p_{T} (GeV/c);Counts" , HistType::kTH1F , {ptAxis});
176+ qaHistos.add (" MCReco/ptAntiDeuteronTPCorTPCTOFPIDSelected" , " p_{T} #bar{d} reco/MC anchored TPC or TPC+TOF PID selection;p_{T} (GeV/c);Counts" , HistType::kTH1F , {ptAxis});
177+ qaHistos.add (" MCReco/ptAntiDeuteronTPCorTPCTOFPIDSelectedTrue" , " p_{T} #bar{d} reco/MC anchored TPC or TPC+TOF PID and PDG;p_{T} (GeV/c);Counts" , HistType::kTH1F , {ptAxis});
164178
165179 hProcessedEvents->GetXaxis ()->SetBinLabel (1 , " Events processed" );
166180 hProcessedEvents->GetXaxis ()->SetBinLabel (2 , " ZORRO" );
@@ -193,9 +207,6 @@ struct HfTaskDeuteronFromLb {
193207 if (!track.hasTPC ()) {
194208 return false ;
195209 }
196- if (!track.hasTOF ()) {
197- return false ;
198- }
199210 if (track.tpcNClsFound () < cfgTPCNclsFound) {
200211 return false ;
201212 }
@@ -274,24 +285,20 @@ struct HfTaskDeuteronFromLb {
274285 const bool isTPCDe = std::abs (track.tpcNSigmaDe ()) < cfgTPCNsigma;
275286 const bool isTOFDe = std::abs (track.tofNSigmaDe ()) < cfgTofNsigma;
276287
277- if (track.pt () < ptThresholdPid) {
278- if (isTPCDe) {
279- qaHistos.fill (HIST (" Data/ptAntiDeuteron" ), track.pt ());
280- qaHistos.fill (HIST (" Data/etaAntideuteron" ), track.eta ());
281- qaHistos.fill (HIST (" Data/hDCAxyVsPt" ), track.pt (), dca[0 ]);
282- qaHistos.fill (HIST (" Data/hDCAzVsPt" ), track.pt (), dca[1 ]);
283- qaHistos.fill (HIST (" Data/hnSigmaTPCVsPt" ), track.pt (), track.tpcNSigmaDe ());
284- qaHistos.fill (HIST (" Data/hnSigmaTOFVsPt" ), track.pt (), track.tofNSigmaDe ());
285- }
286- } else {
287- if (isTPCDe && isTOFDe) {
288- qaHistos.fill (HIST (" Data/ptAntiDeuteron" ), track.pt ());
289- qaHistos.fill (HIST (" Data/etaAntideuteron" ), track.eta ());
290- qaHistos.fill (HIST (" Data/hDCAxyVsPt" ), track.pt (), dca[0 ]);
291- qaHistos.fill (HIST (" Data/hDCAzVsPt" ), track.pt (), dca[1 ]);
292- qaHistos.fill (HIST (" Data/hnSigmaTPCVsPt" ), track.pt (), track.tpcNSigmaDe ());
293- qaHistos.fill (HIST (" Data/hnSigmaTOFVsPt" ), track.pt (), track.tofNSigmaDe ());
294- }
288+ if (isTPCDe && track.hasTOF ()) {
289+ qaHistos.fill (HIST (" Data/hnSigmaTOFVsPtPurity" ), track.pt (), track.tofNSigmaDe ());
290+ }
291+ if (isTOFDe && track.hasTOF ()) {
292+ qaHistos.fill (HIST (" Data/hnSigmaTPCVsPtPurity" ), track.pt (), track.tpcNSigmaDe ());
293+ }
294+
295+ if (isTPCDe && isTOFDe && track.hasTOF ()) {
296+ qaHistos.fill (HIST (" Data/ptAntiDeuteron" ), track.pt ());
297+ qaHistos.fill (HIST (" Data/etaAntideuteron" ), track.eta ());
298+ qaHistos.fill (HIST (" Data/hDCAxyVsPt" ), track.pt (), dca[0 ]);
299+ qaHistos.fill (HIST (" Data/hDCAzVsPt" ), track.pt (), dca[1 ]);
300+ qaHistos.fill (HIST (" Data/hnSigmaTPCVsPt" ), track.pt (), track.tpcNSigmaDe ());
301+ qaHistos.fill (HIST (" Data/hnSigmaTOFVsPt" ), track.pt (), track.tofNSigmaDe ());
295302 }
296303 }
297304 }
@@ -313,7 +320,40 @@ struct HfTaskDeuteronFromLb {
313320 }
314321
315322 auto mcParticle = track.mcParticle ();
316- if (mcParticle.pdgCode () == pdgCodeDaughter) {
323+ const bool isTrueDeuteron = (mcParticle.pdgCode () == pdgCodeDaughter);
324+ const bool isTPCDe = std::abs (track.tpcNSigmaDe ()) < cfgTPCNsigma;
325+ const bool isTOFDe = std::abs (track.tofNSigmaDe ()) < cfgTofNsigma;
326+ const bool selTpcOrTpcTof = isTPCDe && (!track.hasTOF () || isTOFDe);
327+
328+ if (isTPCDe) {
329+ qaHistos.fill (HIST (" MCReco/ptAntiDeuteronTPCOnlyPIDSelected" ), track.pt ());
330+ if (isTrueDeuteron) {
331+ qaHistos.fill (HIST (" MCReco/ptAntiDeuteronTPCOnlyPIDSelectedTrue" ), track.pt ());
332+ }
333+ }
334+
335+ if (track.hasTOF ()) {
336+ qaHistos.fill (HIST (" MCReco/hnSigmaTPCVsPt" ), track.pt (), track.tpcNSigmaDe ());
337+ qaHistos.fill (HIST (" MCReco/hnSigmaTOFVsPt" ), track.pt (), track.tofNSigmaDe ());
338+ }
339+
340+ if (selTpcOrTpcTof) {
341+ qaHistos.fill (HIST (" MCReco/ptAntiDeuteronTPCorTPCTOFPIDSelected" ), track.pt ());
342+ if (isTrueDeuteron) {
343+ qaHistos.fill (HIST (" MCReco/ptAntiDeuteronTPCorTPCTOFPIDSelectedTrue" ), track.pt ());
344+ }
345+ }
346+
347+ if (isTPCDe && isTOFDe && track.hasTOF ()) {
348+ qaHistos.fill (HIST (" MCReco/ptAntiDeuteronPIDSelected" ), track.pt ());
349+ if (isTrueDeuteron) {
350+ qaHistos.fill (HIST (" MCReco/ptAntiDeuteronPIDSelectedTrue" ), track.pt ());
351+ }
352+ } else {
353+ continue ;
354+ }
355+
356+ if (isTrueDeuteron) {
317357 if (std::abs (mcParticle.y ()) > rapidityCut) {
318358 continue ;
319359 }
0 commit comments