From 6546e0eadc6a7a95330e7824ba4826b8f20c8da3 Mon Sep 17 00:00:00 2001 From: Giulio Eulisse <10544+ktf@users.noreply.github.com> Date: Tue, 1 Dec 2026 17:43:18 +0100 Subject: [PATCH] [PWGEM] Use kCompactTHnSparseF for the dilepton polarization histograms In polarization mode each Dilepton task books six 7-dimensional THnSparseD with Sumw2 (same/mix x uls/lspp/lsmm). With the binning of train 818088 (12 dielectron wagons, EM_LHC26_PbPb_pass1_Dielectron) the 10-20% wagon fills 20.5 M bins on two test inputs, and on the grid its end-of-stream output (444 MB) no longer fits in the 2.68 GB shared memory segment of 1-core jobs: "shmem: could not create a message of size 444563472". kCompactTHnSparseF keeps the bins in compact blocks while filling and is written out as a THnSparseF, so downstream code reads the same class family. The histograms are only filled here. Measured with the 818088 configuration on two of its test inputs: - outputs identical: 72 histograms, 89 M filled bins, 0 differences in bin contents, errors, entries and sums of weights; - histograms of the 10-20% wagon in memory: 2352 MB -> 395 MB; - end-of-stream output of that wagon: 431 MB -> 349 MB, all 12 wagons 1873 MB -> 1516 MB; AnalysisResults.root 528 MB -> 362 MB; - wall time unchanged (2:21). --- PWGEM/Dilepton/Core/Dilepton.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGEM/Dilepton/Core/Dilepton.h b/PWGEM/Dilepton/Core/Dilepton.h index f19d3e69628..f7eb9b4af3b 100644 --- a/PWGEM/Dilepton/Core/Dilepton.h +++ b/PWGEM/Dilepton/Core/Dilepton.h @@ -693,7 +693,7 @@ struct Dilepton { const o2::framework::AxisSpec axis_cos_theta{ConfPolarizationCosThetaBins, Form("cos(#theta^{%s})", frameName.data())}; const o2::framework::AxisSpec axis_phi{ConfPolarizationPhiBins, Form("#varphi^{%s} (rad.)", frameName.data())}; const o2::framework::AxisSpec axis_quadmom{ConfPolarizationQuadMomBins, Form("#frac{3 cos^{2}(#theta^{%s}) -1}{2}", frameName.data())}; - fRegistry.add("Pair/same/uls/hs", "dilepton", o2::framework::HistType::kTHnSparseD, {axis_mass, axis_pt, axis_dca, axis_y, axis_cos_theta, axis_phi, axis_quadmom}, true); + fRegistry.add("Pair/same/uls/hs", "dilepton", o2::framework::HistType::kCompactTHnSparseF, {axis_mass, axis_pt, axis_dca, axis_y, axis_cos_theta, axis_phi, axis_quadmom}, true); fRegistry.addClone("Pair/same/uls/", "Pair/same/lspp/"); fRegistry.addClone("Pair/same/uls/", "Pair/same/lsmm/");