Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 5 additions & 29 deletions PWGLF/Tasks/Resonances/lambdastarproxy.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1064,9 +1064,9 @@ struct Lambdastarproxy {
static constexpr double MultMax = 100.;
static constexpr std::array<const char*, 2> PairSigns{"Unlike", "Like"};
static constexpr std::array<const char*, 2> ProbeRoles{"De", "Ka"};
static constexpr std::array<const char*, ParentClasses> 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<std::shared_ptr<TH3>, 2> mcProxySpecies{};
std::array<std::shared_ptr<TH3>, 2> mcProxyOtherParents{};
Expand Down Expand Up @@ -1222,6 +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.
// 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<AxisSpec> const& axes) {
auto h = histos.add<TH3>(name.c_str(), title.c_str(), HistType::kTH3D, axes, true);
payload += static_cast<uint64_t>(h->GetNcells()) * 2 * sizeof(double);
Expand All @@ -1232,17 +1234,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;
Expand All @@ -1256,27 +1249,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) {
Expand Down
Loading