@@ -90,10 +90,30 @@ struct LFNucleiBATask {
9090
9191 if (doprocessMCReco) {
9292 histos.add <TH1 >(" tracks/proton/h1ProtonSpectraTrue" , " #it{p}_{T} (p)" , HistType::kTH1F , {ptAxis});
93+ histos.add <TH1 >(" tracks/proton/h1ProtonSpectraTruePrim" , " #it{p}_{T} (p)" , HistType::kTH1F , {ptAxis});
94+ histos.add <TH1 >(" tracks/proton/h1ProtonSpectraTrueSec" , " #it{p}_{T} (p)" , HistType::kTH1F , {ptAxis});
95+ histos.add <TH1 >(" tracks/proton/h1ProtonSpectraTrueTransport" , " #it{p}_{T} (p)" , HistType::kTH1F , {ptAxis});
96+
9397 histos.add <TH1 >(" tracks/proton/h1antiProtonSpectraTrue" , " #it{p}_{T} (p)" , HistType::kTH1F , {ptAxis});
98+ histos.add <TH1 >(" tracks/proton/h1antiProtonSpectraTruePrim" , " #it{p}_{T} (p)" , HistType::kTH1F , {ptAxis});
99+ histos.add <TH1 >(" tracks/proton/h1antiProtonSpectraTrueSec" , " #it{p}_{T} (p)" , HistType::kTH1F , {ptAxis});
100+ histos.add <TH1 >(" tracks/proton/h1antiProtonSpectraTrueTransport" , " #it{p}_{T} (p)" , HistType::kTH1F , {ptAxis});
101+
94102 histos.add <TH1 >(" tracks/deuteron/h1DeuteronSpectraTrue" , " #it{p}_{T} (d)" , HistType::kTH1F , {ptAxis});
103+ histos.add <TH1 >(" tracks/deuteron/h1DeuteronSpectraTruePrim" , " #it{p}_{T} (d)" , HistType::kTH1F , {ptAxis});
104+ histos.add <TH1 >(" tracks/deuteron/h1DeuteronSpectraTrueSec" , " #it{p}_{T} (d)" , HistType::kTH1F , {ptAxis});
105+ histos.add <TH1 >(" tracks/deuteron/h1DeuteronSpectraTrueTransport" , " #it{p}_{T} (d)" , HistType::kTH1F , {ptAxis});
106+
95107 histos.add <TH1 >(" tracks/deuteron/h1antiDeuteronSpectraTrue" , " #it{p}_{T} (d)" , HistType::kTH1F , {ptAxis});
108+ histos.add <TH1 >(" tracks/deuteron/h1antiDeuteronSpectraTruePrim" , " #it{p}_{T} (d)" , HistType::kTH1F , {ptAxis});
109+ histos.add <TH1 >(" tracks/deuteron/h1antiDeuteronSpectraTrueSec" , " #it{p}_{T} (d)" , HistType::kTH1F , {ptAxis});
110+ histos.add <TH1 >(" tracks/deuteron/h1antiDeuteronSpectraTrueTransport" , " #it{p}_{T} (d)" , HistType::kTH1F , {ptAxis});
111+
96112 histos.add <TH1 >(" tracks/helium/h1HeliumSpectraTrue" , " #it{p}_{T} (He)" , HistType::kTH1F , {ptAxis});
113+ histos.add <TH1 >(" tracks/helium/h1HeliumSpectraTruePrim" , " #it{p}_{T} (He)" , HistType::kTH1F , {ptAxis});
114+ histos.add <TH1 >(" tracks/helium/h1HeliumSpectraTrueSec" , " #it{p}_{T} (He)" , HistType::kTH1F , {ptAxis});
115+ histos.add <TH1 >(" tracks/helium/h1HeliumSpectraTrueTransport" , " #it{p}_{T} (He)" , HistType::kTH1F , {ptAxis});
116+
97117 histos.add <TH1 >(" tracks/helium/h1antiHeliumSpectraTrue" , " #it{p}_{T} (He)" , HistType::kTH1F , {ptAxis});
98118 }
99119
@@ -205,7 +225,7 @@ struct LFNucleiBATask {
205225 histos.fill (HIST (" tracks/helium/h2HeliumVspTNSigmaTPC" ), track.pt (), track.nsigTPC3He ());
206226
207227 // TOF
208- histos.fill (HIST (" tracks/pion/h2PionVspTNSigmaTOF" ), track.p (), track.nsigTOFPi ());
228+ histos.fill (HIST (" tracks/pion/h2PionVspTNSigmaTOF" ), track.pt (), track.nsigTOFPi ());
209229 histos.fill (HIST (" tracks/kaon/h2KaonVspTNSigmaTOF" ), track.pt (), track.nsigTOFKa ());
210230 histos.fill (HIST (" tracks/proton/h2ProtonVspTNSigmaTOF" ), track.pt (), track.nsigTOFPr ());
211231 histos.fill (HIST (" tracks/deuteron/h2DeuteronVspTNSigmaTOF" ), track.pt (), track.nsigTOFD ());
@@ -241,24 +261,58 @@ struct LFNucleiBATask {
241261 histos.fill (HIST (" tracks/helium/h2TOFmass2HeliumVsPt" ), massTOF * massTOF - fMassHelium * fMassHelium , track.pt ());
242262 }
243263 if constexpr (IsMC) {
244- track.pdgCode ();
245- track.isPhysicalPrimary ();
246- track. producedByGenerator ();
264+ bool isPhysPrim = track.isPhysicalPrimary ();
265+ bool isProdByGen = track.producedByGenerator ();
266+
247267 // PID
248- if (std::abs ( track.pdgCode ()) == PDGProton)
268+ if (track.pdgCode () == PDGProton) {
249269 histos.fill (HIST (" tracks/proton/h1ProtonSpectraTrue" ), track.pt ());
270+ if (isPhysPrim)
271+ histos.fill (HIST (" tracks/proton/h1ProtonSpectraTruePrim" ), track.pt ());
272+ if (!isPhysPrim && isProdByGen)
273+ histos.fill (HIST (" tracks/proton/h1ProtonSpectraTrueSec" ), track.pt ());
274+ if (!isPhysPrim && !isProdByGen)
275+ histos.fill (HIST (" tracks/proton/h1ProtonSpectraTrueTransport" ), track.pt ());
276+ }
250277
251- if (std::abs ( track.pdgCode ()) == -PDGProton)
278+ if (track.pdgCode () == -PDGProton) {
252279 histos.fill (HIST (" tracks/proton/h1antiProtonSpectraTrue" ), track.pt ());
253-
254- if (std::abs (track.pdgCode ()) == PDGDeuteron)
280+ if (isPhysPrim)
281+ histos.fill (HIST (" tracks/proton/h1antiProtonSpectraTruePrim" ), track.pt ());
282+ if (!isPhysPrim && isProdByGen)
283+ histos.fill (HIST (" tracks/proton/h1antiProtonSpectraTrueSec" ), track.pt ());
284+ if (!isPhysPrim && !isProdByGen)
285+ histos.fill (HIST (" tracks/proton/h1antiProtonSpectraTrueTransport" ), track.pt ());
286+ }
287+ if (track.pdgCode () == PDGDeuteron) {
255288 histos.fill (HIST (" tracks/deuteron/h1DeuteronSpectraTrue" ), track.pt ());
289+ if (isPhysPrim)
290+ histos.fill (HIST (" tracks/deuteron/h1DeuteronSpectraTruePrim" ), track.pt ());
291+ if (!isPhysPrim && isProdByGen)
292+ histos.fill (HIST (" tracks/deuteron/h1DeuteronSpectraTrueSec" ), track.pt ());
293+ if (!isPhysPrim && !isProdByGen)
294+ histos.fill (HIST (" tracks/deuteron/h1DeuteronSpectraTrueTransport" ), track.pt ());
295+ }
256296
257- if (std::abs ( track.pdgCode ()) == -PDGDeuteron)
297+ if (track.pdgCode () == -PDGDeuteron) {
258298 histos.fill (HIST (" tracks/deuteron/h1antiDeuteronSpectraTrue" ), track.pt ());
299+ if (isPhysPrim)
300+ histos.fill (HIST (" tracks/deuteron/h1antiDeuteronSpectraTruePrim" ), track.pt ());
301+ if (!isPhysPrim && isProdByGen)
302+ histos.fill (HIST (" tracks/deuteron/h1antiDeuteronSpectraTrueSec" ), track.pt ());
303+ if (!isPhysPrim && !isProdByGen)
304+ histos.fill (HIST (" tracks/deuteron/h1antiDeuteronSpectraTrueTransport" ), track.pt ());
305+ }
259306
260- if (std::abs ( track.pdgCode ()) == PDGHelium)
307+ if (track.pdgCode () == PDGHelium) {
261308 histos.fill (HIST (" tracks/helium/h1HeliumSpectraTrue" ), track.pt ());
309+ if (isPhysPrim)
310+ histos.fill (HIST (" tracks/helium/h1HeliumSpectraTruePrim" ), track.pt ());
311+ if (!isPhysPrim && isProdByGen)
312+ histos.fill (HIST (" tracks/helium/h1HeliumSpectraTrueSec" ), track.pt ());
313+ if (!isPhysPrim && !isProdByGen)
314+ histos.fill (HIST (" tracks/helium/h1HeliumSpectraTrueTransport" ), track.pt ());
315+ }
262316 }
263317 }
264318 }
@@ -307,7 +361,7 @@ struct LFNucleiBATask {
307361 if (!isPhysPrim && !isProdByGen)
308362 histos.fill (HIST (" spectraGen/histSecTransportPtKaon" ), mcParticleGen.pt ());
309363 }
310- if (std::abs ( mcParticleGen.pdgCode () ) == PDGProton) {
364+ if (mcParticleGen.pdgCode () == PDGProton) {
311365 histos.fill (HIST (" spectraGen/histGenPtProton" ), mcParticleGen.pt ());
312366 if (isPhysPrim)
313367 histos.fill (HIST (" spectraGen/histGenPtProtonPrim" ), mcParticleGen.pt ());
@@ -316,7 +370,7 @@ struct LFNucleiBATask {
316370 if (!isPhysPrim && !isProdByGen)
317371 histos.fill (HIST (" spectraGen/histSecTransportPtProton" ), mcParticleGen.pt ());
318372 }
319- if (std::abs ( mcParticleGen.pdgCode () ) == -PDGProton) {
373+ if (mcParticleGen.pdgCode () == -PDGProton) {
320374 histos.fill (HIST (" spectraGen/histGenPtantiProton" ), mcParticleGen.pt ());
321375 if (isPhysPrim)
322376 histos.fill (HIST (" spectraGen/histGenPtantiProtonPrim" ), mcParticleGen.pt ());
0 commit comments