From 86b2a4c3544619e197d6b76c2c453908cfa0b2d9 Mon Sep 17 00:00:00 2001 From: Sushanta Tripathy Date: Fri, 6 Nov 2026 17:36:04 +0100 Subject: [PATCH 1/3] Fixing binning issues for misidentification studies --- PWGLF/Tasks/Resonances/lambdastarproxy.cxx | 29 +++------------------- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/PWGLF/Tasks/Resonances/lambdastarproxy.cxx b/PWGLF/Tasks/Resonances/lambdastarproxy.cxx index 625403f7c0e..a0fe626cb3c 100644 --- a/PWGLF/Tasks/Resonances/lambdastarproxy.cxx +++ b/PWGLF/Tasks/Resonances/lambdastarproxy.cxx @@ -1222,6 +1222,9 @@ struct Lambdastarproxy { const AxisSpec mcMass{DiagnosticMassBins, 1.4, 1.8, "M_(d/2)K (GeV/c2)"}; const AxisSpec probeMass{ProbeMassBins, 1.4, 1.8, "M_(d/2)K (GeV/c2)"}; uint64_t payload = 0; + // Keep these numerically filled TH3 axes unlabelled. ROOT label-mode merges + // can collapse distinct Z tags, especially through empty/staged merges. + // SpeciesNames/ParentNames and the packed-axis formulas define the decoder. auto add3 = [&](std::string const& name, std::string const& title, std::vector const& axes) { auto h = histos.add(name.c_str(), title.c_str(), HistType::kTH3D, axes, true); payload += static_cast(h->GetNcells()) * 2 * sizeof(double); @@ -1232,17 +1235,8 @@ struct Lambdastarproxy { if (lstarEnableMCProxySpecies.value != 0) { mcProxySpecies[sign] = add3("hMCProxySpecies" + suffix, "Selected proxy;species+51*(dTOF+2*kTOF+4*pTPC+8*regularMult)", {mcMass, pairPt, AxisSpec{SpeciesTagCount * SelectedPIDStates, -0.5, SpeciesTagCount * SelectedPIDStates - 0.5, "Species and detector state"}}); - for (int state = 0; state < SelectedPIDStates; ++state) { - for (int tag = 0; tag < SpeciesTagCount; ++tag) { - const std::string label = speciesTagName(tag) + ";state=" + std::to_string(state); - mcProxySpecies[sign]->GetZaxis()->SetBinLabel(tag + SpeciesTagCount * state + 1, label.c_str()); - } - } mcProxyOtherParents[sign] = add3("hMCProxyOtherParents" + suffix, "Selected Other: retained immediate common-mother class only", {mcMass, pairPt, AxisSpec{ParentClasses, -0.5, ParentClasses - 0.5, "Retained parent class"}}); - for (int parent = 0; parent < ParentClasses; ++parent) { - mcProxyOtherParents[sign]->GetZaxis()->SetBinLabel(parent + 1, ParentNames[parent]); - } } if (lstarEnableProxyPIDProbes.value == 0) { continue; @@ -1256,27 +1250,10 @@ struct Lambdastarproxy { probeMass2[role][sign] = add3(std::string(stem).append("Mass2").append(suffix), "Loose both-TOF proxy probes;TPC/TOF envelopes;regular multiplicity", {probeMass, m2, packed}); 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}); 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}); - for (int region = 0; region < ProbeRegions; ++region) { - for (int momentum = 0; momentum < ProbeMomentumBins; ++momentum) { - for (int pair = 0; pair < ProbePairPtBins; ++pair) { - const int tag = pair + ProbePairPtBins * (momentum + ProbeMomentumBins * region); - const std::string label = "pair=" + std::to_string(pair) + ";p=" + std::to_string(momentum) + ";region=" + std::to_string(region); - probeMass2[role][sign]->GetZaxis()->SetBinLabel(tag + 1, label.c_str()); - probeTPC[role][sign]->GetZaxis()->SetBinLabel(tag + 1, label.c_str()); - probeTOF[role][sign]->GetZaxis()->SetBinLabel(tag + 1, label.c_str()); - } - } - } } if (doprocessMCReco) { mcProbeSpecies[sign] = add3("hMCProxyPIDProbeSpecies" + suffix, "Same loose probe pairs;species+51*nominalRegion;regular multiplicity", {probeMass, pairPt, AxisSpec{SpeciesTagCount * ProbeRegions, -0.5, SpeciesTagCount * ProbeRegions - 0.5, "Species plus nominal region"}}); - for (int region = 0; region < ProbeRegions; ++region) { - for (int tag = 0; tag < SpeciesTagCount; ++tag) { - const std::string label = speciesTagName(tag) + ";region=" + std::to_string(region); - mcProbeSpecies[sign]->GetZaxis()->SetBinLabel(tag + SpeciesTagCount * region + 1, label.c_str()); - } - } } } if (lstarEnableProxyPIDProbes.value != 0) { From 74c24cfaedc2075a16cd2c4a8970e15c6e165dd3 Mon Sep 17 00:00:00 2001 From: Sushanta Tripathy Date: Fri, 6 Nov 2026 17:47:36 +0100 Subject: [PATCH 2/3] Removing unused parentclass Updated comments for clarity regarding parent tags and decoder definitions. --- PWGLF/Tasks/Resonances/lambdastarproxy.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PWGLF/Tasks/Resonances/lambdastarproxy.cxx b/PWGLF/Tasks/Resonances/lambdastarproxy.cxx index a0fe626cb3c..513f7e97d65 100644 --- a/PWGLF/Tasks/Resonances/lambdastarproxy.cxx +++ b/PWGLF/Tasks/Resonances/lambdastarproxy.cxx @@ -1064,9 +1064,9 @@ struct Lambdastarproxy { static constexpr double MultMax = 100.; static constexpr std::array PairSigns{"Unlike", "Like"}; static constexpr std::array ProbeRoles{"De", "Ka"}; - static constexpr std::array ParentNames{ - "no retained common mother", "K0S", "Lambda1115", "Kstar", "phi", "Lambda1520", - "other retained common mother", "multiple retained common mothers", "same MC particle", "invalid truth labels"}; + // Parent tags: 0=no common mother, 1=K0S, 2=Lambda1115, 3=Kstar, 4=phi, + // 5=Lambda1520, 6=other common mother, 7=multiple common mothers, + // 8=same MC particle, 9=invalid truth labels. std::array, 2> mcProxySpecies{}; std::array, 2> mcProxyOtherParents{}; @@ -1224,7 +1224,7 @@ struct Lambdastarproxy { uint64_t payload = 0; // Keep these numerically filled TH3 axes unlabelled. ROOT label-mode merges // can collapse distinct Z tags, especially through empty/staged merges. - // SpeciesNames/ParentNames and the packed-axis formulas define the decoder. + // SpeciesNames, the parent-tag comments and packed-axis formulas define the decoder. auto add3 = [&](std::string const& name, std::string const& title, std::vector const& axes) { auto h = histos.add(name.c_str(), title.c_str(), HistType::kTH3D, axes, true); payload += static_cast(h->GetNcells()) * 2 * sizeof(double); From 0dc56c74194df38ffa4472b85e0a1995077233e8 Mon Sep 17 00:00:00 2001 From: Sushanta Tripathy Date: Fri, 6 Nov 2026 19:48:22 +0100 Subject: [PATCH 3/3] Refine comments on TH3 axes labeling Updated comments for clarity regarding TH3 axes labeling. --- PWGLF/Tasks/Resonances/lambdastarproxy.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/PWGLF/Tasks/Resonances/lambdastarproxy.cxx b/PWGLF/Tasks/Resonances/lambdastarproxy.cxx index 513f7e97d65..e4fbed337ad 100644 --- a/PWGLF/Tasks/Resonances/lambdastarproxy.cxx +++ b/PWGLF/Tasks/Resonances/lambdastarproxy.cxx @@ -1222,9 +1222,8 @@ struct Lambdastarproxy { const AxisSpec mcMass{DiagnosticMassBins, 1.4, 1.8, "M_(d/2)K (GeV/c2)"}; const AxisSpec probeMass{ProbeMassBins, 1.4, 1.8, "M_(d/2)K (GeV/c2)"}; uint64_t payload = 0; - // Keep these numerically filled TH3 axes unlabelled. ROOT label-mode merges - // can collapse distinct Z tags, especially through empty/staged merges. - // SpeciesNames, the parent-tag comments and packed-axis formulas define the decoder. + // Keep these numerically filled TH3 axes unlabelled. + // For SpeciesNames see comment above, the parent-tag comments and packed-axis formulas define the decoder. auto add3 = [&](std::string const& name, std::string const& title, std::vector const& axes) { auto h = histos.add(name.c_str(), title.c_str(), HistType::kTH3D, axes, true); payload += static_cast(h->GetNcells()) * 2 * sizeof(double);