Skip to content

Commit cae6bb0

Browse files
committed
use pdg code directly
1 parent e12b25c commit cae6bb0

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

‎PWGLF/Tasks/Resonances/xi1820Analysis.cxx‎

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,6 @@ struct Xi1820Analysis {
103103

104104
// Constants
105105
static constexpr float SmallMomentumDenominator = 1e-10f; // Small value to avoid division by zero
106-
static constexpr int PdgChargedXi1820 = Pdg::kXi1820Minus;
107-
static constexpr int PdgXi1820Zero = Pdg::kXi1820Zero;
108106
static constexpr int ExpectedDaughters = 2; // Expected number of daughters for two-body decay
109107

110108
// Axes
@@ -1116,7 +1114,7 @@ struct Xi1820Analysis {
11161114
}
11171115

11181116
if constexpr (IsMC) { // Calculate Acceptance x efficiency for "the particle" channel
1119-
if (v0.motherPDG() != -PdgChargedXi1820 || kaon.motherPDG() != v0.motherPDG()) {
1117+
if (v0.motherPDG() != -Pdg::kXi1820Minus || kaon.motherPDG() != v0.motherPDG()) {
11201118
continue;
11211119
}
11221120
if (kaon.pdgCode() != PDG_t::kKPlus || v0.pdgCode() != PDG_t::kLambda0Bar) {
@@ -1193,7 +1191,7 @@ struct Xi1820Analysis {
11931191
}
11941192
}
11951193
if constexpr (IsMC) { // Calculate Acceptance x efficiency for "the particle" channel
1196-
if (v0.motherPDG() != PdgChargedXi1820 || kaon.motherPDG() != v0.motherPDG()) {
1194+
if (v0.motherPDG() != Pdg::kXi1820Minus || kaon.motherPDG() != v0.motherPDG()) {
11971195
continue;
11981196
}
11991197
if (kaon.pdgCode() != PDG_t::kKMinus || v0.pdgCode() != PDG_t::kLambda0) {
@@ -1398,7 +1396,7 @@ struct Xi1820Analysis {
13981396
}
13991397

14001398
if constexpr (IsMC) { // Calculate Acceptance x efficiency
1401-
if (lambda.motherPDG() != PdgXi1820Zero || k0s.motherPDG() != lambda.motherPDG()) {
1399+
if (lambda.motherPDG() != Pdg::kXi1820Zero || k0s.motherPDG() != lambda.motherPDG()) {
14021400
continue;
14031401
}
14041402
if (std::abs(k0s.pdgCode()) != PDG_t::kK0Short || lambda.pdgCode() != PDG_t::kLambda0) {
@@ -1468,7 +1466,7 @@ struct Xi1820Analysis {
14681466
}
14691467

14701468
if constexpr (IsMC) { // Calculate Acceptance x efficiency
1471-
if (lambda.motherPDG() != -PdgXi1820Zero || k0s.motherPDG() != lambda.motherPDG()) {
1469+
if (lambda.motherPDG() != -Pdg::kXi1820Zero || k0s.motherPDG() != lambda.motherPDG()) {
14721470
continue;
14731471
}
14741472
if (std::abs(k0s.pdgCode()) != PDG_t::kK0Short || lambda.pdgCode() != PDG_t::kLambda0Bar) {
@@ -1770,7 +1768,7 @@ struct Xi1820Analysis {
17701768
histos.fill(HIST("multQA/h2MultCentMC"), inCent, multiplicity);
17711769
for (const auto& part : resoParents) { // loop over all pre-filtered Gen particle on selected events
17721770
auto pdgMother = part.pdgCode();
1773-
if (std::abs(pdgMother) != PdgChargedXi1820 && std::abs(pdgMother) != PdgXi1820Zero) {
1771+
if (std::abs(pdgMother) != Pdg::kXi1820Minus && std::abs(pdgMother) != Pdg::kXi1820Zero) {
17741772
continue;
17751773
}
17761774
if (!passesRapidity(part.y())) {
@@ -1780,7 +1778,7 @@ struct Xi1820Analysis {
17801778
auto daughter1PDG = part.daughterPDG1();
17811779
auto daughter2PDG = part.daughterPDG2();
17821780

1783-
if (std::abs(pdgMother) == PdgChargedXi1820) { // Explicity check for the safety.
1781+
if (std::abs(pdgMother) == Pdg::kXi1820Minus) { // Explicity check for the safety.
17841782
// K- + Anti-Lambda, K+ + Anti-Lambda
17851783
if ((daughter1PDG == PDG_t::kKMinus && daughter2PDG == PDG_t::kLambda0) ||
17861784
(daughter1PDG == PDG_t::kLambda0 && daughter2PDG == PDG_t::kKMinus)) {
@@ -1813,7 +1811,7 @@ struct Xi1820Analysis {
18131811
int pdg = mcParticle.pdgCode();
18141812

18151813
// Select only the configured charged and neutral Xi(1820) states.
1816-
if (std::abs(pdg) != PdgChargedXi1820 && std::abs(pdg) != PdgXi1820Zero) {
1814+
if (std::abs(pdg) != Pdg::kXi1820Minus && std::abs(pdg) != Pdg::kXi1820Zero) {
18171815
continue;
18181816
}
18191817

0 commit comments

Comments
 (0)