Skip to content

Commit ef3db91

Browse files
committed
Add PID in MC process functions
1 parent 9f33700 commit ef3db91

File tree

1 file changed

+114
-71
lines changed

1 file changed

+114
-71
lines changed

PWGCF/Flow/Tasks/flowSP.cxx

Lines changed: 114 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ struct FlowSP {
5656
O2_DEFINE_CONFIGURABLE(cfgFillXandYterms, bool, true, "Flag to make and fill histos for with separate x and y terms for SPM");
5757
O2_DEFINE_CONFIGURABLE(cfgFillChargeDependence, bool, true, "Flag to make and fill histos for charge dependent flow");
5858
// Centrality Estimators -> standard is FT0C
59-
O2_DEFINE_CONFIGURABLE(cfgFT0Cvariant1, bool, false, "Set centrality estimator to cfgFT0Cvariant1");
60-
O2_DEFINE_CONFIGURABLE(cfgFT0M, bool, false, "Set centrality estimator to cfgFT0M");
61-
O2_DEFINE_CONFIGURABLE(cfgFV0A, bool, false, "Set centrality estimator to cfgFV0A");
62-
O2_DEFINE_CONFIGURABLE(cfgNGlobal, bool, false, "Set centrality estimator to cfgNGlobal");
59+
O2_DEFINE_CONFIGURABLE(cfgCentFT0Cvariant1, bool, false, "Set centrality estimator to cfgCentFT0Cvariant1");
60+
O2_DEFINE_CONFIGURABLE(cfgCentFT0M, bool, false, "Set centrality estimator to cfgCentFT0M");
61+
O2_DEFINE_CONFIGURABLE(cfgCentFV0A, bool, false, "Set centrality estimator to cfgCentFV0A");
62+
O2_DEFINE_CONFIGURABLE(cfgCentNGlobal, bool, false, "Set centrality estimator to cfgCentNGlobal");
6363
// Standard selections
6464
O2_DEFINE_CONFIGURABLE(cfgDCAxy, float, 0.2, "Cut on DCA in the transverse direction (cm)");
6565
O2_DEFINE_CONFIGURABLE(cfgDCAz, float, 2, "Cut on DCA in the longitudinal direction (cm)");
@@ -70,14 +70,15 @@ struct FlowSP {
7070
O2_DEFINE_CONFIGURABLE(cfgEta, float, 0.8, "eta cut");
7171
O2_DEFINE_CONFIGURABLE(cfgVtxZ, float, 10, "vertex cut (cm)");
7272
O2_DEFINE_CONFIGURABLE(cfgMagField, float, 99999, "Configurable magnetic field;default CCDB will be queried");
73+
7374
O2_DEFINE_CONFIGURABLE(cfgCentMin, float, 0, "Minimum cenrality for selected events");
7475
O2_DEFINE_CONFIGURABLE(cfgCentMax, float, 90, "Maximum cenrality for selected events");
7576
// NUA and NUE weights
7677
O2_DEFINE_CONFIGURABLE(cfgFillWeights, bool, true, "Fill NUA weights");
7778
O2_DEFINE_CONFIGURABLE(cfgFillWeightsPOS, bool, false, "Fill NUA weights only for positive charges");
7879
O2_DEFINE_CONFIGURABLE(cfgFillWeightsNEG, bool, false, "Fill NUA weights only for negative charges");
79-
O2_DEFINE_CONFIGURABLE(cfgAcceptance, std::string, "", "ccdb dir for NUA corrections");
80-
O2_DEFINE_CONFIGURABLE(cfgEfficiency, std::string, "", "ccdb dir for NUE corrections");
80+
O2_DEFINE_CONFIGURABLE(cfgNUA, std::string, "", "ccdb dir for NUA corrections");
81+
O2_DEFINE_CONFIGURABLE(cfgNUE, std::string, "", "ccdb dir for NUE corrections");
8182
// Additional track Selections
8283
O2_DEFINE_CONFIGURABLE(cfgUseAdditionalTrackCut, bool, true, "Bool to enable Additional Track Cut");
8384
O2_DEFINE_CONFIGURABLE(cfgDoubleTrackFunction, bool, true, "Include track cut at low pt");
@@ -105,27 +106,9 @@ struct FlowSP {
105106
O2_DEFINE_CONFIGURABLE(cfgLoadSPPlaneRes, bool, false, "Load ZDC spectator plane resolution");
106107
O2_DEFINE_CONFIGURABLE(cfgCCDBdir_SP, std::string, "Users/c/ckoster/ZDC/LHC23_zzh_pass4_small/SPPlaneRes", "ccdb dir for average event plane resolution in 1% centrality bins");
107108
// axis
108-
ConfigurableAxis axisDCAz{"axisDCAz", {200, -.5, .5}, "DCA_{z} (cm)"};
109-
ConfigurableAxis axisDCAxy{"axisDCAxy", {200, -.5, .5}, "DCA_{xy} (cm)"};
110-
ConfigurableAxis axisPhiMod = {"axisPhiMod", {100, 0, constants::math::PI / 9}, "fmod(#varphi,#pi/9)"};
111-
ConfigurableAxis axisPhi = {"axisPhi", {60, 0, constants::math::TwoPI}, "#varphi"};
112-
ConfigurableAxis axisEta = {"axisEta", {64, -1.8, 1.8}, "#eta"};
113-
ConfigurableAxis axisEtaVn = {"axisEtaVn", {8, -.8, .8}, "#eta"};
114-
ConfigurableAxis axisVx = {"axisVx", {40, -0.01, 0.01}, "v_{x}"};
115-
ConfigurableAxis axisVy = {"axisVy", {40, -0.01, 0.01}, "v_{y}"};
116-
ConfigurableAxis axisVz = {"axisVz", {40, -10, 10}, "v_{z}"};
117-
ConfigurableAxis axisCent = {"axisCent", {90, 0, 90}, "Centrality(%)"};
118-
ConfigurableAxis axisPhiPlane = {"axisPhiPlane", {100, -constants::math::PI, constants::math::PI}, "#Psi"};
119-
ConfigurableAxis axisNch = {"axisNch", {400, 0, 4000}, "N_{ch}"};
120-
ConfigurableAxis axisT0c = {"axisT0c", {70, 0, 70000}, "N_{ch} (T0C)"};
121-
ConfigurableAxis axisT0a = {"axisT0a", {70, 0, 70000}, "N_{ch} (T0A)"};
122-
ConfigurableAxis axisV0a = {"axisV0a", {70, 0, 70000}, "N_{ch} (V0A)"};
123-
ConfigurableAxis axisMultpv = {"axisMultpv", {400, 0, 4000}, "N_{ch} (PV)"};
124-
ConfigurableAxis axisShCl = {"axisShCl", {200, 0, 1}, "Fraction shared cl. TPC"};
125-
ConfigurableAxis axisCl = {"axisCl", {160, 0, 160}, "Number of cl. TPC"};
126109

127110
Filter collisionFilter = nabs(aod::collision::posZ) < cfgVtxZ;
128-
Filter trackFilter = nabs(aod::track::eta) < cfgEta && aod::track::pt > cfgPtmin&& aod::track::pt < cfgPtmax && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t) true)) && nabs(aod::track::dcaXY) < cfgDCAxy&& nabs(aod::track::dcaZ) < cfgDCAz;
111+
Filter trackFilter = nabs(aod::track::eta) < cfgEta && aod::track::pt > cfgPtmin&& aod::track::pt < cfgPtmax && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t) true)) && nabs(aod::track::dcaXY) < cfgDCAxy && nabs(aod::track::dcaZ) < cfgDCAz;
129112
Filter trackFilterMC = nabs(aod::mcparticle::eta) < cfgEta && aod::mcparticle::pt > cfgPtmin&& aod::mcparticle::pt < cfgPtmax;
130113
using UsedCollisions = soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::Mults, aod::CentFT0Cs, aod::CentFT0CVariant1s, aod::CentFT0Ms, aod::CentFV0As, aod::CentNGlobals, aod::SPTableZDC>>;
131114
using UsedTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TracksExtra, aod::TrackSelection, aod::TracksDCA>>;
@@ -219,7 +202,13 @@ struct FlowSP {
219202
kAfter
220203
};
221204

