Skip to content

Commit a912987

Browse files
committed
Added histogram for TOF nsigma with MC truth
1 parent 377466d commit a912987

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
@@ -79,6 +79,7 @@ std::array<std::shared_ptr<TH2>, NpCharge> hDecayLengthMCNotHF; // Decay Length
7979
std::array<std::shared_ptr<TH2>, NpCharge> hPtNumTOFMatchWithPIDSignalPrm; // Pt distribution of particles with a hit in the TOF and a compatible signal
8080

8181
std::array<std::array<std::shared_ptr<TH3>, NpCharge>, 3> hMCpdg_nsigmaTPC; // 2D array of nsigmaTPC histograms [Selection: pi,K,p][True PDG: 18 species]
82+
std::array<std::array<std::shared_ptr<TH3>, NpCharge>, 3> hMCpdg_nsigmaTOF; // 2D array of nsigmaTOF histograms [Selection: pi,K,p][True PDG: 18 species]
8283

8384
// Spectra task
8485
struct tofSpectra {
@@ -591,6 +592,7 @@ struct tofSpectra {
591592
for (int par = 2; par <= 4; par++) {
592593
for (int i = 0; i < NpCharge; i++) {
593594
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});
595+
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});
594596
}
595597
}
596598
}
@@ -2817,6 +2819,7 @@ struct tofSpectra {
28172819
int pdgCode = mcParticle.pdgCode();
28182820
static_for<2, 4>([&](auto par) {
28192821
const auto& nsigmaTPCpar = o2::aod::pidutils::tpcNSigma<par>(track);
2822+
const auto& nsigmaTOFpar = o2::aod::pidutils::tofNSigma<par>(track);
28202823
bool isTPCpar = std::abs(nsigmaTPCpar) < trkselOptions.cfgCutNsigma;
28212824
// Precompute rapidity values to avoid redundant calculations
28222825
double rapiditypar = std::abs(track.rapidity(PID::getMass(par)));
@@ -2825,6 +2828,7 @@ struct tofSpectra {
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)