Skip to content

Commit 956360c

Browse files
committed
Test histogram for TOF nSigma with MC
1 parent 439d0ed commit 956360c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

PWGLF/Tasks/Nuspex/spectraTOF.cxx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,7 @@ struct tofSpectra {
591591
for (int par = 2; par <= 4; par++) {
592592
for (int i = 0; i < NpCharge; i++) {
593593
hMCpdg_nsigmaTPC[par - 2][i] = histos.add<TH3>(Form("test_mclabels/nsigmatpc/%s/%s/pdg_%i", (i < Np) ? "pos" : "neg", pN[par], PDGs[i % Np]), Form("True %s (%i) in %s selection", pTCharge[i], PDGs[i], (i < Np) ? pTCharge[par] : pTCharge[par + Np]), kTH3D, {ptAxis, nsigmaTPCAxisOccupancy, multAxis});
594+
hMCpdg_nsigmaTOF[par - 2][i] = histos.add<TH3>(Form("test_mclabels/nsigmatof/%s/%s/pdg_%i", (i < Np) ? "pos" : "neg", pN[par], PDGs[i % Np]), Form("True %s (%i) in %s selection", pTCharge[i], PDGs[i], (i < Np) ? pTCharge[par] : pTCharge[par + Np]), kTH3D, {ptAxis, nsigmaTOFAxisOccupancy, multAxis});
594595
}
595596
}
596597
}
@@ -2817,14 +2818,17 @@ struct tofSpectra {
28172818
int pdgCode = mcParticle.pdgCode();
28182819
static_for<2, 4>([&](auto par) {
28192820
const auto& nsigmaTPCpar = o2::aod::pidutils::tpcNSigma<par>(track);
2821+
const auto& nsigmaTOFpar = o2::aod::pidutils::tofNSigma<par>(track);
28202822
bool isTPCpar = std::abs(nsigmaTPCpar) < trkselOptions.cfgCutNsigma;
2823+
bool isTOFpar = std::abs(nsigmaTOFpar) < trkselOptions.cfgCutNsigma;
28212824
// Precompute rapidity values to avoid redundant calculations
28222825
double rapiditypar = std::abs(track.rapidity(PID::getMass(par)));
28232826
// TPC Selection and histogram filling
28242827
if (isTPCpar && rapiditypar <= trkselOptions.cfgCutY) {
28252828
static_for<0, 17>([&](auto i) {
28262829
if (pdgCode == PDGs[i]) {
28272830
hMCpdg_nsigmaTPC[par - 2][i]->Fill(track.pt(), nsigmaTPCpar, multiplicity);
2831+
hMCpdg_nsigmaTOF[par - 2][i]->Fill(track.pt(), nsigmaTOFpar, multiplicity);
28282832
}
28292833
});
28302834
}

0 commit comments

Comments
 (0)