Skip to content

Commit a1e75aa

Browse files
MRazza879Marta Razza
andauthored
[PWGHF] Add MC collision matching checks for tracks (#18348)
Co-authored-by: Marta Razza <marta.razza@cern.ch>
1 parent fa6a42e commit a1e75aa

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

‎PWGHF/D2H/Tasks/taskDeuteronFromLb.cxx‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,10 @@ struct HfTaskDeuteronFromLb {
167167
qaHistos.add("MCReco/hDCAzVsPtDeFromBminus", "DCAz #bar{d} from B^{-} vs p_{T};p_{T} (GeV/c);DCA_{z} (cm)", {HistType::kTH2D, {ptAxis, dcaZAxis}});
168168
qaHistos.add("MCReco/hDCAzVsPtDeFromAntiLambdaB", "DCAz #bar{d} from #bar{#Lambda}_{b} vs p_{T};p_{T} (GeV/c);DCA_{z} (cm)", {HistType::kTH2D, {ptAxis, dcaZAxis}});
169169
qaHistos.add("MCReco/hDCAzVsPtDePrimary", "DCAz #bar{d} primary vs p_{T};p_{T} (GeV/c);DCA_{z} (cm)", {HistType::kTH2D, {ptAxis, dcaZAxis}});
170+
qaHistos.add("MCReco/hDCAxyVsPtDeFromBminusSameMC", "DCAxy from B^{-}, same MC collision", {HistType::kTH2D, {ptAxis, dcaXyAxis}});
171+
qaHistos.add("MCReco/hDCAxyVsPtDeFromAntiLambdaBSameMC", "DCAxy from anti-Lambda_b, same MC collision", {HistType::kTH2D, {ptAxis, dcaXyAxis}});
172+
qaHistos.add("MCReco/hDCAxyVsPtDeFromAntiHypertritonSameMC", "DCAxy from anti-hypertriton, same MC collision", {HistType::kTH2D, {ptAxis, dcaXyAxis}});
173+
qaHistos.add("MCReco/hDCAxyVsPtDePrimarySameMC", "DCAxy primary, same MC collision", {HistType::kTH2D, {ptAxis, dcaXyAxis}});
170174
qaHistos.add("MCReco/ptAntiDeuteronFromBminus", "p_{T} #bar{d} from B^{-} reco/MC anchored;p_{T} (GeV/c);Counts", HistType::kTH1F, {ptAxis});
171175
qaHistos.add("MCReco/ptAntiDeuteronFromAntiLambdaB", "p_{T} #bar{d} from #bar{#Lambda}_{b} reco/MC anchored;p_{T} (GeV/c);Counts", HistType::kTH1F, {ptAxis});
172176
qaHistos.add("MCReco/ptAntiDeuteronPrimary", "p_{T} #bar{d} primary reco/MC anchored;p_{T} (GeV/c);Counts", HistType::kTH1F, {ptAxis});
@@ -454,6 +458,7 @@ struct HfTaskDeuteronFromLb {
454458
}
455459

456460
auto mcParticle = track.mcParticle();
461+
const bool isSameMcCollision = collision.has_mcCollision() && (mcParticle.mcCollisionId() == collision.mcCollisionId());
457462
const bool isTrueDeuteron = (mcParticle.pdgCode() == pdgCodeDaughter);
458463
const bool isTPCDe = std::abs(track.tpcNSigmaDe()) < cfgTPCNsigma;
459464
const bool isTOFDe = std::abs(track.tofNSigmaDe()) < cfgTofNsigma;
@@ -539,23 +544,35 @@ struct HfTaskDeuteronFromLb {
539544
if (passFinalSel) {
540545
if (motherPdg == pdgCodeBeautyMeson) {
541546
qaHistos.fill(HIST("MCReco/hDCAxyVsPtDeFromBminus"), track.pt(), dca[0]);
547+
if (isSameMcCollision) {
548+
qaHistos.fill(HIST("MCReco/hDCAxyVsPtDeFromBminusSameMC"), track.pt(), dca[0]);
549+
}
542550
qaHistos.fill(HIST("MCReco/hDCAzVsPtDeFromBminus"), track.pt(), dca[1]);
543551
qaHistos.fill(HIST("MCReco/hDCAxy-FromBMeson"), dca[0]);
544552
qaHistos.fill(HIST("MCReco/ptAntiDeuteronFromBminus"), track.pt());
545553
} else if (motherPdg == pdgCodeBeautyBaryon) {
546554
qaHistos.fill(HIST("MCReco/hDCAxyVsPtDeFromAntiLambdaB"), track.pt(), dca[0]);
555+
if (isSameMcCollision) {
556+
qaHistos.fill(HIST("MCReco/hDCAxyVsPtDeFromAntiLambdaBSameMC"), track.pt(), dca[0]);
557+
}
547558
qaHistos.fill(HIST("MCReco/hDCAzVsPtDeFromAntiLambdaB"), track.pt(), dca[1]);
548559
qaHistos.fill(HIST("MCReco/hDCAxy-FromAntiLambdaB"), dca[0]);
549560
qaHistos.fill(HIST("MCReco/ptAntiDeuteronFromAntiLambdaB"), track.pt());
550561
} else if (motherPdg == pdgCodeHypertriton) {
551562
qaHistos.fill(HIST("MCReco/hDCAxyVsPtDeFromAntiHypertriton"), track.pt(), dca[0]);
563+
if (isSameMcCollision) {
564+
qaHistos.fill(HIST("MCReco/hDCAxyVsPtDeFromAntiHypertritonSameMC"), track.pt(), dca[0]);
565+
}
552566
qaHistos.fill(HIST("MCReco/hDCAzVsPtDeFromAntiHypertriton"), track.pt(), dca[1]);
553567
qaHistos.fill(HIST("MCReco/hDCAxy-FromAntiHypertriton"), dca[0]);
554568
qaHistos.fill(HIST("MCReco/ptAntiDeuteronFromAntiHypertriton"), track.pt());
555569
} else if (mcParticle.isPhysicalPrimary()) {
556570
qaHistos.fill(HIST("MCReco/hDCAxyVsPtDePrimary"), track.pt(), dca[0]);
557571
qaHistos.fill(HIST("MCReco/hDCAzVsPtDePrimary"), track.pt(), dca[1]);
558572
qaHistos.fill(HIST("MCReco/hDCAxy-Primary"), dca[0]);
573+
if (isSameMcCollision) {
574+
qaHistos.fill(HIST("MCReco/hDCAxyVsPtDePrimarySameMC"), track.pt(), dca[0]);
575+
}
559576
qaHistos.fill(HIST("MCReco/ptAntiDeuteronPrimary"), track.pt());
560577
}
561578
}

0 commit comments

Comments
 (0)