From d3aaa57dc09770c7760f0d7cca06212d7d207d24 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Thu, 27 Mar 2025 07:06:39 +0000 Subject: [PATCH] Please consider the following formatting changes --- .../TableProducer/identifiedBfFilter.cxx | 70 +++++++++---------- 1 file changed, 34 insertions(+), 36 deletions(-) diff --git a/PWGCF/TwoParticleCorrelations/TableProducer/identifiedBfFilter.cxx b/PWGCF/TwoParticleCorrelations/TableProducer/identifiedBfFilter.cxx index 315fb62cc9f..3d68eb6a1f7 100644 --- a/PWGCF/TwoParticleCorrelations/TableProducer/identifiedBfFilter.cxx +++ b/PWGCF/TwoParticleCorrelations/TableProducer/identifiedBfFilter.cxx @@ -159,8 +159,8 @@ TH2F* fhCompatibleCollisionsZVtxRms = nullptr; TH2S* fhTruePIDMismatch = nullptr; TH1S* fhTruePIDCorrect = nullptr; -std::vector> fhTrueNSigmaTPC = {o2::analysis::identifiedbffilter::kIdBfNoOfSpecies,{o2::analysis::identifiedbffilter::kIdBfNoOfSpecies,nullptr}}; -std::vector> fhTrueNSigmaTOF = {o2::analysis::identifiedbffilter::kIdBfNoOfSpecies,{o2::analysis::identifiedbffilter::kIdBfNoOfSpecies,nullptr}}; +std::vector> fhTrueNSigmaTPC = {o2::analysis::identifiedbffilter::kIdBfNoOfSpecies, {o2::analysis::identifiedbffilter::kIdBfNoOfSpecies, nullptr}}; +std::vector> fhTrueNSigmaTOF = {o2::analysis::identifiedbffilter::kIdBfNoOfSpecies, {o2::analysis::identifiedbffilter::kIdBfNoOfSpecies, nullptr}}; TH1F* fhTrueCentMultB = nullptr; TH1F* fhTrueCentMultA = nullptr; @@ -893,9 +893,8 @@ struct IdentifiedBfFilterTracks { TString::Format("dE/dx vs P_{IP} reconstructed %s; P (GeV/c); dE/dx (a.u.)", speciesTitle[sp]).Data(), ptbins, ptlow, ptup, 1000, 0.0, 1000.0); fhTrackTime[sp] = new TH2F(TString::Format("fhTrackTime_%s", speciesName[sp]).Data(), - TString::Format("Track Time vs P_{IP} reconstructed %s; P (GeV/c); Track Time (ns)", speciesTitle[sp]).Data(), - ptbins, ptlow, ptup, 200, 0.0, 20.0); - + TString::Format("Track Time vs P_{IP} reconstructed %s; P (GeV/c); Track Time (ns)", speciesTitle[sp]).Data(), + ptbins, ptlow, ptup, 200, 0.0, 20.0); } fhdEdxA[kIdBfNoOfSpecies + 1] = new TH2F(TString::Format("fhdEdxA_WrongSpecies").Data(), TString::Format("dE/dx vs P reconstructed Wrong Species; P (GeV/c); dE/dx (a.u.)").Data(), @@ -904,8 +903,8 @@ struct IdentifiedBfFilterTracks { TString::Format("dE/dx vs P_{IP} reconstructed Wrong Species; P (GeV/c); dE/dx (a.u.)").Data(), ptbins, ptlow, ptup, 1000, 0.0, 1000.0); fhTrackTime[kIdBfNoOfSpecies + 1] = new TH2F(TString::Format("fhTrackTime_WrongSpecies").Data(), - TString::Format("Track Time vs P_{IP} reconstructed Wrong Species; P (GeV/c); Track Time (ns)").Data(), - ptbins, ptlow, ptup, 200, 0.0, 20.0); + TString::Format("Track Time vs P_{IP} reconstructed Wrong Species; P (GeV/c); Track Time (ns)").Data(), + ptbins, ptlow, ptup, 200, 0.0, 20.0); /* add the hstograms to the output list */ fOutputList->Add(fhXYB); @@ -1037,25 +1036,24 @@ struct IdentifiedBfFilterTracks { TString::Format("N(%s^{#plus}) #minus N(%s^{#minus}) distribution (truth);N(%s^{#plus}) #minus N(%s^{#minus})", speciesTitle[sp], speciesTitle[sp], speciesTitle[sp], speciesTitle[sp]).Data(), 79, -39.5, 39.5); fhTruedEdx[sp] = new TH2F(TString::Format("fhTruedEdxA_%s", speciesName[sp]).Data(), - TString::Format("dE/dx vs P_{IP} Generated %s; P (GeV/c); dE/dx (a.u.)", speciesTitle[sp]).Data(), - ptbins, ptlow, ptup, 1000, 0.0, 1000.0); + TString::Format("dE/dx vs P_{IP} Generated %s; P (GeV/c); dE/dx (a.u.)", speciesTitle[sp]).Data(), + ptbins, ptlow, ptup, 1000, 0.0, 1000.0); fhTrueTrackTime[sp] = new TH2F(TString::Format("fhTrueTrackTimeA_%s", speciesName[sp]).Data(), - TString::Format("Track Time vs P_{IP} Generated %s; P (GeV/c); Track Time (ns)", speciesTitle[sp]).Data(), - ptbins, ptlow, ptup, 200, 0.0, 20.0); - + TString::Format("Track Time vs P_{IP} Generated %s; P (GeV/c); Track Time (ns)", speciesTitle[sp]).Data(), + ptbins, ptlow, ptup, 200, 0.0, 20.0); } for (int sp1 = 0; sp1 < kIdBfNoOfSpecies; ++sp1) { for (int sp2 = 0; sp2 < kIdBfNoOfSpecies; ++sp2) { fhTrueNSigmaTPC[sp1][sp2] = new TH2F(TString::Format("fhTrueNSigmaTPC%s_%s", speciesName[sp1], speciesName[sp2]).Data(), - TString::Format("N #sigma %s from TPC vs P for generated %s;N #sigma;p (GeV/c)", speciesTitle[sp1], speciesTitle[sp2]).Data(), - 48, -6, 6, - ptbins, ptlow, ptup); + TString::Format("N #sigma %s from TPC vs P for generated %s;N #sigma;p (GeV/c)", speciesTitle[sp1], speciesTitle[sp2]).Data(), + 48, -6, 6, + ptbins, ptlow, ptup); fhTrueNSigmaTOF[sp1][sp2] = new TH2F(TString::Format("fhTrueNSigmaTOF%s_%s", speciesName[sp1], speciesName[sp2]).Data(), - TString::Format("N #sigma %s from TOF vs P for generated %s;N #sigma;p (GeV/c)", speciesTitle[sp1], speciesTitle[sp2]).Data(), - 48, -6, 6, - ptbins, ptlow, ptup); + TString::Format("N #sigma %s from TOF vs P for generated %s;N #sigma;p (GeV/c)", speciesTitle[sp1], speciesTitle[sp2]).Data(), + 48, -6, 6, + ptbins, ptlow, ptup); } } @@ -1494,14 +1492,14 @@ inline MatchRecoGenSpecies IdentifiedBfFilterTracks::identifyTrack(TrackObject c fillNSigmaHistos(track); - std::vector actualTPCNSigma(kIdBfNoOfSpecies,0.); + std::vector actualTPCNSigma(kIdBfNoOfSpecies, 0.); actualTPCNSigma[kIdBfElectron] = track.tpcNSigmaEl(); actualTPCNSigma[kIdBfPion] = track.tpcNSigmaPi(); actualTPCNSigma[kIdBfKaon] = track.tpcNSigmaKa(); actualTPCNSigma[kIdBfProton] = track.tpcNSigmaPr(); - std::vector actualTOFNSigma(kIdBfNoOfSpecies,0.); + std::vector actualTOFNSigma(kIdBfNoOfSpecies, 0.); actualTOFNSigma[kIdBfElectron] = track.tofNSigmaEl(); actualTOFNSigma[kIdBfPion] = track.tofNSigmaPi(); @@ -1511,7 +1509,7 @@ inline MatchRecoGenSpecies IdentifiedBfFilterTracks::identifyTrack(TrackObject c float nsigmas[kIdBfNoOfSpecies]; if constexpr (framework::has_type_v) { - identifyRealNSigma(track.template mcParticle_as(),actualTPCNSigma, actualTOFNSigma, track.tpcInnerParam()); + identifyRealNSigma(track.template mcParticle_as(), actualTPCNSigma, actualTOFNSigma, track.tpcInnerParam()); } if (loadfromccdb) { @@ -1532,7 +1530,7 @@ inline MatchRecoGenSpecies IdentifiedBfFilterTracks::identifyTrack(TrackObject c nsigmas[iSp] = sqrtf(actualTPCNSigma[iSp] * actualTPCNSigma[iSp] + actualTOFNSigma[iSp] * actualTOFNSigma[iSp]); } } else if (!reqTOF || !onlyTOF) { - //If I don't require TOF after the tofCut, use TPC only for tracks w/o TOF + // If I don't require TOF after the tofCut, use TPC only for tracks w/o TOF for (int iSp = 0; iSp < kIdBfNoOfSpecies; iSp++) { nsigmas[iSp] = actualTPCNSigma[iSp]; } @@ -1545,8 +1543,8 @@ inline MatchRecoGenSpecies IdentifiedBfFilterTracks::identifyTrack(TrackObject c } } - //Change this to just skip undesired particle checks instead of setting the nsigma to 999.0f - //This method will allow for exclusion of the electron band + // Change this to just skip undesired particle checks instead of setting the nsigma to 999.0f + // This method will allow for exclusion of the electron band if (!pidEl) { nsigmas[kIdBfElectron] = 999.0f; } @@ -1583,7 +1581,7 @@ inline MatchRecoGenSpecies IdentifiedBfFilterTracks::identifyTrack(TrackObject c fhWrongTrackID->Fill(track.p()); fhdEdxA[kIdBfNoOfSpecies]->Fill(track.p(), track.tpcSignal()); fhdEdxIPTPCA[kIdBfNoOfSpecies]->Fill(track.tpcInnerParam(), track.tpcSignal()); - if(track.hasTOF()){ + if (track.hasTOF()) { fhTrackTime[kIdBfNoOfSpecies]->Fill(track.tpcInnerParam(), track.trackTime()); } fhDoublePID->Fill(spMinNSigma, spDouble); @@ -1620,7 +1618,7 @@ inline int8_t IdentifiedBfFilterTracks::acceptTrack(TrackObject const& track) if (matchTrackType(track)) { if (ptlow < track.pt() && track.pt() < ptup && etalow < track.eta() && track.eta() < etaup) { fillTrackHistosAfterSelection(track, kIdBfCharged); - if constexpr (framework::has_type_v){ + if constexpr (framework::has_type_v) { fillTrueTrackHistosAfterSelection(track); } MatchRecoGenSpecies sp = kWrongSpecies; @@ -1803,7 +1801,8 @@ void IdentifiedBfFilterTracks::fillTrackHistosBeforeSelection(TrackObject const& } template -inline MatchRecoGenSpecies IdentifiedBfFilterTracks::findTruePID(ParticleObject const& particle){ +inline MatchRecoGenSpecies IdentifiedBfFilterTracks::findTruePID(ParticleObject const& particle) +{ MatchRecoGenSpecies realPID = kWrongSpecies; int pdgcode = std::fabs(particle.pdgCode()); switch (pdgcode) { @@ -1827,22 +1826,22 @@ inline MatchRecoGenSpecies IdentifiedBfFilterTracks::findTruePID(ParticleObject break; } return realPID; - } template -void IdentifiedBfFilterTracks::fillTrueTrackHistosAfterSelection(TrackObject const& track){ +void IdentifiedBfFilterTracks::fillTrueTrackHistosAfterSelection(TrackObject const& track) +{ fhTruedEdx[kIdBfCharged]->Fill(track.tpcInnerParam(), track.tpcSignal()); - if(track.hasTOF()){ + if (track.hasTOF()) { fhTrueTrackTime[kIdBfCharged]->Fill(track.tpcInnerParam(), track.trackTime()); } MatchRecoGenSpecies realPID = findTruePID(track.template mcParticle_as()); - if(!(realPID < 0)){ + if (!(realPID < 0)) { fhTruedEdx[realPID]->Fill(track.tpcInnerParam(), track.tpcSignal()); - if(track.hasTOF()){ + if (track.hasTOF()) { fhTrueTrackTime[realPID]->Fill(track.tpcInnerParam(), track.trackTime()); } } @@ -1872,13 +1871,12 @@ void IdentifiedBfFilterTracks::fillTrackHistosAfterSelection(TrackObject const& if (track.dcaZ() < 1.0) { fhFineDCAzA->Fill(track.dcaZ()); } - } fhPA[sp]->Fill(track.p()); fhPtA[sp]->Fill(track.pt()); fhdEdxA[sp]->Fill(track.p(), track.tpcSignal()); fhdEdxIPTPCA[sp]->Fill(track.tpcInnerParam(), track.tpcSignal()); - if(track.hasTOF()){ + if (track.hasTOF()) { fhTrackTime[sp]->Fill(track.tpcInnerParam(), track.trackTime()); } if (track.sign() > 0) { @@ -1890,7 +1888,6 @@ void IdentifiedBfFilterTracks::fillTrackHistosAfterSelection(TrackObject const& } } - template void IdentifiedBfFilterTracks::fillParticleHistosBeforeSelection(ParticleObject const& particle, MCCollisionObject const& collision, float charge) { @@ -1963,4 +1960,5 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) {"processWithoutCentGeneratorLevel", true}}}), adaptAnalysisTask(cfgc)}; return workflow; -} \ No newline at end of file +} + \ No newline at end of file