Skip to content

Commit 9eccb04

Browse files
authored
[PWGEM/Dilepton] add QA histograms for fwd DCA (#14456)
1 parent 44745a4 commit 9eccb04

File tree

2 files changed

+28
-16
lines changed

2 files changed

+28
-16
lines changed

PWGEM/Dilepton/Core/SingleTrackQC.h

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,8 @@ struct SingleTrackQC {
301301
fRegistry.add("Track/positive/hDCAxRes_Pt", "DCA_{x} resolution vs. pT;p_{T} (GeV/c);DCA_{x} resolution (#mum)", kTH2F, {{200, 0, 10}, {500, 0, 500}}, false);
302302
fRegistry.add("Track/positive/hDCAyRes_Pt", "DCA_{y} resolution vs. pT;p_{T} (GeV/c);DCA_{y} resolution (#mum)", kTH2F, {{200, 0, 10}, {500, 0, 500}}, false);
303303
fRegistry.add("Track/positive/hDCAxyRes_Pt", "DCA_{xy} resolution vs. pT;p_{T} (GeV/c);DCA_{xy} resolution (#mum)", kTH2F, {{200, 0, 10}, {500, 0, 500}}, false);
304+
fRegistry.add("Track/positive/hDCAx_PosZ", "DCAx vs. posZ;Z_{vtx} (cm);DCA_{x} (cm)", kTH2F, {{200, -10, +10}, {200, -1, +1}}, false);
305+
fRegistry.add("Track/positive/hDCAy_PosZ", "DCAy vs. posZ;Z_{vtx} (cm);DCA_{y} (cm)", kTH2F, {{200, -10, +10}, {200, -1, +1}}, false);
304306
fRegistry.add("Track/positive/hNclsMCH", "number of MCH clusters", kTH1F, {{21, -0.5, 20.5}}, false);
305307
fRegistry.add("Track/positive/hNclsMFT", "number of MFT clusters", kTH1F, {{11, -0.5, 10.5}}, false);
306308
fRegistry.add("Track/positive/hPDCA", "pDCA;R at absorber end (cm);p #times DCA (GeV/c #upoint cm)", kTH2F, {{100, 0, 100}, {100, 0.0f, 1000}}, false);
@@ -608,8 +610,8 @@ struct SingleTrackQC {
608610
}
609611
}
610612

611-
template <typename TTrack>
612-
void fillMuonInfo(TTrack const& track)
613+
template <typename TTrack, typename TCollision>
614+
void fillMuonInfo(TTrack const& track, TCollision const& collision)
613615
{
614616
float weight = 1.f;
615617
if (cfgApplyWeightTTCA) {
@@ -633,6 +635,8 @@ struct SingleTrackQC {
633635
fRegistry.fill(HIST("Track/positive/hDCAxRes_Pt"), track.pt(), std::sqrt(track.cXXatDCA()) * 1e+4);
634636
fRegistry.fill(HIST("Track/positive/hDCAyRes_Pt"), track.pt(), std::sqrt(track.cYYatDCA()) * 1e+4);
635637
fRegistry.fill(HIST("Track/positive/hDCAxyRes_Pt"), track.pt(), sigmaFwdDcaXY(track) * 1e+4);
638+
fRegistry.fill(HIST("Track/positive/hDCAx_PosZ"), collision.posZ(), track.fwdDcaX());
639+
fRegistry.fill(HIST("Track/positive/hDCAy_PosZ"), collision.posZ(), track.fwdDcaY());
636640
fRegistry.fill(HIST("Track/positive/hNclsMCH"), track.nClusters());
637641
fRegistry.fill(HIST("Track/positive/hNclsMFT"), track.nClustersMFT());
638642
fRegistry.fill(HIST("Track/positive/hPDCA"), track.rAtAbsorberEnd(), track.pDca());
@@ -652,6 +656,8 @@ struct SingleTrackQC {
652656
fRegistry.fill(HIST("Track/negative/hDCAxRes_Pt"), track.pt(), std::sqrt(track.cXXatDCA()) * 1e+4);
653657
fRegistry.fill(HIST("Track/negative/hDCAyRes_Pt"), track.pt(), std::sqrt(track.cYYatDCA()) * 1e+4);
654658
fRegistry.fill(HIST("Track/negative/hDCAxyRes_Pt"), track.pt(), sigmaFwdDcaXY(track) * 1e+4);
659+
fRegistry.fill(HIST("Track/negative/hDCAx_PosZ"), collision.posZ(), track.fwdDcaX());
660+
fRegistry.fill(HIST("Track/negative/hDCAy_PosZ"), collision.posZ(), track.fwdDcaY());
655661
fRegistry.fill(HIST("Track/negative/hNclsMCH"), track.nClusters());
656662
fRegistry.fill(HIST("Track/negative/hNclsMFT"), track.nClustersMFT());
657663
fRegistry.fill(HIST("Track/negative/hPDCA"), track.rAtAbsorberEnd(), track.pDca());
@@ -715,7 +721,7 @@ struct SingleTrackQC {
715721
continue;
716722
}
717723

718-
fillMuonInfo(track);
724+
fillMuonInfo(track, collision);
719725
} // end of track loop
720726
}
721727
} // end of collision loop

PWGEM/Dilepton/Core/SingleTrackQCMC.h

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,8 @@ struct SingleTrackQCMC {
351351
fRegistry.add("Track/PromptLF/positive/hDCAxRes_Pt", "DCA_{x} resolution vs. pT;p_{T} (GeV/c);DCA_{x} resolution (#mum)", kTH2F, {{200, 0, 10}, {500, 0, 500}}, false);
352352
fRegistry.add("Track/PromptLF/positive/hDCAyRes_Pt", "DCA_{y} resolution vs. pT;p_{T} (GeV/c);DCA_{y} resolution (#mum)", kTH2F, {{200, 0, 10}, {500, 0, 500}}, false);
353353
fRegistry.add("Track/PromptLF/positive/hDCAxyRes_Pt", "DCA_{xy} resolution vs. pT;p_{T} (GeV/c);DCA_{xy} resolution (#mum)", kTH2F, {{200, 0, 10}, {500, 0, 500}}, false);
354+
fRegistry.add("Track/PromptLF/positive/hDCAx_PosZ", "DCA_{x} vs. posZ;Z_{vtx} (cm);DCA_{x} (cm)", kTH2F, {{200, -10, 10}, {200, -1, +1}}, false);
355+
fRegistry.add("Track/PromptLF/positive/hDCAy_PosZ", "DCA_{y} vs. posZ;Z_{vtx} (cm);DCA_{y} (cm)", kTH2F, {{200, -10, 10}, {200, -1, +1}}, false);
354356
fRegistry.add("Track/PromptLF/positive/hNclsMCH", "number of MCH clusters", kTH1F, {{21, -0.5, 20.5}}, false);
355357
fRegistry.add("Track/PromptLF/positive/hNclsMFT", "number of MFT clusters", kTH1F, {{11, -0.5, 10.5}}, false);
356358
fRegistry.add("Track/PromptLF/positive/hPDCA", "pDCA;R at absorber (cm);p #times DCA (GeV/c #upoint cm)", kTH2F, {{100, 0, 100}, {100, 0.0f, 1000}}, false);
@@ -614,13 +616,13 @@ struct SingleTrackQCMC {
614616
}
615617
}
616618

617-
template <int lepton_source_id, typename TMCParticles, typename TTrack>
618-
void fillTrackInfo(TTrack const& track)
619+
template <int lepton_source_id, typename TMCParticles, typename TTrack, typename TCollision>
620+
void fillTrackInfo(TTrack const& track, TCollision const& collision)
619621
{
620622
if constexpr (pairtype == o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType::kDielectron) {
621623
fillElectronInfo<lepton_source_id, TMCParticles>(track);
622624
} else if constexpr (pairtype == o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType::kDimuon) {
623-
fillMuonInfo<lepton_source_id, TMCParticles>(track);
625+
fillMuonInfo<lepton_source_id, TMCParticles>(track, collision);
624626
}
625627
}
626628

@@ -734,8 +736,8 @@ struct SingleTrackQCMC {
734736
}
735737
}
736738

737-
template <int lepton_source_id, typename TMCParticles, typename TTrack>
738-
void fillMuonInfo(TTrack const& track)
739+
template <int lepton_source_id, typename TMCParticles, typename TTrack, typename TCollision>
740+
void fillMuonInfo(TTrack const& track, TCollision const& collision)
739741
{
740742
auto mctrack = track.template emmcparticle_as<TMCParticles>();
741743
float dca_xy = fwdDcaXYinSigma(track);
@@ -765,6 +767,8 @@ struct SingleTrackQCMC {
765767
fRegistry.fill(HIST("Track/") + HIST(lepton_source_types[lepton_source_id]) + HIST("positive/hDCAxRes_Pt"), track.pt(), std::sqrt(track.cXXatDCA()) * 1e+4);
766768
fRegistry.fill(HIST("Track/") + HIST(lepton_source_types[lepton_source_id]) + HIST("positive/hDCAyRes_Pt"), track.pt(), std::sqrt(track.cYYatDCA()) * 1e+4);
767769
fRegistry.fill(HIST("Track/") + HIST(lepton_source_types[lepton_source_id]) + HIST("positive/hDCAxyRes_Pt"), track.pt(), sigmaFwdDcaXY(track) * 1e+4);
770+
fRegistry.fill(HIST("Track/") + HIST(lepton_source_types[lepton_source_id]) + HIST("positive/hDCAx_PosZ"), collision.posZ(), track.fwdDcaX());
771+
fRegistry.fill(HIST("Track/") + HIST(lepton_source_types[lepton_source_id]) + HIST("positive/hDCAy_PosZ"), collision.posZ(), track.fwdDcaY());
768772
fRegistry.fill(HIST("Track/") + HIST(lepton_source_types[lepton_source_id]) + HIST("positive/hNclsMCH"), track.nClusters());
769773
fRegistry.fill(HIST("Track/") + HIST(lepton_source_types[lepton_source_id]) + HIST("positive/hNclsMFT"), track.nClustersMFT());
770774
fRegistry.fill(HIST("Track/") + HIST(lepton_source_types[lepton_source_id]) + HIST("positive/hPDCA"), track.rAtAbsorberEnd(), track.pDca());
@@ -793,6 +797,8 @@ struct SingleTrackQCMC {
793797
fRegistry.fill(HIST("Track/") + HIST(lepton_source_types[lepton_source_id]) + HIST("negative/hDCAxRes_Pt"), track.pt(), std::sqrt(track.cXXatDCA()) * 1e+4);
794798
fRegistry.fill(HIST("Track/") + HIST(lepton_source_types[lepton_source_id]) + HIST("negative/hDCAyRes_Pt"), track.pt(), std::sqrt(track.cYYatDCA()) * 1e+4);
795799
fRegistry.fill(HIST("Track/") + HIST(lepton_source_types[lepton_source_id]) + HIST("negative/hDCAxyRes_Pt"), track.pt(), sigmaFwdDcaXY(track) * 1e+4);
800+
fRegistry.fill(HIST("Track/") + HIST(lepton_source_types[lepton_source_id]) + HIST("negative/hDCAx_PosZ"), collision.posZ(), track.fwdDcaX());
801+
fRegistry.fill(HIST("Track/") + HIST(lepton_source_types[lepton_source_id]) + HIST("negative/hDCAy_PosZ"), collision.posZ(), track.fwdDcaY());
796802
fRegistry.fill(HIST("Track/") + HIST(lepton_source_types[lepton_source_id]) + HIST("negative/hNclsMCH"), track.nClusters());
797803
fRegistry.fill(HIST("Track/") + HIST(lepton_source_types[lepton_source_id]) + HIST("negative/hNclsMFT"), track.nClustersMFT());
798804
fRegistry.fill(HIST("Track/") + HIST(lepton_source_types[lepton_source_id]) + HIST("negative/hPDCA"), track.rAtAbsorberEnd(), track.pDca());
@@ -881,28 +887,28 @@ struct SingleTrackQCMC {
881887
if (mctrack.isPhysicalPrimary() || mctrack.producedByGenerator()) {
882888
if (pdg_mother == 111 || pdg_mother == 221 || pdg_mother == 331 || pdg_mother == 113 || pdg_mother == 223 || pdg_mother == 333) {
883889
if (IsFromCharm(mcmother, mcparticles) < 0 && IsFromBeauty(mcmother, mcparticles) < 0) {
884-
fillTrackInfo<0, TMCParticles>(track); // PromptLF
890+
fillTrackInfo<0, TMCParticles>(track, collision); // PromptLF
885891
} else {
886-
fillTrackInfo<1, TMCParticles>(track); // NonPromptLF
892+
fillTrackInfo<1, TMCParticles>(track, collision); // NonPromptLF
887893
}
888894
} else if (pdg_mother == 443) {
889895
if (IsFromBeauty(mcmother, mcparticles) > 0) { // b is found in full decay chain.
890-
fillTrackInfo<4, TMCParticles>(track);
896+
fillTrackInfo<4, TMCParticles>(track, collision);
891897
} else {
892-
fillTrackInfo<3, TMCParticles>(track);
898+
fillTrackInfo<3, TMCParticles>(track, collision);
893899
}
894900
} else if (isWeakDecayFromBeautyHadron(mctrack, mcparticles)) { // hb->l is found in full decay chain.
895-
fillTrackInfo<6, TMCParticles>(track);
901+
fillTrackInfo<6, TMCParticles>(track, collision);
896902
} else if (isWeakDecayFromCharmHadron(mctrack, mcparticles)) { // hc->l is found in full decay chain.
897903
if (IsFromBeauty(mcmother, mcparticles) > 0) {
898-
fillTrackInfo<7, TMCParticles>(track); // hb->hc->l is fond.
904+
fillTrackInfo<7, TMCParticles>(track, collision); // hb->hc->l is fond.
899905
} else {
900-
fillTrackInfo<5, TMCParticles>(track); // prompt hc->l is found.
906+
fillTrackInfo<5, TMCParticles>(track, collision); // prompt hc->l is found.
901907
}
902908
}
903909
} else {
904910
if (pdg_mother == 22) { // photon conversion
905-
fillTrackInfo<2, TMCParticles>(track);
911+
fillTrackInfo<2, TMCParticles>(track, collision);
906912
}
907913
}
908914
} // end of track loop

0 commit comments

Comments
 (0)