From a05b020c9e3d02a5bcdd79b255eb4aeccffd9279 Mon Sep 17 00:00:00 2001 From: Fabio Catalano Date: Thu, 27 Nov 2025 16:56:13 +0100 Subject: [PATCH] [PWGHF] Fix: save ZorroSummary in task output --- PWGHF/D2H/TableProducer/dataCreatorCharmHadPiReduced.cxx | 4 +++- PWGHF/D2H/TableProducer/dataCreatorCharmResoReduced.cxx | 4 +++- PWGHF/D2H/TableProducer/dataCreatorJpsiHadReduced.cxx | 4 +++- PWGHF/TableProducer/candidateCreator2Prong.cxx | 4 +++- PWGHF/TableProducer/candidateCreator3Prong.cxx | 4 +++- PWGHF/TableProducer/candidateCreatorCascade.cxx | 4 +++- PWGHF/TableProducer/candidateCreatorDstar.cxx | 4 +++- PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx | 5 ++++- PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx | 4 +++- PWGHF/Utils/utilsEvSelHf.h | 3 +-- 10 files changed, 29 insertions(+), 11 deletions(-) diff --git a/PWGHF/D2H/TableProducer/dataCreatorCharmHadPiReduced.cxx b/PWGHF/D2H/TableProducer/dataCreatorCharmHadPiReduced.cxx index eff844858d6..a9d569cb32c 100644 --- a/PWGHF/D2H/TableProducer/dataCreatorCharmHadPiReduced.cxx +++ b/PWGHF/D2H/TableProducer/dataCreatorCharmHadPiReduced.cxx @@ -32,6 +32,7 @@ #include "PWGHF/Utils/utilsTrkCandHf.h" #include "Common/Core/RecoDecay.h" +#include "Common/Core/ZorroSummary.h" #include "Common/Core/trackUtilities.h" #include "Common/DataModel/Centrality.h" #include "Common/DataModel/CollisionAssociationTables.h" @@ -272,6 +273,7 @@ struct HfDataCreatorCharmHadPiReduced { std::shared_ptr hCandidatesD0, hCandidatesDPlus, hCandidatesDs, hCandidatesLc, hCandidatesD0FromDstar; HistogramRegistry registry{"registry"}; + OutputObj zorroSummary{"zorroSummary"}; std::array arrPDGResonantDsPhiPi = {kPhi, kPiPlus}; // Ds± → Phi π± std::array arrPDGResonantDKstarK = {kK0Star892, kKPlus}; // Ds± → K*(892)0bar K± and D± → K*(892)0bar K± @@ -394,7 +396,7 @@ struct HfDataCreatorCharmHadPiReduced { setLabelHistoCands(hCandidatesD0FromDstar); // init HF event selection helper - hfEvSel.init(registry); + hfEvSel.init(registry, zorroSummary); if (doprocessDplusPiMc || doprocessDplusPiMcWithMl || doprocessDsPiMc || doprocessDsPiMcWithMl || doprocessD0PiMc || doprocessD0PiMcWithMl || diff --git a/PWGHF/D2H/TableProducer/dataCreatorCharmResoReduced.cxx b/PWGHF/D2H/TableProducer/dataCreatorCharmResoReduced.cxx index 588150dc44f..5dd72be0c9e 100644 --- a/PWGHF/D2H/TableProducer/dataCreatorCharmResoReduced.cxx +++ b/PWGHF/D2H/TableProducer/dataCreatorCharmResoReduced.cxx @@ -27,6 +27,7 @@ #include "PWGHF/Utils/utilsMcMatching.h" #include "Common/Core/RecoDecay.h" +#include "Common/Core/ZorroSummary.h" #include "Common/Core/trackUtilities.h" #include "Common/DataModel/CollisionAssociationTables.h" #include "Common/DataModel/EventSelection.h" @@ -283,6 +284,7 @@ struct HfDataCreatorCharmResoReduced { PresliceUnsorted colPerMcCollision = aod::mccollisionlabel::mcCollisionId; HistogramRegistry registry{"registry"}; + OutputObj zorroSummary{"zorroSummary"}; void init(InitContext& initContext) { @@ -381,7 +383,7 @@ struct HfDataCreatorCharmResoReduced { fitter.setWeightedFinalPCA(false); // init HF event selection helper - hfEvSel.init(registry); + hfEvSel.init(registry, zorroSummary); const auto& workflows = initContext.services().get(); for (const DeviceSpec& device : workflows.devices) { diff --git a/PWGHF/D2H/TableProducer/dataCreatorJpsiHadReduced.cxx b/PWGHF/D2H/TableProducer/dataCreatorJpsiHadReduced.cxx index 46e08083e7f..8a2b53b9380 100644 --- a/PWGHF/D2H/TableProducer/dataCreatorJpsiHadReduced.cxx +++ b/PWGHF/D2H/TableProducer/dataCreatorJpsiHadReduced.cxx @@ -30,6 +30,7 @@ #include "Common/Core/RecoDecay.h" #include "Common/Core/TrackSelectorPID.h" +#include "Common/Core/ZorroSummary.h" #include "Common/Core/trackUtilities.h" #include "Common/DataModel/CollisionAssociationTables.h" #include "Common/DataModel/EventSelection.h" @@ -220,6 +221,7 @@ struct HfDataCreatorJpsiHadReduced { o2::vertexing::DCAFitterN<4> df4; HistogramRegistry registry{"registry"}; + OutputObj zorroSummary{"zorroSummary"}; void init(InitContext& initContext) { @@ -335,7 +337,7 @@ struct HfDataCreatorJpsiHadReduced { } // init HF event selection helper - hfEvSel.init(registry); + hfEvSel.init(registry, zorroSummary); if (doprocessJpsiKMc || doprocessJpsiPhiMc) { const auto& workflows = initContext.services().get(); for (const DeviceSpec& device : workflows.devices) { diff --git a/PWGHF/TableProducer/candidateCreator2Prong.cxx b/PWGHF/TableProducer/candidateCreator2Prong.cxx index 21bcaca1c8d..7a58af8072c 100644 --- a/PWGHF/TableProducer/candidateCreator2Prong.cxx +++ b/PWGHF/TableProducer/candidateCreator2Prong.cxx @@ -35,6 +35,7 @@ #include "Common/CCDB/ctpRateFetcher.h" #include "Common/Core/RecoDecay.h" +#include "Common/Core/ZorroSummary.h" #include "Common/Core/trackUtilities.h" #include "Common/DataModel/Centrality.h" #include "Common/DataModel/EventSelection.h" @@ -131,6 +132,7 @@ struct HfCandidateCreator2Prong { ConfigurableAxis axisMass{"axisMass", {500, 1.6, 2.1}, "axis for mass (GeV/c^2)"}; HistogramRegistry registry{"registry"}; + OutputObj zorroSummary{"zorroSummary"}; void init(InitContext const&) { @@ -187,7 +189,7 @@ struct HfCandidateCreator2Prong { hCandidates = registry.add("hCandidates", "candidates counter", {HistType::kTH1D, {axisCands}}); // init HF event selection helper - hfEvSel.init(registry); + hfEvSel.init(registry, zorroSummary); if (std::accumulate(doprocessDF.begin(), doprocessDF.end(), 0) == 1) { registry.fill(HIST("hVertexerType"), aod::hf_cand::VertexerType::DCAFitter); diff --git a/PWGHF/TableProducer/candidateCreator3Prong.cxx b/PWGHF/TableProducer/candidateCreator3Prong.cxx index aa3eb5e849a..1cd922933c4 100644 --- a/PWGHF/TableProducer/candidateCreator3Prong.cxx +++ b/PWGHF/TableProducer/candidateCreator3Prong.cxx @@ -34,6 +34,7 @@ #include "Common/CCDB/ctpRateFetcher.h" #include "Common/Core/RecoDecay.h" +#include "Common/Core/ZorroSummary.h" #include "Common/Core/trackUtilities.h" #include "Common/DataModel/Centrality.h" #include "Common/DataModel/EventSelection.h" @@ -151,6 +152,7 @@ struct HfCandidateCreator3Prong { std::shared_ptr hCandidates; HistogramRegistry registry{"registry"}; + OutputObj zorroSummary{"zorroSummary"}; void init(InitContext const&) { @@ -221,7 +223,7 @@ struct HfCandidateCreator3Prong { hCandidates = registry.add("hCandidates", "candidates counter", {HistType::kTH1D, {axisCands}}); // init HF event selection helper - hfEvSel.init(registry); + hfEvSel.init(registry, zorroSummary); // Configure DCAFitterN // df.setBz(bz); diff --git a/PWGHF/TableProducer/candidateCreatorCascade.cxx b/PWGHF/TableProducer/candidateCreatorCascade.cxx index b72851522de..25f7b2f6fb7 100644 --- a/PWGHF/TableProducer/candidateCreatorCascade.cxx +++ b/PWGHF/TableProducer/candidateCreatorCascade.cxx @@ -27,6 +27,7 @@ #include "Common/CCDB/ctpRateFetcher.h" #include "Common/Core/RecoDecay.h" +#include "Common/Core/ZorroSummary.h" #include "Common/Core/trackUtilities.h" #include "Common/DataModel/Centrality.h" #include "Common/DataModel/EventSelection.h" @@ -109,6 +110,7 @@ struct HfCandidateCreatorCascade { std::shared_ptr hCandidates; HistogramRegistry registry{"registry"}; + OutputObj zorroSummary{"zorroSummary"}; void init(InitContext const&) { @@ -141,7 +143,7 @@ struct HfCandidateCreatorCascade { hCandidates = registry.add("hCandidates", "candidates counter", {HistType::kTH1D, {axisCands}}); // init HF event selection helper - hfEvSel.init(registry); + hfEvSel.init(registry, zorroSummary); massP = MassProton; massK0s = MassK0Short; diff --git a/PWGHF/TableProducer/candidateCreatorDstar.cxx b/PWGHF/TableProducer/candidateCreatorDstar.cxx index 92e79bc0bd2..769dc728f0f 100644 --- a/PWGHF/TableProducer/candidateCreatorDstar.cxx +++ b/PWGHF/TableProducer/candidateCreatorDstar.cxx @@ -28,6 +28,7 @@ #include "Common/CCDB/ctpRateFetcher.h" #include "Common/Core/RecoDecay.h" +#include "Common/Core/ZorroSummary.h" #include "Common/Core/trackUtilities.h" #include "Common/DataModel/Centrality.h" #include "Common/DataModel/EventSelection.h" @@ -143,6 +144,7 @@ struct HfCandidateCreatorDstar { {"QA/hPtD0Prong1", "D^{0} candidates' prong1", {HistType::kTH1F, {ptAxis}}}, {"QA/hPtD0", "D^{0} candidates", {HistType::kTH1F, {ptAxis}}}, {"QA/hPtDstar", "D* candidates", {HistType::kTH1F, {ptAxis}}}}}; + OutputObj zorroSummary{"zorroSummary"}; /// @brief This function initializes the ccdb setting, vertex fitter and runs function MatLayerCylSet::rectifyPtrFromFile(..args..) void init(InitContext const&) @@ -174,7 +176,7 @@ struct HfCandidateCreatorDstar { hCandidates = registry.add("hCandidates", "candidates counter", {HistType::kTH1D, {axisCands}}); // init HF event selection helper - hfEvSel.init(registry); + hfEvSel.init(registry, zorroSummary); // LOG(info) << "Init Function Invoked"; massPi = MassPiPlus; diff --git a/PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx b/PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx index 1aaee149c86..0c170937fa7 100644 --- a/PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx +++ b/PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx @@ -33,6 +33,7 @@ #include "Common/CCDB/ctpRateFetcher.h" #include "Common/Core/RecoDecay.h" +#include "Common/Core/ZorroSummary.h" #include "Common/Core/trackUtilities.h" #include "Common/DataModel/Centrality.h" #include "Common/DataModel/EventSelection.h" @@ -165,6 +166,8 @@ struct HfCandidateCreatorXic0Omegac0 { std::shared_ptr hInvMassCharmBaryonToXiPi, hInvMassCharmBaryonToOmegaPi, hInvMassCharmBaryonToOmegaK, hFitterStatusToXiPi, hFitterStatusToOmegaPi, hFitterStatusToOmegaK, hCandidateCounterToXiPi, hCandidateCounterToOmegaPi, hCandidateCounterToOmegaK, hCascadesCounterToXiPi, hCascadesCounterToOmegaPi, hCascadesCounterToOmegaK; HistogramRegistry registry{"registry"}; + OutputObj zorroSummary{"zorroSummary"}; + // Helper struct to pass information struct { float chi2GeoV0; @@ -365,7 +368,7 @@ struct HfCandidateCreatorXic0Omegac0 { } // init HF event selection helper - hfEvSel.init(registry); + hfEvSel.init(registry, zorroSummary); df.setPropagateToPCA(propagateToPCA); df.setMaxR(maxR); diff --git a/PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx b/PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx index aa57688a46d..fbf83def590 100644 --- a/PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx +++ b/PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx @@ -33,6 +33,7 @@ #include "Common/CCDB/ctpRateFetcher.h" #include "Common/Core/RecoDecay.h" +#include "Common/Core/ZorroSummary.h" #include "Common/Core/trackUtilities.h" #include "Common/DataModel/Centrality.h" #include "Common/DataModel/EventSelection.h" @@ -139,6 +140,7 @@ struct HfCandidateCreatorXicToXiPiPi { using TracksWCovExtraPidPrPi = soa::Join; HistogramRegistry registry{"registry"}; + OutputObj zorroSummary{"zorroSummary"}; void init(InitContext const&) { @@ -186,7 +188,7 @@ struct HfCandidateCreatorXicToXiPiPi { runNumber = 0; // initialize HF event selection helper - hfEvSel.init(registry); + hfEvSel.init(registry, zorroSummary); // initialize 3-prong vertex fitter df.setPropagateToPCA(propagateToPCA); diff --git a/PWGHF/Utils/utilsEvSelHf.h b/PWGHF/Utils/utilsEvSelHf.h index 7b79c1f3205..f1b018d5971 100644 --- a/PWGHF/Utils/utilsEvSelHf.h +++ b/PWGHF/Utils/utilsEvSelHf.h @@ -207,7 +207,6 @@ struct HfEventSelection : o2::framework::ConfigurableGroup { // util to retrieve trigger mask in case of software triggers Zorro zorro; - o2::framework::OutputObj zorroSummary{"zorroSummary"}; int currentRun{-1}; /// Set standard preselection gap trigger (values taken from UD group) @@ -248,7 +247,7 @@ struct HfEventSelection : o2::framework::ConfigurableGroup { /// \brief Inits the HF event selection object /// \param registry reference to the histogram registry - void init(o2::framework::HistogramRegistry& registry) + void init(o2::framework::HistogramRegistry& registry, o2::framework::OutputObj& zorroSummary) { // we initialise the RCT checker if (requireGoodRct) {