Skip to content

Commit 55686c2

Browse files
authored
PWGLF: fix MC index, add tof beta hist (#2403)
1 parent 58b0292 commit 55686c2

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

PWGLF/Tasks/NucleiSpectraTask.cxx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
// Data (run3):
1818
// o2-analysis-lf-nuclei-spectra, o2-analysis-track-propagation, o2-analysis-timestamp
1919
// o2-analysis-trackselection, o2-analysis-pid-tof-base, o2-analysis-pid-tof-full
20+
// o2-analysis-pid-tpc-base, o2-analysis-pid-tof-beta
2021
// o2-analysis-pid-tpc-full, o2-analysis-multiplicity-table, o2-analysis-event-selection
2122

2223
#include <cmath>
@@ -271,6 +272,7 @@ struct NucleiSpectraTask {
271272

272273
spectra.add("hRecVtxZData", "collision z position", HistType::kTH1F, {{200, -20., +20., "z position (cm)"}});
273274
spectra.add("hTpcSignalData", "Specific energy loss", HistType::kTH2F, {{600, -6., 6., "#it{p} (GeV/#it{c})"}, {1400, 0, 1400, "d#it{E} / d#it{X} (a. u.)"}});
275+
spectra.add("hTofSignalData", "TOF beta", HistType::kTH2F, {{500, 0., 5., "#it{p} (GeV/#it{c})"}, {750, 0, 1.5, "TOF #beta"}});
274276
for (int iC{0}; iC < 2; ++iC) {
275277
for (int iS{0}; iS < nuclei::species; ++iS) {
276278
for (int iPID{0}; iPID < 2; ++iPID) {
@@ -314,6 +316,7 @@ struct NucleiSpectraTask {
314316
}
315317
const int iC{track.sign() < 0};
316318
spectra.fill(HIST("hTpcSignalData"), track.tpcInnerParam() * track.sign(), track.tpcSignal());
319+
spectra.fill(HIST("hTofSignalData"), track.p(), track.beta());
317320
float nSigma[2][4]{
318321
{track.tpcNSigmaDe(), track.tpcNSigmaTr(), track.tpcNSigmaHe(), track.tpcNSigmaAl()},
319322
{track.tofNSigmaDe(), track.tofNSigmaTr(), track.tofNSigmaHe(), track.tofNSigmaAl()}};
@@ -433,9 +436,9 @@ struct NucleiSpectraTask {
433436
if (!isReconstructed[index] && (cfgTreeConfig->get(iS, 0u) || cfgTreeConfig->get(iS, 1u))) {
434437
nucleiTableMC(0, 0, 0, 0, 0, 0, flags, 0, 0, 0, particle.pt(), particle.eta(), particle.pdgCode());
435438
}
436-
index++;
437439
break;
438440
}
441+
index++;
439442
}
440443
}
441444
PROCESS_SWITCH(NucleiSpectraTask, processMC, "MC analysis", false);

0 commit comments

Comments
 (0)