Skip to content

Commit 1f4a4f5

Browse files
authored
[PWGEM/Dilepton] update single track qc mc (#8971)
1 parent 7f7b901 commit 1f4a4f5

File tree

1 file changed

+20
-10
lines changed

1 file changed

+20
-10
lines changed

PWGEM/Dilepton/Core/SingleTrackQCMC.h

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ struct SingleTrackQCMC {
197197

198198
HistogramRegistry fRegistry{"output", {}, OutputObjHandlingPolicy::AnalysisObject, false, false}; // 1 HistogramRegistry can keep up to 512 histograms
199199
static constexpr std::string_view event_cut_types[2] = {"before/", "after/"};
200-
static constexpr std::string_view lepton_source_types[9] = {"lf/", "Photon/", "PromptJPsi/", "NonPromptJPsi/", "PromptPsi2S/", "NonPromptPsi2S/", "c2l/", "b2l/", "b2c2l/"};
200+
static constexpr std::string_view lepton_source_types[10] = {"lf/", "lf_prompt/", "Photon/", "PromptJPsi/", "NonPromptJPsi/", "PromptPsi2S/", "NonPromptPsi2S/", "c2l/", "b2l/", "b2c2l/"};
201201

202202
~SingleTrackQCMC() {}
203203

@@ -221,6 +221,7 @@ struct SingleTrackQCMC {
221221

222222
// generated info
223223
fRegistry.add("Generated/lf/hs", "gen. single electron", kTHnSparseD, {axis_pt, axis_eta, axis_phi, axis_charge_gen}, true);
224+
fRegistry.addClone("Generated/lf/", "Generated/lf_prompt/");
224225
fRegistry.addClone("Generated/lf/", "Generated/PromptJPsi/");
225226
fRegistry.addClone("Generated/lf/", "Generated/NonPromptJPsi/");
226227
fRegistry.addClone("Generated/lf/", "Generated/PromptPsi2S/");
@@ -253,6 +254,7 @@ struct SingleTrackQCMC {
253254
fRegistry.add("Track/lf/positive/hPtGen_DeltaPhi", "electron #varphi resolution;p_{T}^{gen} (GeV/c);#varphi^{rec} - #varphi^{gen} (rad.)", kTH2F, {{200, 0, 10}, {100, -0.05f, 0.05f}}, true);
254255
}
255256
fRegistry.addClone("Track/lf/positive/", "Track/lf/negative/");
257+
fRegistry.addClone("Track/lf/", "Track/lf_prompt/");
256258
fRegistry.addClone("Track/lf/", "Track/Photon/"); // this is not for efficiency! only for contamination. We don't store generated photon conversions.
257259
fRegistry.addClone("Track/lf/", "Track/PromptJPsi/");
258260
fRegistry.addClone("Track/lf/", "Track/NonPromptJPsi/");
@@ -289,6 +291,7 @@ struct SingleTrackQCMC {
289291

290292
// generated info
291293
fRegistry.add("Generated/lf/hs", "gen. single muon", kTHnSparseD, {axis_pt, axis_eta, axis_phi, axis_charge_gen}, true);
294+
fRegistry.addClone("Generated/lf/", "Generated/lf_prompt/");
292295
fRegistry.addClone("Generated/lf/", "Generated/PromptJPsi/");
293296
fRegistry.addClone("Generated/lf/", "Generated/NonPromptJPsi/");
294297
fRegistry.addClone("Generated/lf/", "Generated/PromptPsi2S/");
@@ -318,6 +321,7 @@ struct SingleTrackQCMC {
318321
fRegistry.add("Track/lf/positive/hPtGen_DeltaPhi", "muon #varphi resolution;p_{T}^{gen} (GeV/c);#varphi^{rec} - #varphi^{gen} (rad.)", kTH2F, {{200, 0, 10}, {100, -0.05f, 0.05f}}, true);
319322
}
320323
fRegistry.addClone("Track/lf/positive/", "Track/lf/negative/");
324+
fRegistry.addClone("Track/lf/", "Track/lf_prompt/");
321325
fRegistry.addClone("Track/lf/", "Track/Photon/"); // this is not for efficiency! only for contamination. We don't store generated photon conversions.
322326
fRegistry.addClone("Track/lf/", "Track/PromptJPsi/");
323327
fRegistry.addClone("Track/lf/", "Track/NonPromptJPsi/");
@@ -714,30 +718,33 @@ struct SingleTrackQCMC {
714718

715719
if (mctrack.isPhysicalPrimary() || mctrack.producedByGenerator()) {
716720
if (pdg_mother == 111 || pdg_mother == 221 || pdg_mother == 331 || pdg_mother == 113 || pdg_mother == 223 || pdg_mother == 333) {
717-
fillTrackInfo<0, TMCParticles>(track);
721+
fillTrackInfo<0, TMCParticles>(track); // lf
722+
if (IsFromCharm(mcmother, mcparticles) < 0 && IsFromBeauty(mcmother, mcparticles) < 0) {
723+
fillTrackInfo<1, TMCParticles>(track); // lf_prompt
724+
}
718725
} else if (pdg_mother == 443) {
719726
if (IsFromBeauty(mcmother, mcparticles) > 0) { // b is found in full decay chain.
720-
fillTrackInfo<3, TMCParticles>(track);
727+
fillTrackInfo<4, TMCParticles>(track);
721728
} else {
722-
fillTrackInfo<2, TMCParticles>(track);
729+
fillTrackInfo<3, TMCParticles>(track);
723730
}
724731
} else if (pdg_mother == 100443) {
725732
if (IsFromBeauty(mcmother, mcparticles) > 0) { // b is found in full decay chain.
726-
fillTrackInfo<5, TMCParticles>(track);
733+
fillTrackInfo<6, TMCParticles>(track);
727734
} else {
728-
fillTrackInfo<4, TMCParticles>(track);
735+
fillTrackInfo<5, TMCParticles>(track);
729736
}
730737
} else if (IsFromBeauty(mctrack, mcparticles) > 0) { // b is found in full decay chain.
731738
if (IsFromCharm(mctrack, mcparticles) > 0) { // c is found in full decay chain.
732-
fillTrackInfo<8, TMCParticles>(track);
739+
fillTrackInfo<9, TMCParticles>(track);
733740
} else {
734-
fillTrackInfo<7, TMCParticles>(track);
741+
fillTrackInfo<8, TMCParticles>(track);
735742
}
736743
} else if (IsFromCharm(mctrack, mcparticles) > 0) { // c is found in full decay chain. Not from b.
737-
fillTrackInfo<6, TMCParticles>(track);
744+
fillTrackInfo<7, TMCParticles>(track);
738745
}
739746
} else {
740-
fillTrackInfo<1, TMCParticles>(track);
747+
fillTrackInfo<2, TMCParticles>(track);
741748
}
742749
} // end of track loop
743750

@@ -821,6 +828,9 @@ struct SingleTrackQCMC {
821828

822829
if (pdg_mother == 111 || pdg_mother == 221 || pdg_mother == 331 || pdg_mother == 113 || pdg_mother == 223 || pdg_mother == 333) {
823830
fRegistry.fill(HIST("Generated/lf/hs"), pt, eta, phi, -lepton.pdgCode() / pdg_lepton);
831+
if (IsFromCharm(mcmother, mcparticles) < 0 && IsFromBeauty(mcmother, mcparticles) < 0) {
832+
fRegistry.fill(HIST("Generated/lf_prompt/hs"), pt, eta, phi, -lepton.pdgCode() / pdg_lepton);
833+
}
824834
} else if (pdg_mother == 443) {
825835
if (IsFromBeauty(mcmother, mcparticles) > 0) { // b is found in full decay chain.
826836
fRegistry.fill(HIST("Generated/NonPromptJPsi/hs"), pt, eta, phi, -lepton.pdgCode() / pdg_lepton);

0 commit comments

Comments
 (0)