@@ -80,6 +80,8 @@ std::array<std::shared_ptr<TH2>, NpCharge> hPtNumTOFMatchWithPIDSignalPrm; // Pt
8080
8181std::array<std::array<std::shared_ptr<TH3>, NpCharge>, 3 > hMCpdg_nsigmaTPC; // 2D array of nsigmaTPC histograms [Selection: pi,K,p][True PDG: 18 species]
8282
83+ const bool doprocessFullPar[Np] = {doprocessFullEl, doprocessFullMu, doprocessFullPi, doprocessFullKa, doprocessFullPr, doprocessFullDe, doprocessFullTr, doprocessFullHe, doprocessFullAl};
84+
8385// Spectra task
8486struct tofSpectra {
8587 struct : ConfigurableGroup {
@@ -588,10 +590,13 @@ struct tofSpectra {
588590 histos.add (" MC/MultiplicityMCINELgt1" , " MC multiplicity" , kTH1D , {multAxis});
589591 }
590592 if (doprocessTrackMCLabels) {
591- for (int par = 2 ; par <= 4 ; par++) {
592- for (int i = 0 ; i < NpCharge; i++) {
593- 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- }
593+
594+ for (int par = 0 ; par < Np; par++) {
595+ if (doprocessFullPar[par]){ // executes only for the enabled particles
596+ for (int i = 0 ; i < NpCharge; i++) {
597+ 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});
598+ }
599+ }
595600 }
596601 }
597602
@@ -1610,7 +1615,7 @@ struct tofSpectra {
16101615 for (const auto & track : tracks) {
16111616 // Track selection criteria
16121617 /* if (track.tpcNClsCrossedRows() < minNCrossedRowsTPC || track.tpcChi2NCl() > maxChi2PerClusterTPC || track.tpcChi2NCl() > maxChi2PerClusterTPC ||
1613- track.itsChi2NCl() > maxChi2PerClusterITS || std::abs(track.dcaXY()) > maxDcaXYFactor.value * (0.0105f + 0.0350f / pow(track.pt(), 1.1f)) || std::abs(track.dcaZ()) > maxDcaZ.value || track.eta() < trkselOptions.cfgCutEtaMin || track.eta() > trkselOptions.cfgCutEtaMax || track.tpcCrossedRowsOverFindableCls() < minNCrossedRowsOverFindableClustersTPC || track.tpcNClsFound() < minTPCNClsFound ||
1618+ track.itsChi2NCl() > maxChi2PerClusterITS || std::abs(track.dcaXY()) > maxDcaXYFactor.value * (0.0105f + 0.0350f / std:: pow(track.pt(), 1.1f)) || std::abs(track.dcaZ()) > maxDcaZ.value || track.eta() < trkselOptions.cfgCutEtaMin || track.eta() > trkselOptions.cfgCutEtaMax || track.tpcCrossedRowsOverFindableCls() < minNCrossedRowsOverFindableClustersTPC || track.tpcNClsFound() < minTPCNClsFound ||
16141619 !(o2::aod::track::ITSrefit) || !(o2::aod::track::TPCrefit)) {
16151620 continue;
16161621 }*/
@@ -1990,7 +1995,7 @@ struct tofSpectra {
19901995 const int charmOrigin = RecoDecay::getCharmHadronOrigin (mcParticles, mcParticle, false );
19911996 for (const auto & mother : mcParticle.template mothers_as <aod::McParticles>()) {
19921997 const int motherPdgCode = std::abs (mother.pdgCode ());
1993- if (motherPdgCode == 421 ) {
1998+ if (motherPdgCode == kD0 ) {
19941999 IsD0Mother = true ;
19952000 }
19962001 if (charmOrigin == RecoDecay::OriginType::NonPrompt) {
0 commit comments