From 241d713ff47c416465e40b4ff1288028b702a552 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Jacazio?= Date: Fri, 21 Aug 2026 15:29:23 +0200 Subject: [PATCH 1/3] Fix codechecker --- PWGLF/Tasks/QC/mcParticlePrediction.cxx | 92 ++++++++++++------------- 1 file changed, 45 insertions(+), 47 deletions(-) diff --git a/PWGLF/Tasks/QC/mcParticlePrediction.cxx b/PWGLF/Tasks/QC/mcParticlePrediction.cxx index 64865311d0b..e1d77b4693a 100644 --- a/PWGLF/Tasks/QC/mcParticlePrediction.cxx +++ b/PWGLF/Tasks/QC/mcParticlePrediction.cxx @@ -119,9 +119,6 @@ static constexpr std::array, PIDExtended::NIDsTot> {0, 1}, // Kshort {0, 0}, // Xi1530 {0, 0}}}; // Lambda1520 -std::array enabledParticlesArray = {false}; -std::array selectPrimariesArray = {false}; - // Estimators struct Estimators { typedef int estID; @@ -147,26 +144,26 @@ struct Estimators { static constexpr estID ImpactParameter = 19; // (Run2 V0M) static constexpr estID nEstimators = 20; - static constexpr const char* estimatorNames[nEstimators] = {"FT0A", - "FT0C", - "FT0AC", - "FV0A", - "FDDA", - "FDDC", - "FDDAC", - "ZNA", - "ZNC", - "ZEM1", - "ZEM2", - "ZPA", - "ZPC", - "ITSIB", - "ETA05", - "ETA08", - "V0A", - "V0C", - "V0AC", - "ImpactParameter"}; + static constexpr std::array estimatorNames{"FT0A", + "FT0C", + "FT0AC", + "FV0A", + "FDDA", + "FDDC", + "FDDAC", + "ZNA", + "ZNC", + "ZEM1", + "ZEM2", + "ZPA", + "ZPC", + "ITSIB", + "ETA05", + "ETA08", + "V0A", + "V0C", + "V0AC", + "ImpactParameter"}; static std::vector arrayNames() { static std::vector names; @@ -179,7 +176,6 @@ struct Estimators { return names; } }; -std::array enabledEstimatorsArray = {false}; static constexpr std::array, Estimators::nEstimators> defaultEstimators{{{0}, // FT0A {0}, // FT0C @@ -202,27 +198,6 @@ static constexpr std::array, Estimators::nEstimators> {0}, // V0AC (Run2 V0M) {0}}}; // ImpactParamter -// Histograms -std::array, Estimators::nEstimators> hestimators; -std::array, Estimators::nEstimators> hestimatorsVsITS; -std::array, Estimators::nEstimators> hestimatorsVsETA05; -std::array, Estimators::nEstimators> hestimatorsVsETA08; -std::array, Estimators::nEstimators> hestimatorsVsImpactParameter; -std::array, Estimators::nEstimators> hestimatorsRecoEvGenVsReco; -std::array, Estimators::nEstimators> hestimatorsRecoEvGenVsReco_BCMC; -std::array, Estimators::nEstimators> hestimatorsRecoEvGenVsRecoITS; -std::array, Estimators::nEstimators> hestimatorsRecoEvRecoVsITS; -std::array, Estimators::nEstimators> hestimatorsRecoEvRecoVsRecoITS; -std::array, Estimators::nEstimators> hestimatorsRecoEvRecoVsRecoITS_BCMC; -std::array, Estimators::nEstimators> hestimatorsRecoEvRecoVsFT0A; -std::array, Estimators::nEstimators> hestimatorsRecoEvRecoVsBCId; -std::array, Estimators::nEstimators> hestimatorsRecoEvVsBCId; -std::array, Estimators::nEstimators> hvertexPosZ; -std::array, PIDExtended::NIDsTot>, Estimators::nEstimators> hpt; -std::array, PIDExtended::NIDsTot>, Estimators::nEstimators> hy; -std::array, PIDExtended::NIDsTot>, Estimators::nEstimators> heta; -std::array, PIDExtended::NIDsTot>, Estimators::nEstimators> hyield; - struct McParticlePrediction { // Histograms @@ -233,6 +208,29 @@ struct McParticlePrediction { HistogramRegistry histosEta{"HistosEta", {}, OutputObjHandlingPolicy::AnalysisObject}; HistogramRegistry histosY{"HistosY", {}, OutputObjHandlingPolicy::AnalysisObject}; + std::array enabledParticlesArray{false}; + std::array selectPrimariesArray{false}; + std::array enabledEstimatorsArray{false}; + std::array, Estimators::nEstimators> hestimators; + std::array, Estimators::nEstimators> hestimatorsVsITS; + std::array, Estimators::nEstimators> hestimatorsVsETA05; + std::array, Estimators::nEstimators> hestimatorsVsETA08; + std::array, Estimators::nEstimators> hestimatorsVsImpactParameter; + std::array, Estimators::nEstimators> hestimatorsRecoEvGenVsReco; + std::array, Estimators::nEstimators> hestimatorsRecoEvGenVsReco_BCMC; + std::array, Estimators::nEstimators> hestimatorsRecoEvGenVsRecoITS; + std::array, Estimators::nEstimators> hestimatorsRecoEvRecoVsITS; + std::array, Estimators::nEstimators> hestimatorsRecoEvRecoVsRecoITS; + std::array, Estimators::nEstimators> hestimatorsRecoEvRecoVsRecoITS_BCMC; + std::array, Estimators::nEstimators> hestimatorsRecoEvRecoVsFT0A; + std::array, Estimators::nEstimators> hestimatorsRecoEvRecoVsBCId; + std::array, Estimators::nEstimators> hestimatorsRecoEvVsBCId; + std::array, Estimators::nEstimators> hvertexPosZ; + std::array, PIDExtended::NIDsTot>, Estimators::nEstimators> hpt; + std::array, PIDExtended::NIDsTot>, Estimators::nEstimators> hy; + std::array, PIDExtended::NIDsTot>, Estimators::nEstimators> heta; + std::array, PIDExtended::NIDsTot>, Estimators::nEstimators> hyield; + struct : ConfigurableGroup { std::string prefix = "Binning"; // JSON group name ConfigurableAxis binsEta{"binsEta", {100, -20, 20}, "Binning of the Eta axis"}; @@ -253,10 +251,10 @@ struct McParticlePrediction { } cfgPrediction; Configurable> enabledSpecies{"enabledSpecies", - {&defaultParticles[0][0], PIDExtended::NIDsTot, defaultParticles[0].size(), PIDExtended::arrayNames(), {"Enable", "SelectPrimaries"}}, + {defaultParticles.front().data(), PIDExtended::NIDsTot, defaultParticles[0].size(), PIDExtended::arrayNames(), {"Enable", "SelectPrimaries"}}, "Particles enabled"}; Configurable> enabledEstimators{"enabledEstimators", - {&defaultEstimators[0][0], Estimators::nEstimators, defaultEstimators[0].size(), Estimators::arrayNames(), {"Enable"}}, + {defaultEstimators.front().data(), Estimators::nEstimators, defaultEstimators[0].size(), Estimators::arrayNames(), {"Enable"}}, "Estimators enabled"}; Configurable selectInelGt0{"selectInelGt0", true, "Select only inelastic events"}; Configurable selectPrimariesForMultiplicity{"selectPrimariesForMultiplicity", true, "Select only primary particles for multiplicity computation"}; From f5c531a357222d8a4638644a20bda98887d86dbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Jacazio?= Date: Fri, 21 Aug 2026 15:29:52 +0200 Subject: [PATCH 2/3] Refactor estimatorNames array initialization --- PWGLF/Tasks/QC/mcParticlePrediction.cxx | 38 ++++++++++++------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/PWGLF/Tasks/QC/mcParticlePrediction.cxx b/PWGLF/Tasks/QC/mcParticlePrediction.cxx index e1d77b4693a..d13b874da14 100644 --- a/PWGLF/Tasks/QC/mcParticlePrediction.cxx +++ b/PWGLF/Tasks/QC/mcParticlePrediction.cxx @@ -145,25 +145,25 @@ struct Estimators { static constexpr estID nEstimators = 20; static constexpr std::array estimatorNames{"FT0A", - "FT0C", - "FT0AC", - "FV0A", - "FDDA", - "FDDC", - "FDDAC", - "ZNA", - "ZNC", - "ZEM1", - "ZEM2", - "ZPA", - "ZPC", - "ITSIB", - "ETA05", - "ETA08", - "V0A", - "V0C", - "V0AC", - "ImpactParameter"}; + "FT0C", + "FT0AC", + "FV0A", + "FDDA", + "FDDC", + "FDDAC", + "ZNA", + "ZNC", + "ZEM1", + "ZEM2", + "ZPA", + "ZPC", + "ITSIB", + "ETA05", + "ETA08", + "V0A", + "V0C", + "V0AC", + "ImpactParameter"}; static std::vector arrayNames() { static std::vector names; From 99d9242399067c982cd0046c98ba6c771487f9a2 Mon Sep 17 00:00:00 2001 From: ALICE Builder Date: Fri, 21 Aug 2026 15:32:01 +0200 Subject: [PATCH 3/3] Please consider the following formatting changes to #17544 (#17545)