Skip to content

Commit 191f09f

Browse files
[PWGLF] NucleiTask - Add pTgen histos (#14505)
1 parent 24c9abd commit 191f09f

File tree

1 file changed

+41
-9
lines changed

1 file changed

+41
-9
lines changed

PWGLF/Tasks/Nuspex/LFNucleiBATask.cxx

Lines changed: 41 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -998,6 +998,7 @@ struct LFNucleiBATask {
998998
histos.add<TH2>("tracks/helium/h2HeliumSpectraTrueVsMult_Z2", "#it{p}_{T} (He)", HistType::kTH2F, {{ptHeAxis}, {binsPercentile}});
999999
histos.add<TH2>("tracks/helium/h2HeliumSpectraTrueWPIDVsMult_Z2", "#it{p}_{T} (He)", HistType::kTH2F, {{ptHeAxis}, {binsPercentile}});
10001000
histos.add<TH2>("tracks/helium/h2HeliumSpectraTruePrimVsMult_Z2", "#it{p}_{T} (He)", HistType::kTH2F, {{ptHeAxis}, {binsPercentile}});
1001+
histos.add<TH2>("tracks/helium/h2HeliumSpectraTruePrimGenVsMult_Z2", "#it{p}_{T}(gen) (He)", HistType::kTH2F, {{ptHeAxis}, {binsPercentile}});
10011002
histos.add<TH2>("tracks/helium/h2HeliumSpectraTrueSecVsMult_Z2", "#it{p}_{T} (He)", HistType::kTH2F, {{ptHeAxis}, {binsPercentile}});
10021003
}
10031004

@@ -1011,6 +1012,7 @@ struct LFNucleiBATask {
10111012
histos.add<TH2>("tracks/helium/h2antiHeliumSpectraTrueVsMult_Z2", "#it{p}_{T} (He)", HistType::kTH2F, {{ptHeAxis}, {binsPercentile}});
10121013
histos.add<TH2>("tracks/helium/h2antiHeliumSpectraTrueWPIDVsMult_Z2", "#it{p}_{T} (He)", HistType::kTH2F, {{ptHeAxis}, {binsPercentile}});
10131014
histos.add<TH2>("tracks/helium/h2antiHeliumSpectraTruePrimVsMult_Z2", "#it{p}_{T} (He)", HistType::kTH2F, {{ptHeAxis}, {binsPercentile}});
1015+
histos.add<TH2>("tracks/helium/h2antiHeliumSpectraTruePrimGenVsMult_Z2", "#it{p}_{T}(gen) (He)", HistType::kTH2F, {{ptHeAxis}, {binsPercentile}});
10141016
histos.add<TH2>("tracks/helium/h2antiHeliumSpectraTrueSecVsMult_Z2", "#it{p}_{T} (He)", HistType::kTH2F, {{ptHeAxis}, {binsPercentile}});
10151017
}
10161018

@@ -1020,8 +1022,11 @@ struct LFNucleiBATask {
10201022
if (enableCentrality) {
10211023
histos.add<TH2>("tracks/helium/TOF/h2HeliumSpectraTrueWPIDVsMult_Z2", "#it{p}_{T} (He)", HistType::kTH2F, {{ptHeAxis}, {binsPercentile}});
10221024
histos.add<TH2>("tracks/helium/TOF/h2HeliumSpectraTruePrimVsMult_Z2", "#it{p}_{T} (He)", HistType::kTH2F, {{ptHeAxis}, {binsPercentile}});
1025+
histos.add<TH2>("tracks/helium/TOF/h2HeliumSpectraTruePrimGenVsMult_Z2", "#it{p}_{T}(gen) (He)", HistType::kTH2F, {{ptHeAxis}, {binsPercentile}});
1026+
10231027
histos.add<TH2>("tracks/helium/TOF/h2antiHeliumSpectraTrueWPIDVsMult_Z2", "#it{p}_{T} (He)", HistType::kTH2F, {{ptHeAxis}, {binsPercentile}});
10241028
histos.add<TH2>("tracks/helium/TOF/h2antiHeliumSpectraTruePrimVsMult_Z2", "#it{p}_{T} (He)", HistType::kTH2F, {{ptHeAxis}, {binsPercentile}});
1029+
histos.add<TH2>("tracks/helium/TOF/h2antiHeliumSpectraTruePrimGenVsMult_Z2", "#it{p}_{T}(gen) (He)", HistType::kTH2F, {{ptHeAxis}, {binsPercentile}});
10251030
}
10261031
}
10271032
if (outFlagOptions.enableEffPlots) {
@@ -2150,6 +2155,7 @@ struct LFNucleiBATask {
21502155
spectraGen.add("helium/histPtGenHe", "PtGenHe", HistType::kTH1F, {{800, 0.f, 8.f}});
21512156
spectraGen.add("helium/histPtRecHe", "PtRecHe", HistType::kTH1F, {{800, 0.f, 8.f}});
21522157
spectraGen.add("helium/histPtShiftHe", "PtReco-PtGen vs PtReco;#it{p}_{T}(reco); #it{p}_{T}(reco) - #it{p}_{T}(gen)", HistType::kTH2F, {{800, 0.f, 8.f}, {400, -4.f, 4.f}});
2158+
spectraGen.add("helium/histPtShiftHeVsGen", "PtReco-PtGen vs PtGen;#it{p}_{T}(gen); #it{p}_{T}(reco) - #it{p}_{T}(gen)", HistType::kTH2F, {{800, 0.f, 8.f}, {400, -4.f, 4.f}});
21532159
spectraGen.add("helium/histPtShiftVsEtaHe", "PtReco-PtGen vs #eta", HistType::kTH2F, {{200, -2.f, 2.f}, {400, -4.f, 4.f}});
21542160

21552161
spectraGen.add("helium/histPGenHe", "PGenHe", HistType::kTH1F, {{800, 0.f, 8.f}});
@@ -2160,8 +2166,16 @@ struct LFNucleiBATask {
21602166
spectraGen.add("helium/histPtGenantiHe", "PtGenantiHe", HistType::kTH1F, {{800, 0.f, 8.f}});
21612167
spectraGen.add("helium/histPtRecantiHe", "PtRecantiHe", HistType::kTH1F, {{800, 0.f, 8.f}});
21622168
spectraGen.add("helium/histPtShiftantiHe", "PtReco-PtGen vs PtReco; #it{p}_{T}(reco); #it{p}_{T}(reco) - #it{p}_{T}(gen)", HistType::kTH2F, {{800, 0.f, 8.f}, {400, -4.f, 4.f}});
2169+
spectraGen.add("helium/histPtShiftantiHeVsGen", "PtReco-PtGen vs PtGen; #it{p}_{T}(gen); #it{p}_{T}(reco) - #it{p}_{T}(gen)", HistType::kTH2F, {{800, 0.f, 8.f}, {400, -4.f, 4.f}});
21632170
spectraGen.add("helium/histPtShiftVsEtaantiHe", "PtReco-PtGen vs #eta", HistType::kTH2F, {{200, -2.f, 2.f}, {400, -4.f, 4.f}});
21642171

2172+
if (outFlagOptions.doTOFplots) {
2173+
spectraGen.add("helium/TOF/histPtShiftHe", "PtReco-PtGen vs PtReco;#it{p}_{T}(reco); #it{p}_{T}(reco) - #it{p}_{T}(gen)", HistType::kTH2F, {{800, 0.f, 8.f}, {400, -4.f, 4.f}});
2174+
spectraGen.add("helium/TOF/histPtShiftHeVsGen", "PtReco-PtGen vs PtGen;#it{p}_{T}(gen); #it{p}_{T}(reco) - #it{p}_{T}(gen)", HistType::kTH2F, {{800, 0.f, 8.f}, {400, -4.f, 4.f}});
2175+
spectraGen.add("helium/TOF/histPtShiftantiHe", "PtReco-PtGen vs PtReco; #it{p}_{T}(reco); #it{p}_{T}(reco) - #it{p}_{T}(gen)", HistType::kTH2F, {{800, 0.f, 8.f}, {400, -4.f, 4.f}});
2176+
spectraGen.add("helium/TOF/histPtShiftantiHeVsGen", "PtReco-PtGen vs PtGen; #it{p}_{T}(gen); #it{p}_{T}(reco) - #it{p}_{T}(gen)", HistType::kTH2F, {{800, 0.f, 8.f}, {400, -4.f, 4.f}});
2177+
}
2178+
21652179
spectraGen.add("helium/histPGenantiHe", "PGenantiHe", HistType::kTH1F, {{800, 0.f, 8.f}});
21662180
spectraGen.add("helium/histPRecantiHe", "PRecantiHe", HistType::kTH1F, {{800, 0.f, 8.f}});
21672181
spectraGen.add("helium/histPShiftantiHe", "PReco-PGen vs PReco", HistType::kTH2F, {{800, 0.f, 8.f}, {400, -4.f, 4.f}});
@@ -3707,8 +3721,12 @@ struct LFNucleiBATask {
37073721
spectraGen.fill(HIST("helium/histPtGenHe"), std::abs(track.mcParticle().pt()));
37083722
spectraGen.fill(HIST("helium/histPtRecHe"), 2.f * hePt);
37093723
spectraGen.fill(HIST("helium/histPtShiftHe"), 2.f * hePt, 2.f * hePt - track.mcParticle().pt());
3724+
spectraGen.fill(HIST("helium/histPtShiftHeVsGen"), track.mcParticle().pt(), 2.f * hePt - track.mcParticle().pt());
37103725
spectraGen.fill(HIST("helium/histPtShiftVsEtaHe"), track.eta(), 2.f * hePt - track.mcParticle().pt());
3711-
3726+
if (track.hasTOF() && outFlagOptions.doTOFplots) {
3727+
spectraGen.fill(HIST("helium/TOF/histPtShiftHe"), 2.f * hePt, 2.f * hePt - track.mcParticle().pt());
3728+
spectraGen.fill(HIST("helium/TOF/histPtShiftHeVsGen"), track.mcParticle().pt(), 2.f * hePt - track.mcParticle().pt());
3729+
}
37123730
spectraGen.fill(HIST("helium/histPGenHe"), std::abs(track.mcParticle().p()));
37133731
spectraGen.fill(HIST("helium/histPRecHe"), 2.f * heP);
37143732
spectraGen.fill(HIST("helium/histPShiftHe"), 2.f * heP, 2.f * heP - track.mcParticle().p());
@@ -3774,21 +3792,23 @@ struct LFNucleiBATask {
37743792
}
37753793
}
37763794
}
3777-
if (isHeWoTPCpid) {
3795+
if (isAntiHeWoTPCpid) {
37783796
if (isPhysPrim) {
37793797
if constexpr (!IsFilteredData) {
37803798
spectraGen.fill(HIST("helium/histPtGenantiHe"), std::abs(track.mcParticle().pt()));
37813799
spectraGen.fill(HIST("helium/histPtRecantiHe"), 2.f * antihePt);
37823800
spectraGen.fill(HIST("helium/histPtShiftantiHe"), 2.f * antihePt, 2.f * antihePt - track.mcParticle().pt());
3801+
spectraGen.fill(HIST("helium/histPtShiftantiHeVsGen"), track.mcParticle().pt(), 2.f * antihePt - track.mcParticle().pt());
37833802
spectraGen.fill(HIST("helium/histPtShiftVsEtaantiHe"), track.eta(), 2.f * antihePt - track.mcParticle().pt());
3784-
3803+
if (track.hasTOF() && outFlagOptions.doTOFplots) {
3804+
spectraGen.fill(HIST("helium/TOF/histPtShiftantiHe"), 2.f * antihePt, 2.f * antihePt - track.mcParticle().pt());
3805+
spectraGen.fill(HIST("helium/TOF/histPtShiftantiHeVsGen"), track.mcParticle().pt(), 2.f * antihePt - track.mcParticle().pt());
3806+
}
37853807
spectraGen.fill(HIST("helium/histPGenantiHe"), std::abs(track.mcParticle().p()));
37863808
spectraGen.fill(HIST("helium/histPRecantiHe"), 2.f * antiheP);
37873809
spectraGen.fill(HIST("helium/histPShiftantiHe"), 2.f * antiheP, 2.f * antiheP - track.mcParticle().p());
37883810
spectraGen.fill(HIST("helium/histPShiftVsEtaantiHe"), track.eta(), 2.f * antiheP - track.mcParticle().p());
37893811
}
3790-
if (outFlagOptions.makeDCABeforeCutPlots) {
3791-
}
37923812
}
37933813
}
37943814
}
@@ -5811,13 +5831,19 @@ struct LFNucleiBATask {
58115831
}
58125832
if (isPhysPrim) {
58135833
histos.fill(HIST("tracks/helium/h1HeliumSpectraTruePrim_Z2"), 2 * hePt);
5814-
if (enableCentrality)
5834+
if (enableCentrality) {
58155835
histos.fill(HIST("tracks/helium/h2HeliumSpectraTruePrimVsMult_Z2"), 2 * hePt, centFT0M);
5836+
if constexpr (!IsFilteredData)
5837+
histos.fill(HIST("tracks/helium/h2HeliumSpectraTruePrimGenVsMult_Z2"), track.mcParticle().pt(), centFT0M);
5838+
}
58165839
if (std::abs(track.tpcNSigmaHe()) < nsigmaTPCvar.nsigmaTPCHe) {
58175840
if (track.hasTOF() && outFlagOptions.doTOFplots) {
58185841
histos.fill(HIST("tracks/helium/TOF/h1HeliumSpectraTruePrim_Z2"), 2 * hePt);
5819-
if (enableCentrality)
5842+
if (enableCentrality) {
58205843
histos.fill(HIST("tracks/helium/TOF/h2HeliumSpectraTruePrimVsMult_Z2"), 2 * hePt, centFT0M);
5844+
if constexpr (!IsFilteredData)
5845+
histos.fill(HIST("tracks/helium/TOF/h2HeliumSpectraTruePrimGenVsMult_Z2"), track.mcParticle().pt(), centFT0M);
5846+
}
58215847
}
58225848
}
58235849

@@ -5886,14 +5912,20 @@ struct LFNucleiBATask {
58865912
}
58875913
if (isPhysPrim) {
58885914
histos.fill(HIST("tracks/helium/h1antiHeliumSpectraTruePrim_Z2"), 2 * antihePt);
5889-
if (enableCentrality)
5915+
if (enableCentrality) {
58905916
histos.fill(HIST("tracks/helium/h2antiHeliumSpectraTruePrimVsMult_Z2"), 2 * antihePt, centFT0M);
5917+
if constexpr (!IsFilteredData)
5918+
histos.fill(HIST("tracks/helium/h2antiHeliumSpectraTruePrimGenVsMult_Z2"), track.mcParticle().pt(), centFT0M);
5919+
}
58915920

58925921
if (std::abs(track.tpcNSigmaHe()) < nsigmaTPCvar.nsigmaTPCHe) {
58935922
if (track.hasTOF() && outFlagOptions.doTOFplots) {
58945923
histos.fill(HIST("tracks/helium/TOF/h1antiHeliumSpectraTruePrim_Z2"), 2 * antihePt);
5895-
if (enableCentrality)
5924+
if (enableCentrality) {
58965925
histos.fill(HIST("tracks/helium/TOF/h2antiHeliumSpectraTruePrimVsMult_Z2"), 2 * antihePt, centFT0M);
5926+
if constexpr (!IsFilteredData)
5927+
histos.fill(HIST("tracks/helium/TOF/h2antiHeliumSpectraTruePrimGenVsMult_Z2"), track.mcParticle().pt(), centFT0M);
5928+
}
58975929
}
58985930
}
58995931

0 commit comments

Comments
 (0)