Skip to content

Commit 86b2a4c

Browse files
Sushanta TripathySushanta Tripathy
authored andcommitted
Fixing binning issues for misidentification studies
1 parent aab5599 commit 86b2a4c

1 file changed

Lines changed: 3 additions & 26 deletions

File tree

‎PWGLF/Tasks/Resonances/lambdastarproxy.cxx‎

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1222,6 +1222,9 @@ struct Lambdastarproxy {
12221222
const AxisSpec mcMass{DiagnosticMassBins, 1.4, 1.8, "M_(d/2)K (GeV/c2)"};
12231223
const AxisSpec probeMass{ProbeMassBins, 1.4, 1.8, "M_(d/2)K (GeV/c2)"};
12241224
uint64_t payload = 0;
1225+
// Keep these numerically filled TH3 axes unlabelled. ROOT label-mode merges
1226+
// can collapse distinct Z tags, especially through empty/staged merges.
1227+
// SpeciesNames/ParentNames and the packed-axis formulas define the decoder.
12251228
auto add3 = [&](std::string const& name, std::string const& title, std::vector<AxisSpec> const& axes) {
12261229
auto h = histos.add<TH3>(name.c_str(), title.c_str(), HistType::kTH3D, axes, true);
12271230
payload += static_cast<uint64_t>(h->GetNcells()) * 2 * sizeof(double);
@@ -1232,17 +1235,8 @@ struct Lambdastarproxy {
12321235
if (lstarEnableMCProxySpecies.value != 0) {
12331236
mcProxySpecies[sign] = add3("hMCProxySpecies" + suffix, "Selected proxy;species+51*(dTOF+2*kTOF+4*pTPC+8*regularMult)",
12341237
{mcMass, pairPt, AxisSpec{SpeciesTagCount * SelectedPIDStates, -0.5, SpeciesTagCount * SelectedPIDStates - 0.5, "Species and detector state"}});
1235-
for (int state = 0; state < SelectedPIDStates; ++state) {
1236-
for (int tag = 0; tag < SpeciesTagCount; ++tag) {
1237-
const std::string label = speciesTagName(tag) + ";state=" + std::to_string(state);
1238-
mcProxySpecies[sign]->GetZaxis()->SetBinLabel(tag + SpeciesTagCount * state + 1, label.c_str());
1239-
}
1240-
}
12411238
mcProxyOtherParents[sign] = add3("hMCProxyOtherParents" + suffix, "Selected Other: retained immediate common-mother class only",
12421239
{mcMass, pairPt, AxisSpec{ParentClasses, -0.5, ParentClasses - 0.5, "Retained parent class"}});
1243-
for (int parent = 0; parent < ParentClasses; ++parent) {
1244-
mcProxyOtherParents[sign]->GetZaxis()->SetBinLabel(parent + 1, ParentNames[parent]);
1245-
}
12461240
}
12471241
if (lstarEnableProxyPIDProbes.value == 0) {
12481242
continue;
@@ -1256,27 +1250,10 @@ struct Lambdastarproxy {
12561250
probeMass2[role][sign] = add3(std::string(stem).append("Mass2").append(suffix), "Loose both-TOF proxy probes;TPC/TOF envelopes;regular multiplicity", {probeMass, m2, packed});
12571251
probeTPC[role][sign] = add3(std::string(stem).append("TPC").append(suffix), "Same loose both-TOF proxy probes;TPC nSigma;regular multiplicity", {probeMass, AxisSpec{60, -ProbeTPCMax, ProbeTPCMax, "TPC nSigma for slot hypothesis"}, packed});
12581252
probeTOF[role][sign] = add3(std::string(stem).append("TOF").append(suffix), "Same loose both-TOF proxy probes;TOF nSigma;regular multiplicity", {probeMass, AxisSpec{80, -ProbeTOFMax, ProbeTOFMax, "TOF nSigma for slot hypothesis"}, packed});
1259-
for (int region = 0; region < ProbeRegions; ++region) {
1260-
for (int momentum = 0; momentum < ProbeMomentumBins; ++momentum) {
1261-
for (int pair = 0; pair < ProbePairPtBins; ++pair) {
1262-
const int tag = pair + ProbePairPtBins * (momentum + ProbeMomentumBins * region);
1263-
const std::string label = "pair=" + std::to_string(pair) + ";p=" + std::to_string(momentum) + ";region=" + std::to_string(region);
1264-
probeMass2[role][sign]->GetZaxis()->SetBinLabel(tag + 1, label.c_str());
1265-
probeTPC[role][sign]->GetZaxis()->SetBinLabel(tag + 1, label.c_str());
1266-
probeTOF[role][sign]->GetZaxis()->SetBinLabel(tag + 1, label.c_str());
1267-
}
1268-
}
1269-
}
12701253
}
12711254
if (doprocessMCReco) {
12721255
mcProbeSpecies[sign] = add3("hMCProxyPIDProbeSpecies" + suffix, "Same loose probe pairs;species+51*nominalRegion;regular multiplicity",
12731256
{probeMass, pairPt, AxisSpec{SpeciesTagCount * ProbeRegions, -0.5, SpeciesTagCount * ProbeRegions - 0.5, "Species plus nominal region"}});
1274-
for (int region = 0; region < ProbeRegions; ++region) {
1275-
for (int tag = 0; tag < SpeciesTagCount; ++tag) {
1276-
const std::string label = speciesTagName(tag) + ";region=" + std::to_string(region);
1277-
mcProbeSpecies[sign]->GetZaxis()->SetBinLabel(tag + SpeciesTagCount * region + 1, label.c_str());
1278-
}
1279-
}
12801257
}
12811258
}
12821259
if (lstarEnableProxyPIDProbes.value != 0) {

0 commit comments

Comments
 (0)