205+
enum ModeType {
206+
kGen,
207+
kReco
208+
};
209+
222210
static constexpr std::string_view Charge[] = {"incl/", "pos/", "neg/"};
211+
static constexpr std::string_view Time[] = {"before/", "after"};
223212

224213
void init(InitContext const&)
225214
{
@@ -231,6 +220,25 @@ struct FlowSP {
231220
int64_t now = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count();
232221
ccdb->setCreatedNotAfter(now);
233222

223+
AxisSpec axisDCAz = {100, -.5, .5, "DCA_{z} (cm)"};
224+
AxisSpec axisDCAxy = {100, -.5, .5, "DCA_{xy} (cm)"};
225+
AxisSpec axisPhiMod = {100, 0, constants::math::PI / 9, "fmod(#varphi,#pi/9)"};
226+
AxisSpec axisPhi = {60, 0, constants::math::TwoPI, "#varphi"};
227+
AxisSpec axisEta = {64, -1.8, 1.8, "#eta"};
228+
AxisSpec axisEtaVn = {8, -.8, .8, "#eta"};
229+
AxisSpec axisVx = {40, -0.01, 0.01, "v_{x}"};
230+
AxisSpec axisVy = {40, -0.01, 0.01, "v_{y}"};
231+
AxisSpec axisVz = {40, -10, 10, "v_{z}"};
232+
AxisSpec axisCent = {90, 0, 90, "Centrality(%)"};
233+
AxisSpec axisPhiPlane = {100, -constants::math::PI, constants::math::PI, "#Psi"};
234+
AxisSpec axisNch = {40, 0, 4000, "N_{ch}"};
235+
AxisSpec axisT0c = {70, 0, 70000, "N_{ch} (T0C)"};
236+
AxisSpec axisT0a = {70, 0, 70000, "N_{ch} (T0A)"};
237+
AxisSpec axisV0a = {70, 0, 70000, "N_{ch} (V0A)"};
238+
AxisSpec axisMultpv = {40, 0, 4000, "N_{ch} (PV)"};
239+
AxisSpec axisShCl = {100, 0, 1, "Fraction shared cl. TPC"};
240+
AxisSpec axisCl = {100, 0, 160, "Number of cl. TPC"};
241+
234242
std::vector<double> ptbinning = {0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2, 2.2, 2.4, 2.6, 2.8, 3, 3.5, 4, 5, 6, 8, 10};
235243
AxisSpec axisPt = {ptbinning, "#it{p}_{T} GeV/#it{c}"};
236244

@@ -289,14 +297,18 @@ struct FlowSP {
289297

290298
if (doprocessMCReco) {
291299
registry.add("trackMCReco/after/hIsPhysicalPrimary", "", {HistType::kTH1D, {{2, 0, 2}}});
292-
registry.add("trackMCReco/hTrackSize_unFiltered", "", {HistType::kTH1D, {{100, 0, 20000}}});
300+
registry.add("trackMCReco/hTrackSize_unFiltered", "", {HistType::kTH1D, {{100, 0, 200000}}});
293301
registry.add("trackMCReco/hTrackSize_Filtered", "", {HistType::kTH1D, {{100, 0, 20000}}});
294302
registry.get<TH1>(HIST("trackMCReco/after/hIsPhysicalPrimary"))->GetXaxis()->SetBinLabel(1, "Secondary");
295303
registry.get<TH1>(HIST("trackMCReco/after/hIsPhysicalPrimary"))->GetXaxis()->SetBinLabel(2, "Primary");
296304

297-
registry.add("trackMCReco/after/hPt_inclusive", "", {HistType::kTH1D, {axisPt}});
298-
registry.add("trackMCReco/after/hPt_positive", "", {HistType::kTH1D, {axisPt}});
299-
registry.add("trackMCReco/after/hPt_negative", "", {HistType::kTH1D, {axisPt}});
305+
registry.add("trackMCReco/after/incl/hPt_hadron", "", {HistType::kTH1D, {axisPt}});
306+
registry.add("trackMCReco/after/incl/hPt_proton", "", {HistType::kTH1D, {axisPt}});
307+
registry.add("trackMCReco/after/incl/hPt_pion", "", {HistType::kTH1D, {axisPt}});
308+
registry.add("trackMCReco/after/incl/hPt_kaon", "", {HistType::kTH1D, {axisPt}});
309+
310+
registry.addClone("trackMCReco/after/incl/", "trackMCReco/after/pos/");
311+
registry.addClone("trackMCReco/after/incl/", "trackMCReco/after/neg/");
300312

301313
registry.addClone("trackMCReco/after/", "trackMCReco/before/");
302314
}
@@ -406,7 +418,10 @@ struct FlowSP {
406418

407419
if (doprocessMCGen) {
408420
registry.add("trackMCGen/nCollReconstructedPerMcCollision", "", {HistType::kTH1D, {{10, -5, 5}}});
409-
registry.add("trackMCGen/before/incl/pt_gen", "", {HistType::kTH1D, {axisPt}});
421+
registry.add("trackMCGen/before/incl/hPt_hadron", "", {HistType::kTH1D, {axisPt}});
422+
registry.add("trackMCGen/before/incl/hPt_proton", "", {HistType::kTH1D, {axisPt}});
423+
registry.add("trackMCGen/before/incl/hPt_pion", "", {HistType::kTH1D, {axisPt}});
424+
registry.add("trackMCGen/before/incl/hPt_kaon", "", {HistType::kTH1D, {axisPt}});
410425
registry.add("trackMCGen/before/incl/phi_eta_vtxZ_gen", "", {HistType::kTH3D, {axisPhi, axisEta, axisVz}});
411426
registry.addClone("trackMCGen/before/incl/", "trackMCGen/before/pos/");
412427
registry.addClone("trackMCGen/before/incl/", "trackMCGen/before/neg/");
@@ -507,31 +522,31 @@ struct FlowSP {
507522
if (cfg.correctionsLoaded)
508523
return;
509524

510-
if (cfgAcceptance.value.empty() == false) {
511-
TList* listCorrections = ccdb->getForTimeStamp<TList>(cfgAcceptance, timestamp);
525+
if (cfgNUA.value.empty() == false) {
526+
TList* listCorrections = ccdb->getForTimeStamp<TList>(cfgNUA, timestamp);
512527
cfg.mAcceptance.push_back(reinterpret_cast<GFWWeights*>(listCorrections->FindObject("weights")));
513528
cfg.mAcceptance.push_back(reinterpret_cast<GFWWeights*>(listCorrections->FindObject("weights_positive")));
514529
cfg.mAcceptance.push_back(reinterpret_cast<GFWWeights*>(listCorrections->FindObject("weights_negative")));
515530
int sizeAcc = cfg.mAcceptance.size();
516531
if (sizeAcc < 3)
517-
LOGF(warning, "Could not load acceptance weights from %s", cfgAcceptance.value.c_str());
532+
LOGF(warning, "Could not load acceptance weights from %s", cfgNUA.value.c_str());
518533
else
519-
LOGF(info, "Loaded acceptance weights from %s", cfgAcceptance.value.c_str());
534+
LOGF(info, "Loaded acceptance weights from %s", cfgNUA.value.c_str());
520535
} else {
521-
LOGF(info, "cfgAcceptance empty! No corrections loaded");
536+
LOGF(info, "cfgNUA empty! No corrections loaded");
522537
}
523-
if (cfgEfficiency.value.empty() == false) {
524-
TList* listCorrections = ccdb->getForTimeStamp<TList>(cfgEfficiency, timestamp);
538+
if (cfgNUE.value.empty() == false) {
539+
TList* listCorrections = ccdb->getForTimeStamp<TList>(cfgNUE, timestamp);
525540
cfg.mEfficiency.push_back(reinterpret_cast<TH1D*>(listCorrections->FindObject("Efficiency")));
526541
cfg.mEfficiency.push_back(reinterpret_cast<TH1D*>(listCorrections->FindObject("Efficiency_pos")));
527542
cfg.mEfficiency.push_back(reinterpret_cast<TH1D*>(listCorrections->FindObject("Efficiency_neg")));
528543
int sizeEff = cfg.mEfficiency.size();
529544
if (sizeEff < 3) {
530-
LOGF(fatal, "Could not load efficiency histogram for trigger particles from %s", cfgEfficiency.value.c_str());
545+
LOGF(fatal, "Could not load efficiency histogram for trigger particles from %s", cfgNUE.value.c_str());
531546
}
532-
LOGF(info, "Loaded efficiency histogram from %s", cfgEfficiency.value.c_str());
547+
LOGF(info, "Loaded efficiency histogram from %s", cfgNUE.value.c_str());
533548
} else {
534-
LOGF(info, "cfgEfficiency empty! No corrections loaded");
549+
LOGF(info, "cfgNUE empty! No corrections loaded");
535550
}
536551
cfg.correctionsLoaded = true;
537552
}
@@ -848,6 +863,43 @@ struct FlowSP {
848863
registry.fill(HIST(Charge[ct]) + HIST("QA/hCrossedRows_pt"), track.pt(), track.tpcNClsFound());
849864
}
850865

866+
template <FillType ft, ModeType md, typename TrackObject>
867+
inline void fillMCPtHistos(TrackObject track, int pdgCode)
868+
{
869+
static constexpr std::string_view Time[] = {"before/", "after/"};
870+
static constexpr std::string_view Mode[] = {"Gen/", "Reco/"};
871+
872+
registry.fill(HIST("trackMC") + HIST(Mode[md]) + HIST(Time[ft]) + HIST("incl/hPt_hadron"), track.pt());
873+
if (pdgCode > 0) {
874+
registry.fill(HIST("trackMC") + HIST(Mode[md]) + HIST(Time[ft]) + HIST("pos/hPt_hadron"), track.pt());
875+
} else {
876+
registry.fill(HIST("trackMC") + HIST(Mode[md]) + HIST(Time[ft]) + HIST("neg/hPt_hadron"), track.pt());
877+
}
878+
879+
if(pdgCode == 211 || pdgCode == -211){
880+
registry.fill(HIST("trackMC") + HIST(Mode[md]) + HIST(Time[ft]) + HIST("incl/hPt_pion"), track.pt());
881+
if(pdgCode == 211) {
882+
registry.fill(HIST("trackMC") + HIST(Mode[md]) + HIST(Time[ft]) + HIST("pos/hPt_pion"), track.pt());
883+
} else {
884+
registry.fill(HIST("trackMC") + HIST(Mode[md]) + HIST(Time[ft]) + HIST("neg/hPt_pion"), track.pt());
885+
}
886+
} else if(pdgCode == 321 || pdgCode == -321) {
887+
registry.fill(HIST("trackMC") + HIST(Mode[md]) + HIST(Time[ft]) + HIST("incl/hPt_kaon"), track.pt());
888+
if(pdgCode == 321) {
889+
registry.fill(HIST("trackMC") + HIST(Mode[md]) + HIST(Time[ft]) + HIST("pos/hPt_kaon"), track.pt());
890+
} else {
891+
registry.fill(HIST("trackMC") + HIST(Mode[md]) + HIST(Time[ft]) + HIST("neg/hPt_kaon"), track.pt());
892+
}
893+
} else if(pdgCode == 2212 || pdgCode == -2212) {
894+
registry.fill(HIST("trackMC") + HIST(Mode[md]) + HIST(Time[ft]) + HIST("incl/hPt_proton"), track.pt());
895+
if(pdgCode == 2212) {
896+
registry.fill(HIST("trackMC") + HIST(Mode[md]) + HIST(Time[ft]) + HIST("pos/hPt_proton"), track.pt());
897+
} else {
898+
registry.fill(HIST("trackMC") + HIST(Mode[md]) + HIST(Time[ft]) + HIST("neg/hPt_proton"), track.pt());
899+
}
900+
}
901+
}
902+
851903
void processData(UsedCollisions::iterator const& collision, aod::BCsWithTimestamps const&, UsedTracks const& tracks)
852904
{
853905
registry.fill(HIST("hEventCount"), evSel_FilteredEvent);
@@ -866,13 +918,13 @@ struct FlowSP {
866918

867919
float centrality = collision.centFT0C();
868920

869-
if (cfgFT0Cvariant1)
921+
if (cfgCentFT0Cvariant1)
870922
centrality = collision.centFT0CVariant1();
871-
if (cfgFT0M)
923+
if (cfgCentFT0M)
872924
centrality = collision.centFT0M();
873-
if (cfgFV0A)
925+
if (cfgCentFV0A)
874926
centrality = collision.centFV0A();
875-
if (cfgNGlobal)
927+
if (cfgCentNGlobal)
876928
centrality = collision.centNGlobal();
877929

878930
if (!eventSelected(collision, tracks.size(), centrality))
@@ -1027,13 +1079,13 @@ struct FlowSP {
10271079

10281080
double vtxz = collision.posZ();
10291081
float centrality = collision.centFT0C();
1030-
if (cfgFT0Cvariant1)
1082+
if (cfgCentFT0Cvariant1)
10311083
centrality = collision.centFT0CVariant1();
1032-
if (cfgFT0M)
1084+
if (cfgCentFT0M)
10331085
centrality = collision.centFT0M();
1034-
if (cfgFV0A)
1086+
if (cfgCentFV0A)
10351087
centrality = collision.centFV0A();
1036-
if (cfgNGlobal)
1088+
if (cfgCentNGlobal)
10371089
centrality = collision.centNGlobal();
10381090

10391091
if (cfgFillQAHistos)
@@ -1058,14 +1110,11 @@ struct FlowSP {
10581110
auto mcParticle = track.mcParticle();
10591111
if (track.sign() == 0.0)
10601112
continue;
1113+
registry.fill(HIST("hTrackCount"), trackSel_ZeroCharge);
1114+
10611115
bool pos = (track.sign() > 0) ? true : false;
10621116

1063-
registry.fill(HIST("trackMCReco/before/hPt_inclusive"), track.pt());
1064-
if (pos) {
1065-
registry.fill(HIST("trackMCReco/before/hPt_positive"), track.pt());
1066-
} else {
1067-
registry.fill(HIST("trackMCReco/before/hPt_negative"), track.pt());
1068-
}
1117+
fillMCPtHistos<kBefore, kReco>(track, mcParticle.pdgCode());
10691118

10701119
if (!mcParticle.isPhysicalPrimary()) {
10711120
registry.fill(HIST("trackMCReco/before/hIsPhysicalPrimary"), 0);
@@ -1076,13 +1125,8 @@ struct FlowSP {
10761125

10771126
if (!trackSelected(track, field))
10781127
continue;
1079-
1080-
registry.fill(HIST("trackMCReco/after/hPt_inclusive"), track.pt());
1081-
if (pos) {
1082-
registry.fill(HIST("trackMCReco/after/hPt_positive"), track.pt());
1083-
} else {
1084-
registry.fill(HIST("trackMCReco/after/hPt_negative"), track.pt());
1085-
}
1128+
1129+
fillMCPtHistos<kAfter, kReco>(track, mcParticle.pdgCode());
10861130

10871131
if (cfgFillQAHistos)
10881132
fillTrackQA<kInclusive>(track, vtxz);
@@ -1117,13 +1161,13 @@ struct FlowSP {
11171161
auto filteredTrackSlice = filteredTracks.sliceBy(trackPerCollision, col.globalIndex());
11181162

11191163
centrality = col.centFT0C();
1120-
if (cfgFT0Cvariant1)
1164+
if (cfgCentFT0Cvariant1)
11211165
centrality = col.centFT0CVariant1();
1122-
if (cfgFT0M)
1166+
if (cfgCentFT0M)
11231167
centrality = col.centFT0M();
1124-
if (cfgFV0A)
1168+
if (cfgCentFV0A)
11251169
centrality = col.centFV0A();
1126-
if (cfgNGlobal)
1170+
if (cfgCentNGlobal)
11271171
centrality = col.centNGlobal();
11281172
fillEventQA<kBefore>(col, trackSlice);
11291173
if (trackSlice.size() < 1) {
@@ -1159,28 +1203,27 @@ struct FlowSP {
11591203

11601204
bool pos = (charge > 0) ? true : false;
11611205

1162-
registry.fill(HIST("trackMCGen/before/incl/pt_gen"), particle.pt());
1206+
fillMCPtHistos<kBefore, kGen>(particle, pdgCode);
1207+
11631208
registry.fill(HIST("trackMCGen/before/incl/phi_eta_vtxZ_gen"), particle.phi(), particle.eta(), vtxz);
11641209

11651210
if (pos) {
1166-
registry.fill(HIST("trackMCGen/before/pos/pt_gen"), particle.pt());
11671211
registry.fill(HIST("trackMCGen/before/pos/phi_eta_vtxZ_gen"), particle.phi(), particle.eta(), vtxz);
11681212
} else {
1169-
registry.fill(HIST("trackMCGen/before/neg/pt_gen"), particle.pt());
11701213
registry.fill(HIST("trackMCGen/before/neg/phi_eta_vtxZ_gen"), particle.phi(), particle.eta(), vtxz);
11711214
}
11721215

11731216
if (particle.eta() < -cfgEta || particle.eta() > cfgEta || particle.pt() < cfgPtmin || particle.pt() > cfgPtmax)
11741217
continue;
11751218

1176-
registry.fill(HIST("trackMCGen/after/incl/pt_gen"), particle.pt());
1219+
1220+
fillMCPtHistos<kAfter, kGen>(particle, pdgCode);
1221+
11771222
registry.fill(HIST("trackMCGen/after/incl/phi_eta_vtxZ_gen"), particle.phi(), particle.eta(), vtxz);
11781223

11791224
if (pos) {
1180-
registry.fill(HIST("trackMCGen/after/pos/pt_gen"), particle.pt());
11811225
registry.fill(HIST("trackMCGen/after/pos/phi_eta_vtxZ_gen"), particle.phi(), particle.eta(), vtxz);
11821226
} else {
1183-
registry.fill(HIST("trackMCGen/after/neg/pt_gen"), particle.pt());
11841227
registry.fill(HIST("trackMCGen/after/neg/phi_eta_vtxZ_gen"), particle.phi(), particle.eta(), vtxz);
11851228
}
11861229
}

0 commit comments

Comments
 (0)