From 34a8150ed293b990bc27ede3c670e4be21b0d893 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Wed, 24 Dec 2025 06:38:58 +0000 Subject: [PATCH] Please consider the following formatting changes --- PWGLF/Tasks/Nuspex/spectraTOF.cxx | 40 +++++++++++++++---------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/PWGLF/Tasks/Nuspex/spectraTOF.cxx b/PWGLF/Tasks/Nuspex/spectraTOF.cxx index 10fadd5c6e6..00c91fd9e82 100644 --- a/PWGLF/Tasks/Nuspex/spectraTOF.cxx +++ b/PWGLF/Tasks/Nuspex/spectraTOF.cxx @@ -78,7 +78,7 @@ std::array, NpCharge> hDecayLengthMCNotHF; // Decay Length std::array, NpCharge> hPtNumTOFMatchWithPIDSignalPrm; // Pt distribution of particles with a hit in the TOF and a compatible signal -std::array, NpCharge>, 3> hMCpdg_nsigmaTPC; //2D array of nsigmaTPC histograms [Selection: pi,K,p][True PDG: 18 species] +std::array, NpCharge>, 3> hMCpdg_nsigmaTPC; // 2D array of nsigmaTPC histograms [Selection: pi,K,p][True PDG: 18 species] // Spectra task struct tofSpectra { @@ -587,12 +587,12 @@ struct tofSpectra { histos.add("MC/MultiplicityMCINELgt0", "MC multiplicity", kTH1D, {multAxis}); histos.add("MC/MultiplicityMCINELgt1", "MC multiplicity", kTH1D, {multAxis}); } - - if (doprocessTrackMCLabels){ - for (int par = 2; par <= 4; par++){ - for (int i = 0; i < NpCharge; i++){ - hMCpdg_nsigmaTPC[par-2][i] = histos.add(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}); - } + + if (doprocessTrackMCLabels) { + for (int par = 2; par <= 4; par++) { + for (int i = 0; i < NpCharge; i++) { + hMCpdg_nsigmaTPC[par - 2][i] = histos.add(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}); + } } } @@ -2795,15 +2795,15 @@ struct tofSpectra { } } PROCESS_SWITCH(tofSpectra, processMCgen_RecoEvs, "process generated MC (reconstructed events)", false); - + void processTrackMCLabels(CollisionCandidates::iterator const& collisions, - soa::Join const& tracks, - aod::McTrackLabels const& mcTrackLabels, aod::McParticles const& mcParticles) + soa::Join const& tracks, + aod::McTrackLabels const& mcTrackLabels, aod::McParticles const& mcParticles) { const float multiplicity = getMultiplicity(collisions); - + for (const auto& track : tracks) { if (!track.has_collision()) { continue; @@ -2818,17 +2818,17 @@ struct tofSpectra { const auto& mcLabel = mcTrackLabels.iteratorAt(track.globalIndex()); const auto& mcParticle = mcParticles.iteratorAt(mcLabel.mcParticleId()); int pdgCode = mcParticle.pdgCode(); - - static_for<2,4>([&](auto par){ + + static_for<2, 4>([&](auto par) { const auto& nsigmaTPCpar = o2::aod::pidutils::tpcNSigma(track); bool isTPCpar = std::abs(nsigmaTPCpar) < trkselOptions.cfgCutNsigma; // Precompute rapidity values to avoid redundant calculations double rapiditypar = std::abs(track.rapidity(PID::getMass(par))); - //TPC Selection and histogram filling - if (isTPCpar && rapiditypar <= trkselOptions.cfgCutY){ - static_for<0, 17>([&](auto i){ - if (pdgCode == PDGs[i]){ - hMCpdg_nsigmaTPC[par-2][i]->Fill(track.pt(), nsigmaTPCpar, multiplicity); + // TPC Selection and histogram filling + if (isTPCpar && rapiditypar <= trkselOptions.cfgCutY) { + static_for<0, 17>([&](auto i) { + if (pdgCode == PDGs[i]) { + hMCpdg_nsigmaTPC[par - 2][i]->Fill(track.pt(), nsigmaTPCpar, multiplicity); } }); }