From b8d1fdb92798732afc8ba8a55710ecfe167b3edb Mon Sep 17 00:00:00 2001 From: Preet Pati Date: Mon, 16 Jun 2025 15:11:47 +0200 Subject: [PATCH 1/3] Possible fix on configurable vectors --- PWGCF/Flow/Tasks/flowPbpbPikp.cxx | 157 ++++++++++++++++-------------- 1 file changed, 86 insertions(+), 71 deletions(-) diff --git a/PWGCF/Flow/Tasks/flowPbpbPikp.cxx b/PWGCF/Flow/Tasks/flowPbpbPikp.cxx index 97fbc3a3661..2e124bef429 100644 --- a/PWGCF/Flow/Tasks/flowPbpbPikp.cxx +++ b/PWGCF/Flow/Tasks/flowPbpbPikp.cxx @@ -105,15 +105,15 @@ struct FlowPbpbPikp { O2_DEFINE_CONFIGURABLE(cfgUseWeightPhiEtaPt, bool, true, "Use Phi, Eta, Pt dependent NUA weights") O2_DEFINE_CONFIGURABLE(cfgUseStrictPID, bool, true, "Use strict PID cuts for TPC") O2_DEFINE_CONFIGURABLE(cfgV0AT0Acut, int, 5, "V0AT0A cut") - O2_DEFINE_CONFIGURABLE(cfgUseAsymmetricPID, bool, false, "Use asymmetric PID cuts"); - O2_DEFINE_CONFIGURABLE(cfgUseItsPID, bool, true, "Use ITS PID for particle identification"); + O2_DEFINE_CONFIGURABLE(cfgUseAsymmetricPID, bool, false, "Use asymmetric PID cuts") + O2_DEFINE_CONFIGURABLE(cfgUseItsPID, bool, true, "Use ITS PID for particle identification") Configurable> cfgTrackDensityP0{"cfgTrackDensityP0", std::vector{0.7217476707, 0.7384792571, 0.7542625668, 0.7640680200, 0.7701951667, 0.7755299053, 0.7805901710, 0.7849446786, 0.7957356586, 0.8113039262, 0.8211968966, 0.8280558878, 0.8329342135}, "parameter 0 for track density efficiency correction"}; Configurable> cfgTrackDensityP1{"cfgTrackDensityP1", std::vector{-2.169488e-05, -2.191913e-05, -2.295484e-05, -2.556538e-05, -2.754463e-05, -2.816832e-05, -2.846502e-05, -2.843857e-05, -2.705974e-05, -2.477018e-05, -2.321730e-05, -2.203315e-05, -2.109474e-05}, "parameter 1 for track density efficiency correction"}; Configurable> cfgTofNsigmaCut{"cfgTofNsigmaCut", std::vector{1.5, 1.5, 1.5, -1.5, -1.5, -1.5}, "TOF n-sigma cut for pions_posNsigma, kaons_posNsigma, protons_posNsigma, pions_negNsigma, kaons_negNsigma, protons_negNsigma"}; Configurable> cfgItsNsigmaCut{"cfgItsNsigmaCut", std::vector{3, 3, 3, -3, -3, -3}, "ITS n-sigma cut for pions_posNsigma, kaons_posNsigma, protons_posNsigma, pions_negNsigma, kaons_negNsigma, protons_negNsigma"}; - Configurable> cfgTpcNsigmaCut{"cfgTpcNsigmaCut", std::vector{1.5, 1.5, 1.5, -1.5, -1.5, -1.5}, "TOF n-sigma cut for pions_posNsigma, kaons_posNsigma, protons_posNsigma, pions_negNsigma, kaons_negNsigma, protons_negNsigma"}; - Configurable> cfgUseEventCuts{"cfgUseEventCuts", std::vector{1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0}, "Switch for various event cuts [kNoTimeFrameBorder, kNoITSROFrameBorder, kNoSameBunchPileup, kIsGoodZvtxFT0vsPV, kNoCollInTimeRangeStandard, kIsGoodITSLayersAll, kNoCollInRofStandard, kNoHighMultCollInPrevRof, Occupancy, Multiplicity correlation, T0AV0A 3 sigma cut, kIsVertexITSTPC, kTVXinTRD]"}; + Configurable> cfgTpcNsigmaCut{"cfgTpcNsigmaCut", std::vector{10, 10, 10, -10, -10, -10}, "TOF n-sigma cut for pions_posNsigma, kaons_posNsigma, protons_posNsigma, pions_negNsigma, kaons_negNsigma, protons_negNsigma"}; + Configurable> cfgUseEventCuts{"cfgUseEventCuts", std::vector{1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0}, "Switch for various event cuts [Filtered Events, Sel8, kNoTimeFrameBorder, kNoITSROFrameBorder, kNoSameBunchPileup, kIsGoodZvtxFT0vsPV, kNoCollInTimeRangeStandard, kIsGoodITSLayersAll, kNoCollInRofStandard, kNoHighMultCollInPrevRof, Occupancy, Multiplicity correlation, T0AV0A 3 sigma cut, kIsVertexITSTPC, kTVXinTRD]"}; Configurable cfgRegions{"cfgRegions", {{"refN08", "refP08", "full", "poiN", "olN", "poiP", "olP", "poi", "ol", "poiNpi", "olNpi", "poiPpi", "olPpi", "poifullpi", "olfullpi", "poiNka", "olNka", "poiPka", "olPka", "poifullka", "olfullka", "poiNpr", "olNpr", "poiPpr", "olPpr", "poifullpr", "olfullpr"}, {-0.8, 0.4, -0.8, -0.8, -0.8, 0.4, 0.4, -0.8, -0.8, -0.8, -0.8, 0.4, 0.4, -0.8, -0.8, -0.8, -0.8, 0.4, 0.4, -0.8, -0.8, -0.8, -0.8, 0.4, 0.4, -0.8, -0.8}, {-0.4, 0.8, 0.8, -0.4, -0.4, 0.8, 0.8, 0.8, 0.8, -0.4, -0.4, 0.8, 0.8, 0.8, 0.8, -0.4, -0.4, 0.8, 0.8, 0.8, 0.8, -0.4, -0.4, 0.8, 0.8, 0.8, 0.8}, {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 128, 256, 128, 256, 128, 256, 2, 16, 2, 16, 2, 16, 4, 32, 4, 32, 4, 32, 8, 64, 8, 64, 8, 64}}, "Configurations for GFW regions"}; Configurable cfgCorrConfig{"cfgCorrConfig", {{"full {2 -2}", "full {2 -2}", "full {2 -2}", "full {2 -2}", "refN08 {2} refP08 {-2}", "refN08 {2} refP08 {-2}", "refN08 {2} refP08 {-2}", "refN08 {2} refP08 {-2}", "refP08 {-2} refN08 {2}", "refP08 {-2} refN08 {2}", "refP08 {-2} refN08 {2}", "refP08 {-2} refN08 {2}", "full {2 2 -2 -2}", "full {2 2 -2 -2}", "full {2 2 -2 -2}", "full {2 2 -2 -2}", "poi full | ol {2 -2}", "poifullpi full | olfullpi {2 -2}", "poifullka full | olfullka {2 -2}", "poifullpr full | olfullpr {2 -2}", "poiN refN08 | olN {2} refP08 {-2}", "poiNpi refN08 | olNpi {2} refP08 {-2}", "poiNka refN08 | olNka {2} refP08 {-2}", "poiNpr refN08 | olNpr {2} refP08 {-2}", "poiP refP08 | olP {2} refN08 {-2}", "poiPpi refP08 | olPpi {2} refN08 {-2}", "poiPka refP08 | olPka {2} refN08 {-2}", "poiPpr refP08 | olPpr {2} refN08 {-2}", "poi full | ol {2 2 -2 -2}", "poifullpi full | olfullpi {2 2 -2 -2}", "poifullka full | olfullka {2 2 -2 -2}", "poifullpr full | olfullpr {2 2 -2 -2}", "refN08 {2 2} refP08 {-2 -2}", "refP08 {-2 -2} refN08 {2 2}", "poiNka refN08 | olNka {2 2} refP08 {-2 -2}", "poiPka refP08 | olPka {2 2} refN08 {-2 -2}"}, {"ChFull22", "PiFull22", "KaFull22", "PrFull22", "Ch08FGap22", "Pi08FGap22", "Ka08FGap22", "Pr08FGap22", "Ch08BGap22", "Pi08BGap22", "Ka08BGap22", "Pr08BGap22", "ChFull24", "PiFull24", "KaFull24", "PrFull24", "ChFull22", "PiFull22", "KaFull22", "PrFull22", "Ch08FGap22", "Pi08FGap22", "Ka08FGap22", "Pr08FGap22", "Ch08BGap22", "Pi08BGap22", "Ka08BGap22", "Pr08BGap22", "ChFull24", "PiFull24", "KaFull24", "PrFull24", "Ka08FGap24", "Ka08BGap24", "Ka08FGap24", "Ka08BGap24"}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, "Configurations for each correlation to calculate"}; @@ -130,12 +130,13 @@ struct FlowPbpbPikp { ConfigurableAxis axisTPCsignal{"axisTPCsignal", {10000, 0, 1000}, "axis for TPC signal"}; ConfigurableAxis axisTOFbeta{"axisTOFbeta", {200, 0, 2}, "axis for TOF beta"}; - std::vector tofNsigmaCut = cfgTofNsigmaCut; - std::vector itsNsigmaCut = cfgItsNsigmaCut; - std::vector tpcNsigmaCut = cfgTofNsigmaCut; + std::vector tofNsigmaCut; + std::vector itsNsigmaCut; + std::vector tpcNsigmaCut; + std::vector eventCuts; Filter collisionFilter = nabs(aod::collision::posZ) < cfgCutVertex; - Filter trackFilter = (nabs(aod::track::dcaXY) < cfgCutDCAxy) && (nabs(aod::track::dcaZ) < cfgCutDCAz) && (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtPOIMin) && (aod::track::pt < cfgCutPtPOIMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t) true)) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls); + Filter trackFilter = (nabs(aod::track::dcaXY) < cfgCutDCAxy) && (nabs(aod::track::dcaZ) < cfgCutDCAz) && (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtPOIMin) && (aod::track::pt < cfgCutPtPOIMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t)true)) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls); using AodCollisions = soa::Filtered>; using AodTracksWithoutBayes = soa::Filtered>; @@ -159,7 +160,9 @@ struct FlowPbpbPikp { }; enum EventCutTypes { - useNoTimeFrameBorder = 0, + filteredEvents = 0, + afterSel8, + useNoTimeFrameBorder, useNoITSROFrameBorder, useNoSameBunchPileup, useGoodZvtxFT0vsPV, @@ -174,8 +177,18 @@ struct FlowPbpbPikp { useTVXinTRD }; - std::vector fintEvCuts = cfgUseEventCuts; - std::vector eventCuts; + enum TrackCutTypes { + filteredTracks = 0, + useGlobalTracks, + usePvContributor, + itsClustersCut, + hasTpcSignal, + tpcClustersCut, + tpcCrossedRowsCut, + numPions, + numKaons, + numProtons + }; int lastRunNumer = -1; std::vector runNumbers; @@ -200,15 +213,12 @@ struct FlowPbpbPikp { void init(InitContext const&) { + eventCuts = cfgUseEventCuts; + ccdb->setURL(ccdbUrl.value); ccdb->setCaching(true); ccdb->setCreatedNotAfter(noLaterThan.value); - // Transforming event cuts from int to bool - for (int i = 0; i < static_cast(fintEvCuts.size()); i++) { - eventCuts.push_back(static_cast(fintEvCuts[i])); - } - LOGF(info, "flowGenericFramework::init()"); regions.SetNames(cfgRegions->GetNames()); regions.SetEtaMin(cfgRegions->GetEtaMin()); @@ -252,40 +262,41 @@ struct FlowPbpbPikp { histos.add("TofTpcNsigma_before", "", {HistType::kTHnSparseD, {{axisParticles, axisNsigmaTPC, axisNsigmaTOF, axisPt}}}); if (!cfgUseItsPID) histos.add("TofTpcNsigma_after", "", {HistType::kTHnSparseD, {{axisParticles, axisNsigmaTPC, axisNsigmaTOF, axisPt}}}); - histos.add("partCount", "", {HistType::kTHnSparseD, {{axisParticles, axisMultiplicity, axisPt}}}); histos.add("TofItsNsigma_before", "", {HistType::kTHnSparseD, {{axisParticles, axisNsigmaITS, axisNsigmaTOF, axisPt}}}); if (cfgUseItsPID) histos.add("TofItsNsigma_after", "", {HistType::kTHnSparseD, {{axisParticles, axisNsigmaITS, axisNsigmaTOF, axisPt}}}); - histos.add("hEventCount", "Number of Events;; Count", {HistType::kTH1D, {{15, 0, 15}}}); - histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(1, "Filtered event"); - histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(2, "After sel8"); - histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(3, "kNoTimeFrameBorder"); - histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(4, "kNoITSROFrameBorder"); - histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(5, "kNoSameBunchPileup"); - histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(6, "kIsGoodZvtxFT0vsPV"); - histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(7, "kNoCollInTimeRangeStandard"); - histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(8, "kIsGoodITSLayersAll"); - histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(9, "kNoCollInRofStandard"); - histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(10, "kNoHighMultCollInPrevRof"); - histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(11, "Occupancy Cut"); - histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(12, "Multiplicity correlation Cut"); - histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(13, "T0AV0A cut"); - histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(14, "kIsVertexITSTPC"); - histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(15, "kTVXinTRD"); - - histos.add("hTrackCount", "Number of Tracks;; Count", {HistType::kTH1D, {{10, 0, 10}}}); - histos.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(1, "Filtered track"); - histos.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(2, "Global tracks"); - histos.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(3, "PV contributor"); - histos.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(4, "ITS clusters"); - histos.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(5, "TPC signal"); - histos.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(6, "TPC clusters"); - histos.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(7, "TPC crossed rows"); - histos.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(8, "Pions"); - histos.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(9, "Kaons"); - histos.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(10, "Protons"); + histos.add("partCount", "", {HistType::kTHnSparseD, {{axisParticles, axisMultiplicity, axisPt}}}); + + histos.add("hEventCount", "Number of Events;; Count", {HistType::kTH1D, {{15, -0.5, 14.5}}}); + histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(filteredEvents + 1, "Filtered event"); + histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(afterSel8 + 1, "After sel8"); + histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(useNoTimeFrameBorder + 1, "kNoTimeFrameBorder"); + histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(useNoITSROFrameBorder + 1, "kNoITSROFrameBorder"); + histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(useNoSameBunchPileup + 1, "kNoSameBunchPileup"); + histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(useGoodZvtxFT0vsPV + 1, "kIsGoodZvtxFT0vsPV"); + histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(useNoCollInRofStandard + 1, "kNoCollInTimeRangeStandard"); + histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(useGoodITSLayersAll + 1, "kIsGoodITSLayersAll"); + histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(useNoCollInRofStandard + 1, "kNoCollInRofStandard"); + histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(useNoHighMultCollInPrevRof + 1, "kNoHighMultCollInPrevRof"); + histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(useOccupancy + 1, "Occupancy Cut"); + histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(useMultCorrCut + 1, "Multiplicity correlation Cut"); + histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(useT0AV0ACut + 1, "T0AV0A cut"); + histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(useVertexITSTPC + 1, "kIsVertexITSTPC"); + histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(useTVXinTRD + 1, "kTVXinTRD"); + + histos.add("hTrackCount", "Number of Tracks;; Count", {HistType::kTH1D, {{10, -0.5, 9.5}}}); + histos.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(filteredTracks + 1, "Filtered track"); + histos.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(useGlobalTracks + 1, "Global tracks"); + histos.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(usePvContributor + 1, "PV contributor"); + histos.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(itsClustersCut + 1, "ITS clusters"); + histos.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(hasTpcSignal + 1, "TPC signal"); + histos.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(tpcClustersCut + 1, "TPC clusters"); + histos.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(tpcCrossedRowsCut + 1, "TPC crossed rows"); + histos.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(numPions + 1, "Pions"); + histos.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(numKaons + 1, "Kaons"); + histos.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(numProtons + 1, "Protons"); if (cfgOutputNUAWeights && !cfgOutputRunByRun) { histos.add("NUA/hPhiEtaVtxz_ref", ";#varphi;#eta;v_{z}", {HistType::kTH3D, {axisPhi, axisEta, axisVertex}}); @@ -388,7 +399,11 @@ struct FlowPbpbPikp { funcV4 = new TF1("funcV4", "[0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x", 0, 100); funcV4->SetParameters(0.008845, 0.000259668, -3.24435e-06, 4.54837e-08, -6.01825e-10); } - } + + tofNsigmaCut = cfgTofNsigmaCut; + itsNsigmaCut = cfgItsNsigmaCut; + tpcNsigmaCut = cfgTpcNsigmaCut; + } // End of init() enum Particles { PIONS, @@ -414,37 +429,37 @@ struct FlowPbpbPikp { template bool selectionTrack(const TTrack& track) { - histos.fill(HIST("hTrackCount"), 0.5); // Filtered tracks + histos.fill(HIST("hTrackCount"), filteredTracks); // Filtered tracks if (cfgUseGlobalTrack && !(track.isGlobalTrack())) { return 0; } if (cfgUseGlobalTrack) - histos.fill(HIST("hTrackCount"), 1.5); // After global track selection + histos.fill(HIST("hTrackCount"), useGlobalTracks); // After global track selection if (!(track.isPVContributor())) { return 0; } - histos.fill(HIST("hTrackCount"), 2.5); // After PV contributor selection + histos.fill(HIST("hTrackCount"), usePvContributor); // After PV contributor selection if (!(track.itsNCls() > cfgITScluster)) { return 0; } - histos.fill(HIST("hTrackCount"), 3.5); // After ITS cluster selection + histos.fill(HIST("hTrackCount"), itsClustersCut); // After ITS cluster selection if (!(track.hasTPC())) { return 0; } - histos.fill(HIST("hTrackCount"), 4.5); // If track has TPC signal + histos.fill(HIST("hTrackCount"), hasTpcSignal); // If track has TPC signal if (!(track.tpcNClsFound() > cfgTpcCluster)) { return 0; } - histos.fill(HIST("hTrackCount"), 5.5); // After TPC cluster selection + histos.fill(HIST("hTrackCount"), tpcClustersCut); // After TPC cluster selection if (!(track.tpcNClsCrossedRows() > cfgTpcCrossRows)) { return 0; } - histos.fill(HIST("hTrackCount"), 6.5); // After TPC crossed rows selection + histos.fill(HIST("hTrackCount"), tpcCrossedRowsCut); // After TPC crossed rows selection return 1; } @@ -458,7 +473,7 @@ struct FlowPbpbPikp { histos.fill(HIST("TofTpcNsigma_after"), pidIndex - 1, track.tpcNSigmaPi(), track.tofNSigmaPi(), track.pt()); if (cfgUseItsPID) histos.fill(HIST("TofItsNsigma_after"), pidIndex - 1, itsResponse.nSigmaITS(track), track.tofNSigmaPi(), track.pt()); - histos.fill(HIST("hTrackCount"), 7.5); // Pion count + histos.fill(HIST("hTrackCount"), numPions); // Pion count if (!cfgAcceptance.value.empty() && cfgUseWeightPhiEtaVtxz) histos.fill(HIST("PhiCorrected/hPhiEtaVtxz_pi_corrd"), track.phi(), track.eta(), collision.posZ(), wacc); // pion weights if (!cfgAcceptance.value.empty() && cfgUseWeightPhiPtCent) @@ -471,7 +486,7 @@ struct FlowPbpbPikp { histos.fill(HIST("TofTpcNsigma_after"), pidIndex - 1, track.tpcNSigmaKa(), track.tofNSigmaKa(), track.pt()); if (cfgUseItsPID) histos.fill(HIST("TofItsNsigma_after"), pidIndex - 1, itsResponse.nSigmaITS(track), track.tofNSigmaKa(), track.pt()); - histos.fill(HIST("hTrackCount"), 8.5); // Kaon count + histos.fill(HIST("hTrackCount"), numKaons); // Kaon count if (!cfgAcceptance.value.empty() && cfgUseWeightPhiEtaVtxz) histos.fill(HIST("PhiCorrected/hPhiEtaVtxz_ka_corrd"), track.phi(), track.eta(), collision.posZ(), wacc); // kaon weights if (!cfgAcceptance.value.empty() && cfgUseWeightPhiPtCent) @@ -484,7 +499,7 @@ struct FlowPbpbPikp { histos.fill(HIST("TofTpcNsigma_after"), pidIndex - 1, track.tpcNSigmaPr(), track.tofNSigmaPr(), track.pt()); if (cfgUseItsPID) histos.fill(HIST("TofItsNsigma_after"), pidIndex - 1, itsResponse.nSigmaITS(track), track.tofNSigmaPr(), track.pt()); - histos.fill(HIST("hTrackCount"), 9.5); // Proton count + histos.fill(HIST("hTrackCount"), numProtons); // Proton count if (!cfgAcceptance.value.empty() && cfgUseWeightPhiEtaVtxz) histos.fill(HIST("PhiCorrected/hPhiEtaVtxz_pr_corrd"), track.phi(), track.eta(), collision.posZ(), wacc); // proton weights if (!cfgAcceptance.value.empty() && cfgUseWeightPhiPtCent) @@ -760,59 +775,59 @@ struct FlowPbpbPikp { template bool selectionEvent(TCollision collision, const int mult, const float cent) { - histos.fill(HIST("hEventCount"), 0.5); + histos.fill(HIST("hEventCount"), filteredEvents); if (!collision.sel8()) { return 0; } - histos.fill(HIST("hEventCount"), 1.5); + histos.fill(HIST("hEventCount"), afterSel8); if (eventCuts[useNoTimeFrameBorder] && !collision.selection_bit(aod::evsel::kNoTimeFrameBorder)) { return 0; } if (eventCuts[useNoTimeFrameBorder]) - histos.fill(HIST("hEventCount"), 2.5); + histos.fill(HIST("hEventCount"), useNoTimeFrameBorder); if (eventCuts[useNoITSROFrameBorder] && !collision.selection_bit(aod::evsel::kNoITSROFrameBorder)) { return 0; } if (eventCuts[useNoITSROFrameBorder]) - histos.fill(HIST("hEventCount"), 3.5); + histos.fill(HIST("hEventCount"), useNoITSROFrameBorder); if (eventCuts[useNoSameBunchPileup] && !collision.selection_bit(aod::evsel::kNoSameBunchPileup)) { return 0; } if (eventCuts[useNoSameBunchPileup]) - histos.fill(HIST("hEventCount"), 4.5); + histos.fill(HIST("hEventCount"), useNoSameBunchPileup); if (eventCuts[useGoodZvtxFT0vsPV] && !collision.selection_bit(o2::aod::evsel::kIsGoodZvtxFT0vsPV)) { return 0; } if (eventCuts[useGoodZvtxFT0vsPV]) - histos.fill(HIST("hEventCount"), 5.5); + histos.fill(HIST("hEventCount"), useGoodZvtxFT0vsPV); if (eventCuts[useNoCollInTimeRangeStandard] && !collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) { return 0; } if (eventCuts[useNoCollInTimeRangeStandard]) - histos.fill(HIST("hEventCount"), 6.5); + histos.fill(HIST("hEventCount"), useNoCollInTimeRangeStandard); if (eventCuts[useGoodITSLayersAll] && !collision.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll)) { return 0; } if (eventCuts[useGoodITSLayersAll]) - histos.fill(HIST("hEventCount"), 7.5); + histos.fill(HIST("hEventCount"), useGoodITSLayersAll); if (eventCuts[useNoCollInRofStandard] && !collision.selection_bit(o2::aod::evsel::kNoCollInRofStandard)) { return 0; } if (eventCuts[useNoCollInRofStandard]) - histos.fill(HIST("hEventCount"), 8.5); + histos.fill(HIST("hEventCount"), useNoCollInRofStandard); if (eventCuts[useNoHighMultCollInPrevRof] && !collision.selection_bit(o2::aod::evsel::kNoHighMultCollInPrevRof)) { return 0; } if (eventCuts[useNoHighMultCollInPrevRof]) - histos.fill(HIST("hEventCount"), 9.5); + histos.fill(HIST("hEventCount"), useNoHighMultCollInPrevRof); auto multNTracksPV = collision.multNTracksPV(); auto occupancy = collision.trackOccupancyInTimeRange(); @@ -821,7 +836,7 @@ struct FlowPbpbPikp { return 0; } if (eventCuts[useOccupancy]) - histos.fill(HIST("hEventCount"), 10.5); + histos.fill(HIST("hEventCount"), useOccupancy); if (eventCuts[useMultCorrCut]) { if (multNTracksPV < fMultPVCutLow->Eval(cent)) @@ -834,24 +849,24 @@ struct FlowPbpbPikp { return 0; } if (eventCuts[useMultCorrCut]) - histos.fill(HIST("hEventCount"), 11.5); + histos.fill(HIST("hEventCount"), useMultCorrCut); // V0A T0A 5 sigma cut if (eventCuts[useT0AV0ACut] && (std::fabs(collision.multFV0A() - fT0AV0AMean->Eval(collision.multFT0A())) > cfgV0AT0Acut * fT0AV0ASigma->Eval(collision.multFT0A()))) return 0; if (eventCuts[useT0AV0ACut]) - histos.fill(HIST("hEventCount"), 12.5); + histos.fill(HIST("hEventCount"), useT0AV0ACut); if (eventCuts[useVertexITSTPC] && !collision.selection_bit(o2::aod::evsel::kIsVertexITSTPC)) return 0; if (eventCuts[useVertexITSTPC]) - histos.fill(HIST("hEventCount"), 13.5); + histos.fill(HIST("hEventCount"), useVertexITSTPC); if (eventCuts[useTVXinTRD] && collision.alias_bit(kTVXinTRD)) { return 0; } if (eventCuts[useTVXinTRD]) - histos.fill(HIST("hEventCount"), 14.5); + histos.fill(HIST("hEventCount"), useTVXinTRD); return 1; } From 2c7b45cc0558937fdcdce419b9f8b10c515eafbe Mon Sep 17 00:00:00 2001 From: Preet Pati Date: Mon, 16 Jun 2025 16:32:25 +0200 Subject: [PATCH 2/3] Prefixed enum names --- PWGCF/Flow/Tasks/flowPbpbPikp.cxx | 206 +++++++++++++++--------------- 1 file changed, 103 insertions(+), 103 deletions(-) diff --git a/PWGCF/Flow/Tasks/flowPbpbPikp.cxx b/PWGCF/Flow/Tasks/flowPbpbPikp.cxx index 2e124bef429..510f4a44f30 100644 --- a/PWGCF/Flow/Tasks/flowPbpbPikp.cxx +++ b/PWGCF/Flow/Tasks/flowPbpbPikp.cxx @@ -160,34 +160,34 @@ struct FlowPbpbPikp { }; enum EventCutTypes { - filteredEvents = 0, - afterSel8, - useNoTimeFrameBorder, - useNoITSROFrameBorder, - useNoSameBunchPileup, - useGoodZvtxFT0vsPV, - useNoCollInTimeRangeStandard, - useGoodITSLayersAll, - useNoCollInRofStandard, - useNoHighMultCollInPrevRof, - useOccupancy, - useMultCorrCut, - useT0AV0ACut, - useVertexITSTPC, - useTVXinTRD + kFilteredEvents = 0, + kAfterSel8, + kUseNoTimeFrameBorder, + kUseNoITSROFrameBorder, + kUseNoSameBunchPileup, + kUseGoodZvtxFT0vsPV, + kUseNoCollInTimeRangeStandard, + kUseGoodITSLayersAll, + kUseNoCollInRofStandard, + kUseNoHighMultCollInPrevRof, + kUseOccupancy, + kUseMultCorrCut, + kUseT0AV0ACut, + kUseVertexITSTPC, + kUseTVXinTRD }; enum TrackCutTypes { - filteredTracks = 0, - useGlobalTracks, - usePvContributor, - itsClustersCut, - hasTpcSignal, - tpcClustersCut, - tpcCrossedRowsCut, - numPions, - numKaons, - numProtons + kFilteredTracks = 0, + kUseGlobalTracks, + kUsePvContributor, + kItsClustersCut, + kHasTpcSignal, + kTpcClustersCut, + kTpcCrossedRowsCut, + kNumPions, + kNumKaons, + kNumProtons }; int lastRunNumer = -1; @@ -270,33 +270,33 @@ struct FlowPbpbPikp { histos.add("partCount", "", {HistType::kTHnSparseD, {{axisParticles, axisMultiplicity, axisPt}}}); histos.add("hEventCount", "Number of Events;; Count", {HistType::kTH1D, {{15, -0.5, 14.5}}}); - histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(filteredEvents + 1, "Filtered event"); - histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(afterSel8 + 1, "After sel8"); - histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(useNoTimeFrameBorder + 1, "kNoTimeFrameBorder"); - histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(useNoITSROFrameBorder + 1, "kNoITSROFrameBorder"); - histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(useNoSameBunchPileup + 1, "kNoSameBunchPileup"); - histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(useGoodZvtxFT0vsPV + 1, "kIsGoodZvtxFT0vsPV"); - histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(useNoCollInRofStandard + 1, "kNoCollInTimeRangeStandard"); - histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(useGoodITSLayersAll + 1, "kIsGoodITSLayersAll"); - histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(useNoCollInRofStandard + 1, "kNoCollInRofStandard"); - histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(useNoHighMultCollInPrevRof + 1, "kNoHighMultCollInPrevRof"); - histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(useOccupancy + 1, "Occupancy Cut"); - histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(useMultCorrCut + 1, "Multiplicity correlation Cut"); - histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(useT0AV0ACut + 1, "T0AV0A cut"); - histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(useVertexITSTPC + 1, "kIsVertexITSTPC"); - histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(useTVXinTRD + 1, "kTVXinTRD"); + histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(kFilteredEvents + 1, "Filtered event"); + histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(kAfterSel8 + 1, "After sel8"); + histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(kUseNoTimeFrameBorder + 1, "kNoTimeFrameBorder"); + histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(kUseNoITSROFrameBorder + 1, "kNoITSROFrameBorder"); + histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(kUseNoSameBunchPileup + 1, "kNoSameBunchPileup"); + histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(kUseGoodZvtxFT0vsPV + 1, "kIsGoodZvtxFT0vsPV"); + histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(kUseNoCollInRofStandard + 1, "kNoCollInTimeRangeStandard"); + histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(kUseGoodITSLayersAll + 1, "kIsGoodITSLayersAll"); + histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(kUseNoCollInRofStandard + 1, "kNoCollInRofStandard"); + histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(kUseNoHighMultCollInPrevRof + 1, "kNoHighMultCollInPrevRof"); + histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(kUseOccupancy + 1, "Occupancy Cut"); + histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(kUseMultCorrCut + 1, "Multiplicity correlation Cut"); + histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(kUseT0AV0ACut + 1, "T0AV0A cut"); + histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(kUseVertexITSTPC + 1, "kIsVertexITSTPC"); + histos.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(kUseTVXinTRD + 1, "kTVXinTRD"); histos.add("hTrackCount", "Number of Tracks;; Count", {HistType::kTH1D, {{10, -0.5, 9.5}}}); - histos.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(filteredTracks + 1, "Filtered track"); - histos.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(useGlobalTracks + 1, "Global tracks"); - histos.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(usePvContributor + 1, "PV contributor"); - histos.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(itsClustersCut + 1, "ITS clusters"); - histos.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(hasTpcSignal + 1, "TPC signal"); - histos.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(tpcClustersCut + 1, "TPC clusters"); - histos.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(tpcCrossedRowsCut + 1, "TPC crossed rows"); - histos.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(numPions + 1, "Pions"); - histos.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(numKaons + 1, "Kaons"); - histos.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(numProtons + 1, "Protons"); + histos.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(kFilteredTracks + 1, "Filtered track"); + histos.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(kUseGlobalTracks + 1, "Global tracks"); + histos.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(kUsePvContributor + 1, "PV contributor"); + histos.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(kItsClustersCut + 1, "ITS clusters"); + histos.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(kHasTpcSignal + 1, "TPC signal"); + histos.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(kTpcClustersCut + 1, "TPC clusters"); + histos.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(kTpcCrossedRowsCut + 1, "TPC crossed rows"); + histos.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(kNumPions + 1, "Pions"); + histos.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(kNumKaons + 1, "Kaons"); + histos.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(kNumProtons + 1, "Protons"); if (cfgOutputNUAWeights && !cfgOutputRunByRun) { histos.add("NUA/hPhiEtaVtxz_ref", ";#varphi;#eta;v_{z}", {HistType::kTH3D, {axisPhi, axisEta, axisVertex}}); @@ -363,7 +363,7 @@ struct FlowPbpbPikp { fFC->Initialize(oba, axisMultiplicity, cfgNbootstrap); delete oba; - if (eventCuts[useMultCorrCut]) { + if (eventCuts[kUseMultCorrCut]) { fMultPVCutLow = new TF1("fMultPVCutLow", "[0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x - 3.5*([5]+[6]*x+[7]*x*x+[8]*x*x*x+[9]*x*x*x*x)", 0, 100); fMultPVCutLow->SetParameters(3257.29, -121.848, 1.98492, -0.0172128, 6.47528e-05, 154.756, -1.86072, -0.0274713, 0.000633499, -3.37757e-06); fMultPVCutHigh = new TF1("fMultPVCutHigh", "[0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x + 3.5*([5]+[6]*x+[7]*x*x+[8]*x*x*x+[9]*x*x*x*x)", 0, 100); @@ -374,7 +374,7 @@ struct FlowPbpbPikp { fMultCutHigh = new TF1("fMultCutHigh", "[0]+[1]*x+[2]*x*x+[3]*x*x*x + 3.*([4]+[5]*x+[6]*x*x+[7]*x*x*x+[8]*x*x*x*x)", 0, 100); fMultCutHigh->SetParameters(1654.46, -47.2379, 0.449833, -0.0014125, 150.773, -3.67334, 0.0530503, -0.000614061, 3.15956e-06); } - if (eventCuts[useT0AV0ACut]) { + if (eventCuts[kUseT0AV0ACut]) { fT0AV0AMean = new TF1("fT0AV0AMean", "[0]+[1]*x", 0, 200000); fT0AV0AMean->SetParameters(-1601.0581, 9.417652e-01); fT0AV0ASigma = new TF1("fT0AV0ASigma", "[0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x", 0, 200000); @@ -429,37 +429,37 @@ struct FlowPbpbPikp { template bool selectionTrack(const TTrack& track) { - histos.fill(HIST("hTrackCount"), filteredTracks); // Filtered tracks + histos.fill(HIST("hTrackCount"), kFilteredTracks); // Filtered tracks if (cfgUseGlobalTrack && !(track.isGlobalTrack())) { return 0; } if (cfgUseGlobalTrack) - histos.fill(HIST("hTrackCount"), useGlobalTracks); // After global track selection + histos.fill(HIST("hTrackCount"), kUseGlobalTracks); // After global track selection if (!(track.isPVContributor())) { return 0; } - histos.fill(HIST("hTrackCount"), usePvContributor); // After PV contributor selection + histos.fill(HIST("hTrackCount"), kUsePvContributor); // After PV contributor selection if (!(track.itsNCls() > cfgITScluster)) { return 0; } - histos.fill(HIST("hTrackCount"), itsClustersCut); // After ITS cluster selection + histos.fill(HIST("hTrackCount"), kItsClustersCut); // After ITS cluster selection if (!(track.hasTPC())) { return 0; } - histos.fill(HIST("hTrackCount"), hasTpcSignal); // If track has TPC signal + histos.fill(HIST("hTrackCount"), kHasTpcSignal); // If track has TPC signal if (!(track.tpcNClsFound() > cfgTpcCluster)) { return 0; } - histos.fill(HIST("hTrackCount"), tpcClustersCut); // After TPC cluster selection + histos.fill(HIST("hTrackCount"), kTpcClustersCut); // After TPC cluster selection if (!(track.tpcNClsCrossedRows() > cfgTpcCrossRows)) { return 0; } - histos.fill(HIST("hTrackCount"), tpcCrossedRowsCut); // After TPC crossed rows selection + histos.fill(HIST("hTrackCount"), kTpcCrossedRowsCut); // After TPC crossed rows selection return 1; } @@ -473,7 +473,7 @@ struct FlowPbpbPikp { histos.fill(HIST("TofTpcNsigma_after"), pidIndex - 1, track.tpcNSigmaPi(), track.tofNSigmaPi(), track.pt()); if (cfgUseItsPID) histos.fill(HIST("TofItsNsigma_after"), pidIndex - 1, itsResponse.nSigmaITS(track), track.tofNSigmaPi(), track.pt()); - histos.fill(HIST("hTrackCount"), numPions); // Pion count + histos.fill(HIST("hTrackCount"), kNumPions); // Pion count if (!cfgAcceptance.value.empty() && cfgUseWeightPhiEtaVtxz) histos.fill(HIST("PhiCorrected/hPhiEtaVtxz_pi_corrd"), track.phi(), track.eta(), collision.posZ(), wacc); // pion weights if (!cfgAcceptance.value.empty() && cfgUseWeightPhiPtCent) @@ -486,7 +486,7 @@ struct FlowPbpbPikp { histos.fill(HIST("TofTpcNsigma_after"), pidIndex - 1, track.tpcNSigmaKa(), track.tofNSigmaKa(), track.pt()); if (cfgUseItsPID) histos.fill(HIST("TofItsNsigma_after"), pidIndex - 1, itsResponse.nSigmaITS(track), track.tofNSigmaKa(), track.pt()); - histos.fill(HIST("hTrackCount"), numKaons); // Kaon count + histos.fill(HIST("hTrackCount"), kNumKaons); // Kaon count if (!cfgAcceptance.value.empty() && cfgUseWeightPhiEtaVtxz) histos.fill(HIST("PhiCorrected/hPhiEtaVtxz_ka_corrd"), track.phi(), track.eta(), collision.posZ(), wacc); // kaon weights if (!cfgAcceptance.value.empty() && cfgUseWeightPhiPtCent) @@ -499,7 +499,7 @@ struct FlowPbpbPikp { histos.fill(HIST("TofTpcNsigma_after"), pidIndex - 1, track.tpcNSigmaPr(), track.tofNSigmaPr(), track.pt()); if (cfgUseItsPID) histos.fill(HIST("TofItsNsigma_after"), pidIndex - 1, itsResponse.nSigmaITS(track), track.tofNSigmaPr(), track.pt()); - histos.fill(HIST("hTrackCount"), numProtons); // Proton count + histos.fill(HIST("hTrackCount"), kNumProtons); // Proton count if (!cfgAcceptance.value.empty() && cfgUseWeightPhiEtaVtxz) histos.fill(HIST("PhiCorrected/hPhiEtaVtxz_pr_corrd"), track.phi(), track.eta(), collision.posZ(), wacc); // proton weights if (!cfgAcceptance.value.empty() && cfgUseWeightPhiPtCent) @@ -775,70 +775,70 @@ struct FlowPbpbPikp { template bool selectionEvent(TCollision collision, const int mult, const float cent) { - histos.fill(HIST("hEventCount"), filteredEvents); + histos.fill(HIST("hEventCount"), kFilteredEvents); if (!collision.sel8()) { return 0; } - histos.fill(HIST("hEventCount"), afterSel8); + histos.fill(HIST("hEventCount"), kAfterSel8); - if (eventCuts[useNoTimeFrameBorder] && !collision.selection_bit(aod::evsel::kNoTimeFrameBorder)) { + if (eventCuts[kUseNoTimeFrameBorder] && !collision.selection_bit(aod::evsel::kNoTimeFrameBorder)) { return 0; } - if (eventCuts[useNoTimeFrameBorder]) - histos.fill(HIST("hEventCount"), useNoTimeFrameBorder); + if (eventCuts[kUseNoTimeFrameBorder]) + histos.fill(HIST("hEventCount"), kUseNoTimeFrameBorder); - if (eventCuts[useNoITSROFrameBorder] && !collision.selection_bit(aod::evsel::kNoITSROFrameBorder)) { + if (eventCuts[kUseNoITSROFrameBorder] && !collision.selection_bit(aod::evsel::kNoITSROFrameBorder)) { return 0; } - if (eventCuts[useNoITSROFrameBorder]) - histos.fill(HIST("hEventCount"), useNoITSROFrameBorder); + if (eventCuts[kUseNoITSROFrameBorder]) + histos.fill(HIST("hEventCount"), kUseNoITSROFrameBorder); - if (eventCuts[useNoSameBunchPileup] && !collision.selection_bit(aod::evsel::kNoSameBunchPileup)) { + if (eventCuts[kUseNoSameBunchPileup] && !collision.selection_bit(aod::evsel::kNoSameBunchPileup)) { return 0; } - if (eventCuts[useNoSameBunchPileup]) - histos.fill(HIST("hEventCount"), useNoSameBunchPileup); + if (eventCuts[kUseNoSameBunchPileup]) + histos.fill(HIST("hEventCount"), kUseNoSameBunchPileup); - if (eventCuts[useGoodZvtxFT0vsPV] && !collision.selection_bit(o2::aod::evsel::kIsGoodZvtxFT0vsPV)) { + if (eventCuts[kUseGoodZvtxFT0vsPV] && !collision.selection_bit(o2::aod::evsel::kIsGoodZvtxFT0vsPV)) { return 0; } - if (eventCuts[useGoodZvtxFT0vsPV]) - histos.fill(HIST("hEventCount"), useGoodZvtxFT0vsPV); + if (eventCuts[kUseGoodZvtxFT0vsPV]) + histos.fill(HIST("hEventCount"), kUseGoodZvtxFT0vsPV); - if (eventCuts[useNoCollInTimeRangeStandard] && !collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) { + if (eventCuts[kUseNoCollInTimeRangeStandard] && !collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) { return 0; } - if (eventCuts[useNoCollInTimeRangeStandard]) - histos.fill(HIST("hEventCount"), useNoCollInTimeRangeStandard); + if (eventCuts[kUseNoCollInTimeRangeStandard]) + histos.fill(HIST("hEventCount"), kUseNoCollInTimeRangeStandard); - if (eventCuts[useGoodITSLayersAll] && !collision.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll)) { + if (eventCuts[kUseGoodITSLayersAll] && !collision.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll)) { return 0; } - if (eventCuts[useGoodITSLayersAll]) - histos.fill(HIST("hEventCount"), useGoodITSLayersAll); + if (eventCuts[kUseGoodITSLayersAll]) + histos.fill(HIST("hEventCount"), kUseGoodITSLayersAll); - if (eventCuts[useNoCollInRofStandard] && !collision.selection_bit(o2::aod::evsel::kNoCollInRofStandard)) { + if (eventCuts[kUseNoCollInRofStandard] && !collision.selection_bit(o2::aod::evsel::kNoCollInRofStandard)) { return 0; } - if (eventCuts[useNoCollInRofStandard]) - histos.fill(HIST("hEventCount"), useNoCollInRofStandard); + if (eventCuts[kUseNoCollInRofStandard]) + histos.fill(HIST("hEventCount"), kUseNoCollInRofStandard); - if (eventCuts[useNoHighMultCollInPrevRof] && !collision.selection_bit(o2::aod::evsel::kNoHighMultCollInPrevRof)) { + if (eventCuts[kUseNoHighMultCollInPrevRof] && !collision.selection_bit(o2::aod::evsel::kNoHighMultCollInPrevRof)) { return 0; } - if (eventCuts[useNoHighMultCollInPrevRof]) - histos.fill(HIST("hEventCount"), useNoHighMultCollInPrevRof); + if (eventCuts[kUseNoHighMultCollInPrevRof]) + histos.fill(HIST("hEventCount"), kUseNoHighMultCollInPrevRof); auto multNTracksPV = collision.multNTracksPV(); auto occupancy = collision.trackOccupancyInTimeRange(); - if (eventCuts[useOccupancy] && (occupancy < cfgCutOccupancyMin || occupancy > cfgCutOccupancyMax)) { + if (eventCuts[kUseOccupancy] && (occupancy < cfgCutOccupancyMin || occupancy > cfgCutOccupancyMax)) { return 0; } - if (eventCuts[useOccupancy]) - histos.fill(HIST("hEventCount"), useOccupancy); + if (eventCuts[kUseOccupancy]) + histos.fill(HIST("hEventCount"), kUseOccupancy); - if (eventCuts[useMultCorrCut]) { + if (eventCuts[kUseMultCorrCut]) { if (multNTracksPV < fMultPVCutLow->Eval(cent)) return 0; if (multNTracksPV > fMultPVCutHigh->Eval(cent)) @@ -848,25 +848,25 @@ struct FlowPbpbPikp { if (mult > fMultCutHigh->Eval(cent)) return 0; } - if (eventCuts[useMultCorrCut]) - histos.fill(HIST("hEventCount"), useMultCorrCut); + if (eventCuts[kUseMultCorrCut]) + histos.fill(HIST("hEventCount"), kUseMultCorrCut); // V0A T0A 5 sigma cut - if (eventCuts[useT0AV0ACut] && (std::fabs(collision.multFV0A() - fT0AV0AMean->Eval(collision.multFT0A())) > cfgV0AT0Acut * fT0AV0ASigma->Eval(collision.multFT0A()))) + if (eventCuts[kUseT0AV0ACut] && (std::fabs(collision.multFV0A() - fT0AV0AMean->Eval(collision.multFT0A())) > cfgV0AT0Acut * fT0AV0ASigma->Eval(collision.multFT0A()))) return 0; - if (eventCuts[useT0AV0ACut]) - histos.fill(HIST("hEventCount"), useT0AV0ACut); + if (eventCuts[kUseT0AV0ACut]) + histos.fill(HIST("hEventCount"), kUseT0AV0ACut); - if (eventCuts[useVertexITSTPC] && !collision.selection_bit(o2::aod::evsel::kIsVertexITSTPC)) + if (eventCuts[kUseVertexITSTPC] && !collision.selection_bit(o2::aod::evsel::kIsVertexITSTPC)) return 0; - if (eventCuts[useVertexITSTPC]) - histos.fill(HIST("hEventCount"), useVertexITSTPC); + if (eventCuts[kUseVertexITSTPC]) + histos.fill(HIST("hEventCount"), kUseVertexITSTPC); - if (eventCuts[useTVXinTRD] && collision.alias_bit(kTVXinTRD)) { + if (eventCuts[kUseTVXinTRD] && collision.alias_bit(kTVXinTRD)) { return 0; } - if (eventCuts[useTVXinTRD]) - histos.fill(HIST("hEventCount"), useTVXinTRD); + if (eventCuts[kUseTVXinTRD]) + histos.fill(HIST("hEventCount"), kUseTVXinTRD); return 1; } From 2e003b91ec42bfd62a0c66a88dfd1d91435f3d5b Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Mon, 16 Jun 2025 14:33:16 +0000 Subject: [PATCH 3/3] Please consider the following formatting changes --- PWGCF/Flow/Tasks/flowPbpbPikp.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGCF/Flow/Tasks/flowPbpbPikp.cxx b/PWGCF/Flow/Tasks/flowPbpbPikp.cxx index 510f4a44f30..c022cad77c2 100644 --- a/PWGCF/Flow/Tasks/flowPbpbPikp.cxx +++ b/PWGCF/Flow/Tasks/flowPbpbPikp.cxx @@ -136,7 +136,7 @@ struct FlowPbpbPikp { std::vector eventCuts; Filter collisionFilter = nabs(aod::collision::posZ) < cfgCutVertex; - Filter trackFilter = (nabs(aod::track::dcaXY) < cfgCutDCAxy) && (nabs(aod::track::dcaZ) < cfgCutDCAz) && (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtPOIMin) && (aod::track::pt < cfgCutPtPOIMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t)true)) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls); + Filter trackFilter = (nabs(aod::track::dcaXY) < cfgCutDCAxy) && (nabs(aod::track::dcaZ) < cfgCutDCAz) && (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtPOIMin) && (aod::track::pt < cfgCutPtPOIMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t) true)) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls); using AodCollisions = soa::Filtered>; using AodTracksWithoutBayes = soa::Filtered>;