@@ -1064,9 +1064,9 @@ struct Lambdastarproxy {
10641064 static constexpr double MultMax = 100 .;
10651065 static constexpr std::array<const char *, 2 > PairSigns{" Unlike" , " Like" };
10661066 static constexpr std::array<const char *, 2 > ProbeRoles{" De" , " Ka" };
1067- static constexpr std::array< const char *, ParentClasses> ParentNames{
1068- " no retained common mother" , " K0S " , " Lambda1115 " , " Kstar " , " phi " , " Lambda1520 " ,
1069- " other retained common mother " , " multiple retained common mothers " , " same MC particle" , " invalid truth labels" };
1067+ // Parent tags: 0=no common mother, 1=K0S, 2=Lambda1115, 3=Kstar, 4=phi,
1068+ // 5=Lambda1520, 6=other common mother, 7=multiple common mothers ,
1069+ // 8= same MC particle, 9= invalid truth labels.
10701070
10711071 std::array<std::shared_ptr<TH3 >, 2 > mcProxySpecies{};
10721072 std::array<std::shared_ptr<TH3 >, 2 > mcProxyOtherParents{};
@@ -1222,6 +1222,8 @@ 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.
1226+ // For SpeciesNames see comment above, the parent-tag comments and packed-axis formulas define the decoder.
12251227 auto add3 = [&](std::string const & name, std::string const & title, std::vector<AxisSpec> const & axes) {
12261228 auto h = histos.add <TH3 >(name.c_str (), title.c_str (), HistType::kTH3D , axes, true );
12271229 payload += static_cast <uint64_t >(h->GetNcells ()) * 2 * sizeof (double );
@@ -1232,17 +1234,8 @@ struct Lambdastarproxy {
12321234 if (lstarEnableMCProxySpecies.value != 0 ) {
12331235 mcProxySpecies[sign] = add3 (" hMCProxySpecies" + suffix, " Selected proxy;species+51*(dTOF+2*kTOF+4*pTPC+8*regularMult)" ,
12341236 {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- }
12411237 mcProxyOtherParents[sign] = add3 (" hMCProxyOtherParents" + suffix, " Selected Other: retained immediate common-mother class only" ,
12421238 {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- }
12461239 }
12471240 if (lstarEnableProxyPIDProbes.value == 0 ) {
12481241 continue ;
@@ -1256,27 +1249,10 @@ struct Lambdastarproxy {
12561249 probeMass2[role][sign] = add3 (std::string (stem).append (" Mass2" ).append (suffix), " Loose both-TOF proxy probes;TPC/TOF envelopes;regular multiplicity" , {probeMass, m2, packed});
12571250 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});
12581251 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- }
12701252 }
12711253 if (doprocessMCReco) {
12721254 mcProbeSpecies[sign] = add3 (" hMCProxyPIDProbeSpecies" + suffix, " Same loose probe pairs;species+51*nominalRegion;regular multiplicity" ,
12731255 {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- }
12801256 }
12811257 }
12821258 if (lstarEnableProxyPIDProbes.value != 0 ) {
0 commit comments