Skip to content

Commit 492e76a

Browse files
committed
Fix whitespace and comma formatting issues in spectraTOF.cxx
1 parent 49c08ef commit 492e76a

File tree

1 file changed

+16
-20
lines changed

1 file changed

+16
-20
lines changed

PWGLF/Tasks/Nuspex/spectraTOF.cxx

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ std::array<std::shared_ptr<TH2>, NpCharge> hDecayLengthMCNotHF; // Decay Length
7878

7979
std::array<std::shared_ptr<TH2>, NpCharge> hPtNumTOFMatchWithPIDSignalPrm; // Pt distribution of particles with a hit in the TOF and a compatible signal
8080

81-
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]
81+
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]
8282

8383
// Spectra task
8484
struct tofSpectra {
@@ -587,12 +587,11 @@ struct tofSpectra {
587587
histos.add("MC/MultiplicityMCINELgt0", "MC multiplicity", kTH1D, {multAxis});
588588
histos.add("MC/MultiplicityMCINELgt1", "MC multiplicity", kTH1D, {multAxis});
589589
}
590-
591-
if (doprocessTrackMCLabels){
592-
for (int par = 2; par <= 4; par++){
593-
for (int i = 0; i < NpCharge; i++){
594-
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-
}
590+
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+
}
596595
}
597596
}
598597

@@ -2795,15 +2794,13 @@ struct tofSpectra {
27952794
}
27962795
}
27972796
PROCESS_SWITCH(tofSpectra, processMCgen_RecoEvs, "process generated MC (reconstructed events)", false);
2798-
27992797
void processTrackMCLabels(CollisionCandidates::iterator const& collisions,
2800-
soa::Join<TrackCandidates,
2801-
aod::pidTPCFullPi, aod::pidTPCFullKa, aod::pidTPCFullPr,
2802-
aod::pidTOFFullPi, aod::pidTOFFullKa, aod::pidTOFFullPr> const& tracks,
2803-
aod::McTrackLabels const& mcTrackLabels, aod::McParticles const& mcParticles)
2798+
soa::Join<TrackCandidates,
2799+
aod::pidTPCFullPi, aod::pidTPCFullKa, aod::pidTPCFullPr,
2800+
aod::pidTOFFullPi, aod::pidTOFFullKa, aod::pidTOFFullPr> const& tracks,
2801+
aod::McTrackLabels const& mcTrackLabels, aod::McParticles const& mcParticles)
28042802
{
28052803
const float multiplicity = getMultiplicity(collisions);
2806-
28072804
for (const auto& track : tracks) {
28082805
if (!track.has_collision()) {
28092806
continue;
@@ -2818,17 +2815,16 @@ struct tofSpectra {
28182815
const auto& mcLabel = mcTrackLabels.iteratorAt(track.globalIndex());
28192816
const auto& mcParticle = mcParticles.iteratorAt(mcLabel.mcParticleId());
28202817
int pdgCode = mcParticle.pdgCode();
2821-
2822-
static_for<2,4>([&](auto par){
2818+
static_for<2, 4>([&](auto par) {
28232819
const auto& nsigmaTPCpar = o2::aod::pidutils::tpcNSigma<par>(track);
28242820
bool isTPCpar = std::abs(nsigmaTPCpar) < trkselOptions.cfgCutNsigma;
28252821
// Precompute rapidity values to avoid redundant calculations
28262822
double rapiditypar = std::abs(track.rapidity(PID::getMass(par)));
2827-
//TPC Selection and histogram filling
2828-
if (isTPCpar && rapiditypar <= trkselOptions.cfgCutY){
2829-
static_for<0, 17>([&](auto i){
2830-
if (pdgCode == PDGs[i]){
2831-
hMCpdg_nsigmaTPC[par-2][i]->Fill(track.pt(), nsigmaTPCpar, multiplicity);
2823+
// TPC Selection and histogram filling
2824+
if (isTPCpar && rapiditypar <= trkselOptions.cfgCutY) {
2825+
static_for<0, 17>([&](auto i) {
2826+
if (pdgCode == PDGs[i]) {
2827+
hMCpdg_nsigmaTPC[par - 2][i]->Fill(track.pt(), nsigmaTPCpar, multiplicity);
28322828
}
28332829
});
28342830
}

0 commit comments

Comments
 (0)