2020#include " Common/Core/trackUtilities.h"
2121#include " Common/DataModel/CollisionAssociationTables.h"
2222#include " Common/DataModel/EventSelection.h"
23+ #include " Common/DataModel/PIDResponseITS.h"
2324#include " Common/DataModel/PIDResponseTOF.h"
2425#include " Common/DataModel/PIDResponseTPC.h"
2526#include " Common/DataModel/TrackSelectionTables.h"
@@ -68,6 +69,7 @@ struct HfTaskDeuteronFromLb {
6869 Configurable<float > cfgMinPt{" cfgMinPt" , 0 .5f , " Minimum pT cut" };
6970 Configurable<float > cfgTPCNsigma{" cfgTPCNsigma" , 3 .0f , " TPC n sigma for deuteron PID" };
7071 Configurable<float > cfgTofNsigma{" cfgTofNsigma" , 3 .0f , " TOF n sigma for deuteron PID" };
72+ Configurable<float > cfgITSNsigma{" cfgITSNsigma" , -2 .0f , " ITS n sigma for deuteron PID" };
7173 Configurable<float > cfgDCAmin{" cfgDCAmin" , 0 .05f , " Minimum DCA for deuteron PID" };
7274 Configurable<float > cfgDCAmax{" cfgDCAmax" , 1000 .0f , " Maximum DCA for deuteron PID" };
7375 Configurable<float > rapidityCut{" rapidityCut" , 0 .5f , " Rapidity cut" };
@@ -138,6 +140,7 @@ struct HfTaskDeuteronFromLb {
138140 qaHistos.add (" Data/hVtxZ" , " Z-Vertex distribution after selection;Z (cm)" , HistType::kTH1F , {{100 , -50 , 50 }});
139141 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}});
140142 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}});
143+ 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}});
141144 // MC generated-level histograms
142145 qaHistos.add (" MCGen/ptGeneratedBminus" , " p_{T} generated B^{-};p_{T} (GeV/c);Counts" , HistType::kTH1F , {ptAxis});
143146 qaHistos.add (" MCGen/ptGeneratedAntiLambdaB" , " p_{T} generated #bar{#Lambda}_{b};p_{T} (GeV/c);Counts" , HistType::kTH1F , {ptAxis});
@@ -267,9 +270,10 @@ struct HfTaskDeuteronFromLb {
267270 qaHistos.fill (HIST (" Data/hVtxZ" ), collision.posZ ());
268271
269272 const auto & trackIdsThisCollision = trackIndices.sliceBy (trackIndicesPerCollision, collision.globalIndex ());
273+ auto tracksWithItsPid = o2::soa::Attach<TrackCandidates, o2::aod::pidits::ITSNSigmaDe>(tracks);
270274
271275 for (const auto & trackId : trackIdsThisCollision) {
272- const auto & track = tracks .rawIteratorAt (trackId.trackId ());
276+ const auto & track = tracksWithItsPid .rawIteratorAt (trackId.trackId ());
273277 std::array<float , 2 > dca{track.dcaXY (), track.dcaZ ()};
274278
275279 if (track.collisionId () != collision.globalIndex ()) {
@@ -287,16 +291,21 @@ struct HfTaskDeuteronFromLb {
287291
288292 const bool isTPCDe = std::abs (track.tpcNSigmaDe ()) < cfgTPCNsigma;
289293 const bool isTOFDe = std::abs (track.tofNSigmaDe ()) < cfgTofNsigma;
294+ const bool isITSDe = track.itsNSigmaDe () > cfgITSNsigma;
295+
296+ qaHistos.fill (HIST (" Data/hnSigmaITSVsPt" ), track.pt (), track.itsNSigmaDe ());
290297
291298 if (track.pt () < ptThresholdforPID) {
292- qaHistos.fill (HIST (" Data/hnSigmaTPCVsPtPurity" ), track.pt (), track.tpcNSigmaDe ());
299+ if (isITSDe) {
300+ qaHistos.fill (HIST (" Data/hnSigmaTPCVsPtPurity" ), track.pt (), track.tpcNSigmaDe ());
301+ }
293302 } else {
294303 if (isTPCDe && track.hasTOF ()) {
295304 qaHistos.fill (HIST (" Data/hnSigmaTOFVsPtPurity" ), track.pt (), track.tofNSigmaDe ());
296305 }
297306 }
298307
299- if (track.pt () < ptThresholdforPID && isTPCDe) {
308+ if (track.pt () < ptThresholdforPID && isTPCDe && isITSDe ) {
300309 qaHistos.fill (HIST (" Data/ptAntiDeuteron" ), track.pt ());
301310 qaHistos.fill (HIST (" Data/etaAntideuteron" ), track.eta ());
302311 qaHistos.fill (HIST (" Data/hDCAxyVsPt" ), track.pt (), dca[0 ]);
0 commit comments