Skip to content

Commit ccd05c1

Browse files
authored
PWGMM: Mult: configurable axis in test task (#5752)
1 parent 6872b02 commit ccd05c1

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

PWGMM/Mult/TableProducer/reducer.cxx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -231,15 +231,16 @@ struct Reducer {
231231
};
232232

233233
struct ReducerTest {
234-
HistogramRegistry r{
235-
"Common",
236-
{
237-
{"ReconstructedMultiplicity", " ; N_{trk}", {HistType::kTH1F, {{301, -0.5, 300.5}}}}, //
238-
{"GeneratedMultiplicity", " ; N_{particles}", {HistType::kTH1F, {{301, -0.5, 300.5}}}}, //
239-
{"ReconstructedMultiplicityUnweighted", " ; N_{trk}", {HistType::kTH1F, {{301, -0.5, 300.5}}}}, //
240-
{"GeneratedMultiplicityUnweighted", " ; N_{particles}", {HistType::kTH1F, {{301, -0.5, 300.5}}}} //
241-
} //
242-
};
234+
Configurable<int> maxMult{"maxMult", 300, "Max multiplicity bin"};
235+
HistogramRegistry r{"Common", {}};
236+
237+
void init(InitContext const&)
238+
{
239+
r.add({"ReconstructedMultiplicity", " ; N_{trk}", {HistType::kTH1F, {{maxMult + 1, -0.5, maxMult + 0.5}}}});
240+
r.add({"GeneratedMultiplicity", " ; N_{particles}", {HistType::kTH1F, {{maxMult + 1, -0.5, maxMult + 0.5}}}});
241+
r.add({"ReconstructedMultiplicityUnweighted", " ; N_{trk}", {HistType::kTH1F, {{maxMult + 1, -0.5, maxMult + 0.5}}}});
242+
r.add({"GeneratedMultiplicityUnweighted", " ; N_{particles}", {HistType::kTH1F, {{maxMult + 1, -0.5, maxMult + 0.5}}}});
243+
}
243244

244245
void process(aod::StoredRMCCollisions const& mccollisions, soa::Join<aod::StoredRCollisions, aod::StoredRMCColLabels> const& collisions)
245246
{

0 commit comments

Comments
 (0)