From 49b8eda232e80475c95c634a4c418267dbe2c87a Mon Sep 17 00:00:00 2001 From: Giulio Eulisse <10544+ktf@users.noreply.github.com> Date: Wed, 25 Nov 2026 22:47:55 +0100 Subject: [PATCH] [PWGLF] f0phiproxy: fill the proxy sparse histograms as CompactTHnSparse Use HistType::kCompactTHnSparseF for the seven-dimensional compact and full proxy histograms. They are filled the same way and written out as THnSparseF, so the output is unchanged; only the in-memory storage differs (about 10 B per filled bin instead of about 70 B, and no 2-3x peak while the bin map grows). In the wagon test of train 812749 (LHC25_pass1_MinBias) these histograms hold 13.8 M filled bins, 46-93 % of the PSS of each f0phiproxy device (about 0.96 GB in total); with the compact storage that is about 0.15 GB. Needs kCompactTHnSparseF in O2 (DPL Analysis: add CompactTHnSparse). --- PWGLF/Tasks/Resonances/f0phiproxy.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/PWGLF/Tasks/Resonances/f0phiproxy.cxx b/PWGLF/Tasks/Resonances/f0phiproxy.cxx index ed397188370..722e101e5d9 100644 --- a/PWGLF/Tasks/Resonances/f0phiproxy.cxx +++ b/PWGLF/Tasks/Resonances/f0phiproxy.cxx @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -289,7 +290,7 @@ struct F0phiproxy { std::shared_ptr pidSelectionNonfinite{}; std::array, NMixClasses> dipionSpectra{}; - std::array, NMixClasses>, NChannels> compactProxy{}, fullProxy{}; + std::array, NMixClasses>, NChannels> compactProxy{}, fullProxy{}; std::array, NCharges>, NMixClasses>, NChannels> controls{}; std::array, NTruthClasses>, NChannels> recoComponents{}; std::array, NChannels> recoTrueParent{}, recoPtResponse{}, proxyPtResponse{}; @@ -536,10 +537,10 @@ struct F0phiproxy { if (channelEnabled(channel)) { // The measured dipion mass is retained; a mass window is not an f0 tag. if (enableCompactProxy.value) { - compactProxy[channel][mix] = histos.add(recoName(compactNames[channel][mix]).c_str(), "Grouped-pT/multiplicity proxy; no constituent charge is measured", HistType::kTHnSparseF, {mass, compactPt, compactMassPi, compactMult, charge, bachelorCharge, tof}); + compactProxy[channel][mix] = histos.add(recoName(compactNames[channel][mix]).c_str(), "Grouped-pT/multiplicity proxy; no constituent charge is measured", HistType::kCompactTHnSparseF, {mass, compactPt, compactMassPi, compactMult, charge, bachelorCharge, tof}); } if (enableFullProxySparse.value) { - fullProxy[channel][mix] = histos.add(recoName(fullNames[channel][mix]).c_str(), "Diagnostic full proxy", HistType::kTHnSparseF, {mass, pt, massPi, mult, charge, bachelorCharge, tof}); + fullProxy[channel][mix] = histos.add(recoName(fullNames[channel][mix]).c_str(), "Diagnostic full proxy", HistType::kCompactTHnSparseF, {mass, pt, massPi, mult, charge, bachelorCharge, tof}); } } if (controlEnabled(channel)) { @@ -668,7 +669,8 @@ struct F0phiproxy { } } - static void fillSparse(std::shared_ptr const& histogram, std::initializer_list coordinates) + template + static void fillSparse(std::shared_ptr const& histogram, std::initializer_list coordinates) { if (histogram) { histogram->Fill(coordinates.begin());