@@ -88,6 +88,10 @@ struct LFNucleiBATask {
8888 histos.add <TH1 >(" tracks/deuteron/h1DeuteronSpectra" , " #it{p}_{T} (d)" , HistType::kTH1F , {ptAxis});
8989 histos.add <TH1 >(" tracks/helium/h1HeliumSpectra" , " #it{p}_{T} (He)" , HistType::kTH1F , {ptAxis});
9090
91+ histos.add <TH1 >(" tracks/proton/h1antiProtonSpectra" , " #it{p}_{T} (#bar{p})" , HistType::kTH1F , {ptAxis});
92+ histos.add <TH1 >(" tracks/deuteron/h1antiDeuteronSpectra" , " #it{p}_{T} (#bar{d})" , HistType::kTH1F , {ptAxis});
93+ histos.add <TH1 >(" tracks/helium/h1antiHeliumSpectra" , " #it{p}_{T} (#bar{He})" , HistType::kTH1F , {ptAxis});
94+
9195 if (doprocessMCReco) {
9296 histos.add <TH1 >(" tracks/proton/h1ProtonSpectraTrue" , " #it{p}_{T} (p)" , HistType::kTH1F , {ptAxis});
9397 histos.add <TH1 >(" tracks/proton/h1ProtonSpectraTruePrim" , " #it{p}_{T} (p)" , HistType::kTH1F , {ptAxis});
@@ -115,21 +119,31 @@ struct LFNucleiBATask {
115119 histos.add <TH1 >(" tracks/helium/h1HeliumSpectraTrueTransport" , " #it{p}_{T} (He)" , HistType::kTH1F , {ptAxis});
116120
117121 histos.add <TH1 >(" tracks/helium/h1antiHeliumSpectraTrue" , " #it{p}_{T} (He)" , HistType::kTH1F , {ptAxis});
122+ histos.add <TH1 >(" tracks/helium/h1antiHeliumSpectraTruePrim" , " #it{p}_{T} (He)" , HistType::kTH1F , {ptAxis});
123+ histos.add <TH1 >(" tracks/helium/h1antiHeliumSpectraTrueSec" , " #it{p}_{T} (He)" , HistType::kTH1F , {ptAxis});
124+ histos.add <TH1 >(" tracks/helium/h1antiHeliumSpectraTrueTransport" , " #it{p}_{T} (He)" , HistType::kTH1F , {ptAxis});
118125 }
119126
120- histos.add <TH2 >(" tracks/h2TPCsignVsTPCmomentum" , " -dE/dX vs p; p (GeV/c); -dE/dx (a.u.)" , HistType::kTH2F , {{500 , 0.0 , 5.0 }, {81000 , 0.0 , 1E3 }});
121- histos.add <TH2 >(" tracks/h2TOFbetaVsP" , " #beta (TOF) vs p; p (GeV/c); #beta" , HistType::kTH2F , {{500 , 0.0 , 5.0 }, {1200 , 0.0 , 1.2 }});
127+ histos.add <TH2 >(" tracks/h2TPCsignVsTPCmomentum" , " -dE/dX vs p/Z ; p/Z (GeV/c); -dE/dx (a.u.)" , HistType::kTH2F , {{1000 , - 5 . f , 5 .f }, {81000 , 0.0 , 1E3 }});
128+ histos.add <TH2 >(" tracks/h2TOFbetaVsP" , " #beta (TOF) vs p/Z ; p/Z (GeV/c); #beta" , HistType::kTH2F , {{1000 , - 5 . f , 5 .f }, {1200 , 0.0 , 1.2 }});
122129
123130 histos.add <TH2 >(" tracks/pion/h2PionVspTNSigmaTPC" , " NSigmaTPC(pi) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC" , HistType::kTH2F , {{ptAxis}, {200 , -10 , 10 .}});
124131 histos.add <TH2 >(" tracks/kaon/h2KaonVspTNSigmaTPC" , " NSigmaTPC(Ka) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC" , HistType::kTH2F , {{ptAxis}, {200 , -10 , 10 .}});
125- histos.add <TH2 >(" tracks/proton/h2ProtonVspTNSigmaTPC" , " NSigmaTPC(proton ) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC" , HistType::kTH2F , {{ptAxis}, {200 , -10 , 10 .}});
126- histos.add <TH2 >(" tracks/deuteron/h2DeuteronVspTNSigmaTPC" , " NSigmaTPC(D ) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC" , HistType::kTH2F , {{ptAxis}, {200 , -10 , 10 .}});
132+ histos.add <TH2 >(" tracks/proton/h2ProtonVspTNSigmaTPC" , " NSigmaTPC(p ) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC" , HistType::kTH2F , {{ptAxis}, {200 , -10 , 10 .}});
133+ histos.add <TH2 >(" tracks/deuteron/h2DeuteronVspTNSigmaTPC" , " NSigmaTPC(d ) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC" , HistType::kTH2F , {{ptAxis}, {200 , -10 , 10 .}});
127134 histos.add <TH2 >(" tracks/helium/h2HeliumVspTNSigmaTPC" , " NSigmaTPC(He) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC" , HistType::kTH2F , {{ptAxis}, {200 , -10 , 10 .}});
135+ histos.add <TH2 >(" tracks/proton/h2antiProtonVspTNSigmaTPC" , " NSigmaTPC(#bar{p}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC" , HistType::kTH2F , {{ptAxis}, {200 , -10 , 10 .}});
136+ histos.add <TH2 >(" tracks/deuteron/h2antiDeuteronVspTNSigmaTPC" , " NSigmaTPC(#bar{d}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC" , HistType::kTH2F , {{ptAxis}, {200 , -10 , 10 .}});
137+ histos.add <TH2 >(" tracks/helium/h2antiHeliumVspTNSigmaTPC" , " NSigmaTPC(#bar{He}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC" , HistType::kTH2F , {{ptAxis}, {200 , -10 , 10 .}});
138+
128139 histos.add <TH2 >(" tracks/pion/h2PionVspTNSigmaTOF" , " NSigmaTOF(pi) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF" , HistType::kTH2F , {{ptAxis}, {200 , -10 , 10 .}});
129140 histos.add <TH2 >(" tracks/kaon/h2KaonVspTNSigmaTOF" , " NSigmaTOF(Ka) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF" , HistType::kTH2F , {{ptAxis}, {200 , -10 , 10 .}});
130- histos.add <TH2 >(" tracks/proton/h2ProtonVspTNSigmaTOF" , " NSigmaTOF(proton ) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF" , HistType::kTH2F , {{ptAxis}, {200 , -10 , 10 .}});
131- histos.add <TH2 >(" tracks/deuteron/h2DeuteronVspTNSigmaTOF" , " NSigmaTOF(D ) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF" , HistType::kTH2F , {{ptAxis}, {200 , -10 , 10 .}});
141+ histos.add <TH2 >(" tracks/proton/h2ProtonVspTNSigmaTOF" , " NSigmaTOF(p ) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF" , HistType::kTH2F , {{ptAxis}, {200 , -10 , 10 .}});
142+ histos.add <TH2 >(" tracks/deuteron/h2DeuteronVspTNSigmaTOF" , " NSigmaTOF(d ) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF" , HistType::kTH2F , {{ptAxis}, {200 , -10 , 10 .}});
132143 histos.add <TH2 >(" tracks/helium/h2HeliumVspTNSigmaTOF" , " NSigmaTOF(He) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF" , HistType::kTH2F , {{ptAxis}, {200 , -10 , 10 .}});
144+ histos.add <TH2 >(" tracks/proton/h2antiProtonVspTNSigmaTOF" , " NSigmaTOF(#bar{p}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF" , HistType::kTH2F , {{ptAxis}, {200 , -10 , 10 .}});
145+ histos.add <TH2 >(" tracks/deuteron/h2antiDeuteronVspTNSigmaTOF" , " NSigmaTOF(#bar{d}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF" , HistType::kTH2F , {{ptAxis}, {200 , -10 , 10 .}});
146+ histos.add <TH2 >(" tracks/helium/h2antiHeliumVspTNSigmaTOF" , " NSigmaTOF(#bar{He}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF" , HistType::kTH2F , {{ptAxis}, {200 , -10 , 10 .}});
133147
134148 // TOF mass histograms
135149 histos.add <TH2 >(" tracks/h2TOFmassVsPt" , " h2TOFmassVsPt; TOFmass; #it{p}_{T} (GeV)" , HistType::kTH2F , {{600 , 0 ., 3 .}, {500 , 0 ., 5 .}});
@@ -139,6 +153,10 @@ struct LFNucleiBATask {
139153 histos.add <TH2 >(" tracks/deuteron/h2TOFmass2DeuteronVsPt" , " #Delta M^{2} (d) vs #it{p}_{T}; #Delta M^{2} (d); #it{p}_{T} (GeV/#it{c})" , HistType::kTH2F , {{1000 , -5 ., 5 .}, {800 , 0 ., 8 .}});
140154 histos.add <TH2 >(" tracks/helium/h2TOFmass2HeliumVsPt" , " #Delta M^{2} (He) vs #it{p}_{T}; #Delta M^{2} (He); #it{p}_{T} (GeV/#it{c})" , HistType::kTH2F , {{1800 , -9 ., 9 .}, {800 , 0 ., 8 .}});
141155
156+ histos.add <TH2 >(" tracks/proton/h2TOFmass2antiProtonVsPt" , " #Delta M^{2} (#bar{p}) vs #it{p}_{T}; #Delta M^{2} (#bar{p}); #it{p}_{T} (GeV/#it{c})" , HistType::kTH2F , {{600 , -3 ., 3 .}, {800 , 0 ., 8 .}});
157+ histos.add <TH2 >(" tracks/deuteron/h2TOFmass2antiDeuteronVsPt" , " #Delta M^{2} (#bar{d}) vs #it{p}_{T}; #Delta M^{2} (#bar{d}); #it{p}_{T} (GeV/#it{c})" , HistType::kTH2F , {{1000 , -5 ., 5 .}, {800 , 0 ., 8 .}});
158+ histos.add <TH2 >(" tracks/helium/h2TOFmass2antiHeliumVsPt" , " #Delta M^{2} (#bar{He}) vs #it{p}_{T}; #Delta M^{2} (#bar{He}); #it{p}_{T} (GeV/#it{c})" , HistType::kTH2F , {{1800 , -9 ., 9 .}, {800 , 0 ., 8 .}});
159+
142160 // MC histograms
143161 // AxisSpec ptAxis = {2000, 0.f, 20.f, "#it{p}_{T} (GeV/#it{c})"};
144162 histos.add (" spectraGen/histGenVetxZ" , " PosZ generated events" , HistType::kTH1F , {{2000 , -20 .f , 20 .f , " Vertex Z (cm)" }});
@@ -216,33 +234,57 @@ struct LFNucleiBATask {
216234
217235 // TPC
218236 // if(std::abs(track.nsigTPCD()) < 5. && std::abs(track.nsigTOFD()) < 3.)
219- histos.fill (HIST (" tracks/h2TPCsignVsTPCmomentum" ), track.tpcInnerParam (), track.tpcSignal ());
237+ histos.fill (HIST (" tracks/h2TPCsignVsTPCmomentum" ), track.tpcInnerParam () / ( 1 . f * track. sign ()) , track.tpcSignal ());
220238
221239 histos.fill (HIST (" tracks/pion/h2PionVspTNSigmaTPC" ), track.pt (), track.nsigTPCPi ());
222240 histos.fill (HIST (" tracks/kaon/h2KaonVspTNSigmaTPC" ), track.pt (), track.nsigTPCKa ());
223- histos.fill (HIST (" tracks/proton/h2ProtonVspTNSigmaTPC" ), track.pt (), track.nsigTPCPr ());
224- histos.fill (HIST (" tracks/deuteron/h2DeuteronVspTNSigmaTPC" ), track.pt (), track.nsigTPCD ());
225- histos.fill (HIST (" tracks/helium/h2HeliumVspTNSigmaTPC" ), track.pt (), track.nsigTPC3He ());
226241
242+ if (track.sign () > 0 ) {
243+ histos.fill (HIST (" tracks/proton/h2ProtonVspTNSigmaTPC" ), track.pt (), track.nsigTPCPr ());
244+ histos.fill (HIST (" tracks/deuteron/h2DeuteronVspTNSigmaTPC" ), track.pt (), track.nsigTPCD ());
245+ histos.fill (HIST (" tracks/helium/h2HeliumVspTNSigmaTPC" ), track.pt (), track.nsigTPC3He ());
246+ } else {
247+ histos.fill (HIST (" tracks/proton/h2antiProtonVspTNSigmaTPC" ), track.pt (), track.nsigTPCPr ());
248+ histos.fill (HIST (" tracks/deuteron/h2antiDeuteronVspTNSigmaTPC" ), track.pt (), track.nsigTPCD ());
249+ histos.fill (HIST (" tracks/helium/h2antiHeliumVspTNSigmaTPC" ), track.pt (), track.nsigTPC3He ());
250+ }
227251 // TOF
228252 histos.fill (HIST (" tracks/pion/h2PionVspTNSigmaTOF" ), track.pt (), track.nsigTOFPi ());
229253 histos.fill (HIST (" tracks/kaon/h2KaonVspTNSigmaTOF" ), track.pt (), track.nsigTOFKa ());
230- histos.fill (HIST (" tracks/proton/h2ProtonVspTNSigmaTOF" ), track.pt (), track.nsigTOFPr ());
231- histos.fill (HIST (" tracks/deuteron/h2DeuteronVspTNSigmaTOF" ), track.pt (), track.nsigTOFD ());
232- histos.fill (HIST (" tracks/helium/h2HeliumVspTNSigmaTOF" ), track.pt (), track.nsigTOF3He ());
254+ if (track.sign () > 0 ) {
255+ histos.fill (HIST (" tracks/proton/h2ProtonVspTNSigmaTOF" ), track.pt (), track.nsigTOFPr ());
256+ histos.fill (HIST (" tracks/deuteron/h2DeuteronVspTNSigmaTOF" ), track.pt (), track.nsigTOFD ());
257+ histos.fill (HIST (" tracks/helium/h2HeliumVspTNSigmaTOF" ), track.pt (), track.nsigTOF3He ());
258+ } else {
259+ histos.fill (HIST (" tracks/proton/h2antiProtonVspTNSigmaTOF" ), track.pt (), track.nsigTOFPr ());
260+ histos.fill (HIST (" tracks/deuteron/h2antiDeuteronVspTNSigmaTOF" ), track.pt (), track.nsigTOFD ());
261+ histos.fill (HIST (" tracks/helium/h2antiHeliumVspTNSigmaTOF" ), track.pt (), track.nsigTOF3He ());
262+ }
233263
234264 // PID
235- if (std::abs (track.nsigTPCPr ()) < nsigmaTPCcut)
236- histos.fill (HIST (" tracks/proton/h1ProtonSpectra" ), track.pt ());
265+ if (std::abs (track.nsigTPCPr ()) < nsigmaTPCcut) {
266+ if (track.sign () > 0 )
267+ histos.fill (HIST (" tracks/proton/h1ProtonSpectra" ), track.pt ());
268+ else
269+ histos.fill (HIST (" tracks/proton/h1antiProtonSpectra" ), track.pt ());
270+ }
237271
238- if (std::abs (track.nsigTPCD ()) < nsigmaTPCcut)
239- histos.fill (HIST (" tracks/deuteron/h1DeuteronSpectra" ), track.pt ());
272+ if (std::abs (track.nsigTPCD ()) < nsigmaTPCcut) {
273+ if (track.sign () > 0 )
274+ histos.fill (HIST (" tracks/deuteron/h1DeuteronSpectra" ), track.pt ());
275+ else
276+ histos.fill (HIST (" tracks/deuteron/h1antiDeuteronSpectra" ), track.pt ());
277+ }
240278
241- if (std::abs (track.nsigTPC3He ()) < nsigmaTPCcut)
242- histos.fill (HIST (" tracks/helium/h1HeliumSpectra" ), track.pt ());
279+ if (std::abs (track.nsigTPC3He ()) < nsigmaTPCcut) {
280+ if (track.sign () > 0 )
281+ histos.fill (HIST (" tracks/helium/h1HeliumSpectra" ), track.pt ());
282+ else
283+ histos.fill (HIST (" tracks/helium/h1antiHeliumSpectra" ), track.pt ());
284+ }
243285
244286 if (track.hasTOF ()) {
245- histos.fill (HIST (" tracks/h2TOFbetaVsP" ), track.p (), track.beta ());
287+ histos.fill (HIST (" tracks/h2TOFbetaVsP" ), track.p () / ( 1 . f * track. sign ()) , track.beta ());
246288 if ((track.beta () * track.beta ()) < 1 .) {
247289 gamma = 1 .f / TMath::Sqrt (1 .f - (track.beta () * track.beta ()));
248290 massTOF = track.p () / TMath::Sqrt (gamma * gamma - 1 .f );
@@ -251,14 +293,25 @@ struct LFNucleiBATask {
251293 }
252294 histos.fill (HIST (" tracks/h2TOFmassVsPt" ), massTOF, track.pt ());
253295
254- if (std::abs (track.nsigTPCPr ()) < nsigmaTPCcut)
255- histos.fill (HIST (" tracks/proton/h2TOFmass2ProtonVsPt" ), massTOF * massTOF - fMassProton * fMassProton , track.pt ());
256-
257- if (std::abs (track.nsigTPCD ()) < nsigmaTPCcut)
258- histos.fill (HIST (" tracks/deuteron/h2TOFmass2DeuteronVsPt" ), massTOF * massTOF - fMassDeuteron * fMassDeuteron , track.pt ());
296+ if (std::abs (track.nsigTPCPr ()) < nsigmaTPCcut) {
297+ if (track.sign () > 0 )
298+ histos.fill (HIST (" tracks/proton/h2TOFmass2ProtonVsPt" ), massTOF * massTOF - fMassProton * fMassProton , track.pt ());
299+ else
300+ histos.fill (HIST (" tracks/proton/h2TOFmass2antiProtonVsPt" ), massTOF * massTOF - fMassProton * fMassProton , track.pt ());
301+ }
259302
260- if (std::abs (track.nsigTPC3He ()) < nsigmaTPCcut)
261- histos.fill (HIST (" tracks/helium/h2TOFmass2HeliumVsPt" ), massTOF * massTOF - fMassHelium * fMassHelium , track.pt ());
303+ if (std::abs (track.nsigTPCD ()) < nsigmaTPCcut) {
304+ if (track.sign () > 0 )
305+ histos.fill (HIST (" tracks/deuteron/h2TOFmass2DeuteronVsPt" ), massTOF * massTOF - fMassDeuteron * fMassDeuteron , track.pt ());
306+ else
307+ histos.fill (HIST (" tracks/deuteron/h2TOFmass2antiDeuteronVsPt" ), massTOF * massTOF - fMassDeuteron * fMassDeuteron , track.pt ());
308+ }
309+ if (std::abs (track.nsigTPC3He ()) < nsigmaTPCcut) {
310+ if (track.sign () > 0 )
311+ histos.fill (HIST (" tracks/helium/h2TOFmass2HeliumVsPt" ), massTOF * massTOF - fMassHelium * fMassHelium , track.pt ());
312+ else
313+ histos.fill (HIST (" tracks/helium/h2TOFmass2antiHeliumVsPt" ), massTOF * massTOF - fMassHelium * fMassHelium , track.pt ());
314+ }
262315 }
263316 if constexpr (IsMC) {
264317 bool isPhysPrim = track.isPhysicalPrimary ();
@@ -313,6 +366,16 @@ struct LFNucleiBATask {
313366 if (!isPhysPrim && !isProdByGen)
314367 histos.fill (HIST (" tracks/helium/h1HeliumSpectraTrueTransport" ), track.pt ());
315368 }
369+
370+ if (track.pdgCode () == -PDGHelium) {
371+ histos.fill (HIST (" tracks/helium/h1antiHeliumSpectraTrue" ), track.pt ());
372+ if (isPhysPrim)
373+ histos.fill (HIST (" tracks/helium/h1antiHeliumSpectraTruePrim" ), track.pt ());
374+ if (!isPhysPrim && isProdByGen)
375+ histos.fill (HIST (" tracks/helium/h1antiHeliumSpectraTrueSec" ), track.pt ());
376+ if (!isPhysPrim && !isProdByGen)
377+ histos.fill (HIST (" tracks/helium/h1antiHeliumSpectraTrueTransport" ), track.pt ());
378+ }
316379 }
317380 }
318381 }
0 commit comments