Skip to content

Commit db34b1c

Browse files
authored
[PWGCF] Add more mother particles pdg codes in femto framework (#18704)
1 parent eced7f6 commit db34b1c

2 files changed

Lines changed: 47 additions & 8 deletions

File tree

‎PWGCF/Femto/Core/femtoUtils.h‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ constexpr int Delta01232 = 2114;
9191
constexpr int DeltaPlus1232 = 2214;
9292
constexpr int DeltaPlusPlus1232 = 2224;
9393

94+
// Xi(1530) baryons: same situation as Delta(1232) above -- no enum entry and no mass constant
95+
// exists anywhere in O2, so both are hardcoded here.
96+
constexpr int Xi01530 = 3324;
97+
constexpr int XiMinus1530 = 3314;
98+
9499
inline double getPdgMass(int pdgCode)
95100
{
96101
// use this function instead of TDatabasePDG to return masses defined in the PhysicsConstants.h header
@@ -125,6 +130,12 @@ inline double getPdgMass(int pdgCode)
125130
case o2::constants::physics::Pdg::kK0Star892:
126131
mass = o2::constants::physics::MassK0Star892;
127132
break;
133+
case o2::constants::physics::Pdg::kKPlusStar892:
134+
mass = o2::constants::physics::MassKPlusStar892;
135+
break;
136+
case o2::constants::physics::Pdg::kOmega:
137+
mass = o2::constants::physics::MassOmega;
138+
break;
128139
case o2::constants::physics::Pdg::kLambdaCPlus:
129140
mass = o2::constants::physics::MassLambdaCPlus;
130141
break;
@@ -146,9 +157,15 @@ inline double getPdgMass(int pdgCode)
146157
case kSigmaPlus:
147158
mass = o2::constants::physics::MassSigmaPlus;
148159
break;
160+
case kSigma0:
161+
mass = o2::constants::physics::MassSigma0;
162+
break;
149163
case kXiMinus:
150164
mass = o2::constants::physics::MassXiMinus;
151165
break;
166+
case o2::constants::physics::Pdg::kXi0:
167+
mass = o2::constants::physics::MassXi0;
168+
break;
152169
case kOmegaMinus:
153170
mass = o2::constants::physics::MassOmegaMinus;
154171
break;
@@ -158,12 +175,25 @@ inline double getPdgMass(int pdgCode)
158175
case o2::constants::physics::kEta:
159176
mass = o2::constants::physics::MassEta;
160177
break;
178+
case kNeutron:
179+
mass = o2::constants::physics::MassNeutron;
180+
break;
181+
case kK0:
182+
mass = o2::constants::physics::MassK0;
183+
break;
184+
case kLambda1520:
185+
mass = o2::constants::physics::MassLambda1520;
186+
break;
161187
case DeltaMinus1232:
162188
case Delta01232:
163189
case DeltaPlus1232:
164190
case DeltaPlusPlus1232:
165191
mass = 1.232; // not defined in O2?
166192
break;
193+
case Xi01530:
194+
case XiMinus1530:
195+
mass = 1.532; // not defined in O2?
196+
break;
167197
default:
168198
LOG(warn) << "PDG code " << pdgCode << " is not suppored. Return 0... ";
169199
}

‎PWGCF/Femto/Core/particleCleaner.h‎

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ struct ConfParticleCleaner : o2::framework::ConfigurableGroup {
4343
// allowed by those two lists, this same pt/eta/phi range is what its kinematics are checked
4444
// against -- the window does not vary per pdg code. Defaults are wide open (no-op) like every
4545
// other kinematic window in this codebase, so setting these has no effect unless narrowed.
46+
// activateMotherKinematics gates the whole check (default off), so it has zero cost -- no
47+
// mass lookup, no rapidity computation -- unless explicitly turned on.
48+
o2::framework::Configurable<bool> activateMotherKinematics{"activateMotherKinematics", false, "Activate the pt/eta/phi/rapidity kinematic cut on the mother"};
4649
o2::framework::Configurable<float> motherPtMin{"motherPtMin", 0.f, "Minimum pT of the mother. One shared window applies regardless of which requiredMotherPdgCodes/rejectMotherPdgCodes entry the mother's own pdg code matched"};
4750
o2::framework::Configurable<float> motherPtMax{"motherPtMax", 1e6f, "Maximum pT of the mother. One shared window applies regardless of which requiredMotherPdgCodes/rejectMotherPdgCodes entry the mother's own pdg code matched"};
4851
o2::framework::Configurable<float> motherEtaMin{"motherEtaMin", -1e6f, "Minimum eta of the mother. One shared window applies regardless of which requiredMotherPdgCodes/rejectMotherPdgCodes entry the mother's own pdg code matched"};
@@ -133,6 +136,7 @@ class ParticleCleaner
133136
mRequiredMotherPdgCodes = confMpc.requiredMotherPdgCodes.value;
134137
mRejectedMotherPdgCodes = confMpc.rejectMotherPdgCodes.value;
135138

139+
mActivateMotherKinematics = confMpc.activateMotherKinematics.value;
136140
mMotherPtMin = confMpc.motherPtMin.value;
137141
mMotherPtMax = confMpc.motherPtMax.value;
138142
mMotherEtaMin = confMpc.motherEtaMin.value;
@@ -237,14 +241,18 @@ class ParticleCleaner
237241
}
238242
}
239243

240-
// One shared pt/eta/phi window, applied to the mother regardless of which (if any)
241-
// requiredMotherPdgCodes/rejectMotherPdgCodes entry it matched above
242-
double motherRapidity = mother.y(utils::getPdgMass(mother.pdgCode()));
243-
if (!(mother.pt() > mMotherPtMin && mother.pt() < mMotherPtMax &&
244-
mother.eta() > mMotherEtaMin && mother.eta() < mMotherEtaMax &&
245-
motherRapidity > mMotherRapidityMin && motherRapidity < mMotherRapidityMax &&
246-
mother.phi() > mMotherPhiMin && mother.phi() < mMotherPhiMax)) {
247-
motherKinematicsOk = false;
244+
// One shared pt/eta/phi/rapidity window, applied to the mother regardless of which (if
245+
// any) requiredMotherPdgCodes/rejectMotherPdgCodes entry it matched above. Gated behind
246+
// activateMotherKinematics so it costs nothing (no mass lookup, no rapidity computation)
247+
// unless explicitly turned on.
248+
if (mActivateMotherKinematics) {
249+
double motherRapidity = mother.y(utils::getPdgMass(mother.pdgCode()));
250+
if (!(mother.pt() > mMotherPtMin && mother.pt() < mMotherPtMax &&
251+
mother.eta() > mMotherEtaMin && mother.eta() < mMotherEtaMax &&
252+
motherRapidity > mMotherRapidityMin && motherRapidity < mMotherRapidityMax &&
253+
mother.phi() > mMotherPhiMin && mother.phi() < mMotherPhiMax)) {
254+
motherKinematicsOk = false;
255+
}
248256
}
249257
}
250258

@@ -292,6 +300,7 @@ class ParticleCleaner
292300
std::vector<int> mRejectedPdgCodes;
293301
std::vector<int> mRequiredMotherPdgCodes;
294302
std::vector<int> mRejectedMotherPdgCodes;
303+
bool mActivateMotherKinematics = false;
295304
float mMotherPtMin = 0.f;
296305
float mMotherPtMax = 1e6f;
297306
float mMotherEtaMin = -1e6f;

0 commit comments

Comments
 (0)