Skip to content

Commit ebe1caf

Browse files
committed
Update diagnoseOtherHadron to be more verbose
1 parent ab9dd92 commit ebe1caf

1 file changed

Lines changed: 36 additions & 4 deletions

File tree

‎PWGEM/PhotonMeson/Tasks/twoPhotonMcTask.cxx‎

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ enum class PhotonTruth : uint8_t {
8989
/// \brief Class of the closest common ancestor of the two photon candidates of a pair
9090
enum class PairBucket : uint8_t {
9191
kNone = 0, // no common ancestor
92-
kSameParticle, // common ancestor is one of the two candidates themselves (EMC conversion split, Dalitz)
92+
kSameParticle, // one particle seen twice: the common ancestor is one of the two candidates themselves (EMC conversion split, Dalitz),
93+
// or a photon/electron whose electromagnetic shower made both candidates (e.g. bremsstrahlung of both conversion legs)
9394
kSignalPi0, // pi0 is the direct mother of both
9495
kSignalEta, // eta is the direct mother of both
9596
kCrossPi0, // pi0 further up in the chain: the pi0 has no hadronic decays, so these are pi0 decays with an EM interaction in between (conversion, bremsstrahlung, shower in front of the EMCal)
@@ -129,7 +130,13 @@ enum class OtherHadronSpecies : uint8_t {
129130
kRho,
130131
kKstar,
131132
kPhi,
132-
kOtherMeson, // incl. f0, f2, a, b, h resonances
133+
kA1, // a1(1260)
134+
kExcitedK, // K1(1270), K1(1400), K0*(1430), K2*(1430)
135+
kOpenCharm, // D, D*, Ds, ... (one c quark)
136+
kCharmonium, // J/psi, psi(2S), chi_c, ...
137+
kOpenBeauty, // B, B*, Bs, Bc, ... (one b quark)
138+
kBottomonium, // Upsilon, chi_b, ...
139+
kOtherMeson, // incl. f0, f2, b, h resonances
133140
kProton,
134141
kNeutron,
135142
kDelta,
@@ -426,7 +433,7 @@ struct TwoPhotonMcTask {
426433
const AxisSpec axisOHSpecies{static_cast<int>(OtherHadronSpecies::kNSpecies), -0.5, static_cast<int>(OtherHadronSpecies::kNSpecies) - 0.5, "common ancestor"};
427434
const AxisSpec axisOHProduction{static_cast<int>(SplitProduction::kNProduction), -0.5, static_cast<int>(SplitProduction::kNProduction) - 0.5, "split of the common ancestor"};
428435
auto hOtherHadron = registry.add<THn>("PCM/OtherHadron/hAncestor", "other hadron pairs: minv vs pT vs ancestor species vs split production vs pair truth", HistType::kTHnF, {axisOHMass, axisOHPt, axisOHSpecies, axisOHProduction, thnAxisPairTruth});
429-
static constexpr std::array<std::string_view, static_cast<int>(OtherHadronSpecies::kNSpecies)> SpeciesLabels = {"#pi^{#pm}", "K^{#pm}", "K^{0}_{L}", "#rho", "K^{*}", "#phi", "other meson", "p", "n", "#Delta", "#Lambda", "#Sigma", "#Xi", "other baryon", "other"};
436+
static constexpr std::array<std::string_view, static_cast<int>(OtherHadronSpecies::kNSpecies)> SpeciesLabels = {"#pi^{#pm}", "K^{#pm}", "K^{0}_{L}", "#rho", "K^{*}", "#phi", "a_{1}", "K_{1}, K^{*}_{0,2}", "open charm", "c#bar{c}", "open beauty", "b#bar{b}", "other meson", "p", "n", "#Delta", "#Lambda", "#Sigma", "#Xi", "other baryon", "other"};
430437
for (std::size_t i = 0; i < SpeciesLabels.size(); ++i) {
431438
hOtherHadron->GetAxis(2)->SetBinLabel(static_cast<int>(i) + 1, SpeciesLabels[i].data());
432439
}
@@ -725,6 +732,9 @@ struct TwoPhotonMcTask {
725732
}
726733
mcIter.setCursor(ancestor);
727734
const int absPdg = std::abs(mcIter.pdgCode());
735+
if (absPdg == PDG_t::kGamma || absPdg == PDG_t::kElectron) {
736+
return PairBucket::kSameParticle; // both candidates come from the electromagnetic shower of one photon or electron
737+
}
728738
const bool isDirectMother = chain1[1] == ancestor && chain2[1] == ancestor;
729739
if (isDirectMother && absPdg == PDG_t::kPi0) {
730740
return PairBucket::kSignalPi0;
@@ -906,7 +916,29 @@ struct TwoPhotonMcTask {
906916
return OtherHadronSpecies::kOther;
907917
}
908918
// PDG numbering: mesons have no third quark, i.e. the thousands digit is 0 (also for 9000000 type resonances)
909-
return (absPdg / 1000) % 10 == 0 ? OtherHadronSpecies::kOtherMeson : OtherHadronSpecies::kOtherBaryon; // o2-linter: disable=magic-number (PDG digit)
919+
if ((absPdg / 1000) % 10 != 0) { // o2-linter: disable=magic-number (PDG digit)
920+
return OtherHadronSpecies::kOtherBaryon;
921+
}
922+
// mesons: hundreds digit = heavier quark, tens digit = lighter quark, last digit = 2J+1
923+
// (also covers excited states with a radial/orbital prefix, e.g. 10441, 20443, 100553)
924+
const int heavyQuark = (absPdg / 100) % 10; // o2-linter: disable=magic-number (PDG digit)
925+
const int lightQuark = (absPdg / 10) % 10; // o2-linter: disable=magic-number (PDG digit)
926+
constexpr int Strange = 3, Charm = 4, Beauty = 5;
927+
constexpr int ExcitedPrefix = 10000;
928+
constexpr int SpinTwo = 5; // 2J+1 for J = 2
929+
if (heavyQuark == Charm) {
930+
return lightQuark == Charm ? OtherHadronSpecies::kCharmonium : OtherHadronSpecies::kOpenCharm;
931+
}
932+
if (heavyQuark == Beauty) {
933+
return lightQuark == Beauty ? OtherHadronSpecies::kBottomonium : OtherHadronSpecies::kOpenBeauty;
934+
}
935+
if (absPdg == 20213 || absPdg == 20113) { // o2-linter: disable=pdg/explicit-code (a1(1260), no named constant)
936+
return OtherHadronSpecies::kA1;
937+
}
938+
if (heavyQuark == Strange && lightQuark < Strange && (absPdg >= ExcitedPrefix || absPdg % 10 == SpinTwo)) { // o2-linter: disable=magic-number (PDG digit)
939+
return OtherHadronSpecies::kExcitedK;
940+
}
941+
return OtherHadronSpecies::kOtherMeson;
910942
}
911943

912944
/// \brief How an MC particle was produced

0 commit comments

Comments
 (0)