@@ -137,14 +137,13 @@ struct HfTaskDeuteronFromLb {
137137
138138 qaHistos.add (" Data/hDCAxyVsPt" , " DCAxy #bar{d} vs p_{T}" , {HistType::kTH2D , {ptAxis, dcaXyAxis}});
139139 qaHistos.add (" Data/hDCAzVsPt" , " DCAz #bar{d} vs p_{T}" , {HistType::kTH2D , {ptAxis, dcaZAxis}});
140- qaHistos.add (" Data/hnSigmaTPCVsPt " , " n#sigma TPC vs p_{T} for #bar{d} hypothesis; p_{T} (GeV/c); n#sigma TPC" , {HistType::kTH2D , {ptAxis, nSigmaAxis}});
141- qaHistos.add (" Data/hnSigmaTOFVsPt " , " n#sigma TOF vs p_{T} for #bar{d} hypothesis; p_{T} (GeV/c); n#sigma TOF" , {HistType::kTH2D , {ptAxis, nSigmaAxis}});
140+ qaHistos.add (" Data/hnSigmaTPCVsPtFinalSel " , " n#sigma TPC vs p_{T} for #bar{d} hypothesis; p_{T} (GeV/c); n#sigma TPC" , {HistType::kTH2D , {ptAxis, nSigmaAxis}});
141+ qaHistos.add (" Data/hnSigmaTOFVsPtFinalSel " , " n#sigma TOF vs p_{T} for #bar{d} hypothesis; p_{T} (GeV/c); n#sigma TOF" , {HistType::kTH2D , {ptAxis, nSigmaAxis}});
142142 qaHistos.add (" Data/ptAntiDeuteron" , " ptAntiDeuteron" , {HistType::kTH1F , {ptAxis}});
143143 qaHistos.add (" Data/etaAntideuteron" , " etaAntideuteron" , {HistType::kTH1F , {{100 , -1 .0f , 1 .0f , " eta #bar{d}" }}});
144144 qaHistos.add (" Data/hVtxZ" , " Z-Vertex distribution after selection;Z (cm)" , HistType::kTH1F , {{100 , -50 , 50 }});
145- 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}});
146- qaHistos.add (" Data/hnSigmaTOFVsPtPurityVeto" , " n#sigma TOF vs p_{T} for #bar{d} hypothesis for Data-driven purity check with TPC veto for e,pi,K,p; p_{T} (GeV/c); n#sigma TOF" , {HistType::kTH2D , {ptAxis, nSigmaAxis}});
147- qaHistos.add (" Data/hnSigmaTOFVsPtPurityVetoTPCTOFClean" , " n#sigma TOF vs p_{T} for #bar{d} hypothesis for Data-driven purity check with TPC and TOF veto for e,pi,K,p; p_{T} (GeV/c); n#sigma TOF" , {HistType::kTH2D , {ptAxis, nSigmaAxis}});
145+ qaHistos.add (" Data/hnSigmaTOFVsPtPurityNoVeto" , " 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}});
146+ qaHistos.add (" Data/hnSigmaTOFVsPtPurityVeto" , " n#sigma TOF vs p_{T} for #bar{d} hypothesis for Data-driven purity check with TPC+TOF veto for e,pi,K,p; p_{T} (GeV/c); n#sigma TOF" , {HistType::kTH2D , {ptAxis, nSigmaAxis}});
148147 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}});
149148 qaHistos.add (" Data/hnSigmaITSVsPt" , " n#sigma ITS vs p_{T} for #bar{d} hypothesis, used to clean up the TPC/TOF purity sample; p_{T} (GeV/c); n#sigma ITS" , {HistType::kTH2D , {ptAxis, nSigmaAxis}});
150149 // MC generated-level histograms
@@ -325,45 +324,42 @@ struct HfTaskDeuteronFromLb {
325324
326325 qaHistos.fill (HIST (" Data/hnSigmaITSVsPt" ), track.pt (), track.itsNSigmaDe ());
327326
328- // TPC veto against pi/K/p/e
329- const bool passTPCVeto = std::abs (track.tpcNSigmaPi ()) > cfgTPCNsigma &&
330- std::abs (track.tpcNSigmaKa ()) > cfgTPCNsigma &&
331- std::abs (track.tpcNSigmaPr ()) > cfgTPCNsigma &&
332- std::abs (track.tpcNSigmaEl ()) > cfgTPCNsigma;
333- // TOF veto against pi/K/p/e
334- const bool passTOFVeto = std::abs (track.tofNSigmaPi ()) > cfgTofNsigma &&
335- std::abs (track.tofNSigmaKa ()) > cfgTofNsigma &&
336- std::abs (track.tofNSigmaPr ()) > cfgTofNsigma &&
337- std::abs (track.tofNSigmaEl ()) > cfgTofNsigma;
327+ const bool isElectron = std::abs (track.tpcNSigmaEl ()) < cfgTPCNsigma && std::abs (track.tofNSigmaEl ()) < cfgTofNsigma;
328+ const bool isNotElectron = !isElectron;
329+ const bool isPion = std::abs (track.tpcNSigmaPi ()) < cfgTPCNsigma && std::abs (track.tofNSigmaPi ()) < cfgTofNsigma;
330+ const bool isNotPion = !isPion;
331+ const bool isKaon = std::abs (track.tpcNSigmaKa ()) < cfgTPCNsigma && std::abs (track.tofNSigmaKa ()) < cfgTofNsigma;
332+ const bool isNotKaon = !isKaon;
333+ const bool isProton = std::abs (track.tpcNSigmaPr ()) < cfgTPCNsigma && std::abs (track.tofNSigmaPr ()) < cfgTofNsigma;
334+ const bool isNotProton = !isProton;
338335
339- const bool isTPCDeClean = isTPCDe && passTPCVeto ;
336+ const bool isTPCTOFDeClean = isTPCDe && isNotElectron && isNotPion && isNotKaon && isNotProton ;
340337
341338 if (track.pt () < ptThresholdforPID) {
342339 if (isITSDe) {
343340 qaHistos.fill (HIST (" Data/hnSigmaTPCVsPtPurity" ), track.pt (), track.tpcNSigmaDe ());
344341 }
345342 } else {
346343 if (isTPCDe && track.hasTOF ()) {
347- qaHistos.fill (HIST (" Data/hnSigmaTOFVsPtPurity " ), track.pt (), track.tofNSigmaDe ());
344+ qaHistos.fill (HIST (" Data/hnSigmaTOFVsPtPurityNoVeto " ), track.pt (), track.tofNSigmaDe ());
348345 }
349- if (isTPCDeClean && track.hasTOF ()) {
346+ if (isTPCTOFDeClean && track.hasTOF ()) {
350347 qaHistos.fill (HIST (" Data/hnSigmaTOFVsPtPurityVeto" ), track.pt (), track.tofNSigmaDe ());
351348 }
352- if (isTPCDeClean && passTOFVeto && track.hasTOF ()) {
353- qaHistos.fill (HIST (" Data/hnSigmaTOFVsPtPurityVetoTPCTOFClean" ), track.pt (), track.tofNSigmaDe ());
354- }
355349 }
356350
357351 const bool passFinalSel = (track.pt () < ptThresholdforPID && isTPCDe && isITSDe) ||
358- (track.pt () >= ptThresholdforPID && isTPCDeClean && passTOFVeto && isTOFDe && track.hasTOF ());
352+ (track.pt () >= ptThresholdforPID && isTPCTOFDeClean && isTOFDe && track.hasTOF ());
359353
360354 if (passFinalSel) {
361355 qaHistos.fill (HIST (" Data/ptAntiDeuteron" ), track.pt ());
362356 qaHistos.fill (HIST (" Data/etaAntideuteron" ), track.eta ());
363357 qaHistos.fill (HIST (" Data/hDCAxyVsPt" ), track.pt (), dca[0 ]);
364358 qaHistos.fill (HIST (" Data/hDCAzVsPt" ), track.pt (), dca[1 ]);
365- qaHistos.fill (HIST (" Data/hnSigmaTPCVsPt" ), track.pt (), track.tpcNSigmaDe ());
366- qaHistos.fill (HIST (" Data/hnSigmaTOFVsPt" ), track.pt (), track.tofNSigmaDe ());
359+ qaHistos.fill (HIST (" Data/hnSigmaTPCVsPtFinalSel" ), track.pt (), track.tpcNSigmaDe ());
360+ if (track.pt () >= ptThresholdforPID) {
361+ qaHistos.fill (HIST (" Data/hnSigmaTOFVsPtFinalSel" ), track.pt (), track.tofNSigmaDe ());
362+ }
367363 }
368364 }
369365 }
@@ -486,18 +482,16 @@ struct HfTaskDeuteronFromLb {
486482 }
487483 }
488484
489- // TPC veto against pi/K/p/e
490- const bool passTPCVeto = std::abs (track.tpcNSigmaPi ()) > cfgTPCNsigma &&
491- std::abs (track.tpcNSigmaKa ()) > cfgTPCNsigma &&
492- std::abs (track.tpcNSigmaPr ()) > cfgTPCNsigma &&
493- std::abs (track.tpcNSigmaEl ()) > cfgTPCNsigma;
494- // TOF veto against pi/K/p/e
495- const bool passTOFVeto = std::abs (track.tofNSigmaPi ()) > cfgTofNsigma &&
496- std::abs (track.tofNSigmaKa ()) > cfgTofNsigma &&
497- std::abs (track.tofNSigmaPr ()) > cfgTofNsigma &&
498- std::abs (track.tofNSigmaEl ()) > cfgTofNsigma;
485+ const bool isElectron = std::abs (track.tpcNSigmaEl ()) < cfgTPCNsigma && std::abs (track.tofNSigmaEl ()) < cfgTofNsigma;
486+ const bool isNotElectron = !isElectron;
487+ const bool isPion = std::abs (track.tpcNSigmaPi ()) < cfgTPCNsigma && std::abs (track.tofNSigmaPi ()) < cfgTofNsigma;
488+ const bool isNotPion = !isPion;
489+ const bool isKaon = std::abs (track.tpcNSigmaKa ()) < cfgTPCNsigma && std::abs (track.tofNSigmaKa ()) < cfgTofNsigma;
490+ const bool isNotKaon = !isKaon;
491+ const bool isProton = std::abs (track.tpcNSigmaPr ()) < cfgTPCNsigma && std::abs (track.tofNSigmaPr ()) < cfgTofNsigma;
492+ const bool isNotProton = !isProton;
499493
500- const bool isTPCDeClean = isTPCDe && passTPCVeto ;
494+ const bool isTPCTOFDeClean = isTPCDe && isNotElectron && isNotPion && isNotKaon && isNotProton ;
501495
502496 if (isTrueDeuteron) {
503497 int motherPdg = 0 ;
@@ -541,7 +535,7 @@ struct HfTaskDeuteronFromLb {
541535
542536 // same final selection as in data
543537 const bool passFinalSel = (track.pt () < ptThresholdforPID && isTPCDe && isITSDe) ||
544- (track.pt () >= ptThresholdforPID && isTPCDeClean && passTOFVeto && isTOFDe && track.hasTOF ());
538+ (track.pt () >= ptThresholdforPID && isTPCTOFDeClean && isTOFDe && track.hasTOF ());
545539 if (passFinalSel) {
546540 if (motherPdg == pdgCodeBeautyMeson) {
547541 qaHistos.fill (HIST (" MCReco/hDCAxyVsPtDeFromBminus" ), track.pt (), dca[0 ]);
0 commit comments