Skip to content
Merged
Show file tree
Hide file tree
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
30 changes: 30 additions & 0 deletions PWGCF/Femto/Core/femtoUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ constexpr int Delta01232 = 2114;
constexpr int DeltaPlus1232 = 2214;
constexpr int DeltaPlusPlus1232 = 2224;

// Xi(1530) baryons: same situation as Delta(1232) above -- no enum entry and no mass constant
// exists anywhere in O2, so both are hardcoded here.
constexpr int Xi01530 = 3324;
constexpr int XiMinus1530 = 3314;

inline double getPdgMass(int pdgCode)
{
// use this function instead of TDatabasePDG to return masses defined in the PhysicsConstants.h header
Expand Down Expand Up @@ -125,6 +130,12 @@ inline double getPdgMass(int pdgCode)
case o2::constants::physics::Pdg::kK0Star892:
mass = o2::constants::physics::MassK0Star892;
break;
case o2::constants::physics::Pdg::kKPlusStar892:
mass = o2::constants::physics::MassKPlusStar892;
break;
case o2::constants::physics::Pdg::kOmega:
mass = o2::constants::physics::MassOmega;
break;
case o2::constants::physics::Pdg::kLambdaCPlus:
mass = o2::constants::physics::MassLambdaCPlus;
break;
Expand All @@ -146,9 +157,15 @@ inline double getPdgMass(int pdgCode)
case kSigmaPlus:
mass = o2::constants::physics::MassSigmaPlus;
break;
case kSigma0:
mass = o2::constants::physics::MassSigma0;
break;
case kXiMinus:
mass = o2::constants::physics::MassXiMinus;
break;
case o2::constants::physics::Pdg::kXi0:
mass = o2::constants::physics::MassXi0;
break;
case kOmegaMinus:
mass = o2::constants::physics::MassOmegaMinus;
break;
Expand All @@ -158,12 +175,25 @@ inline double getPdgMass(int pdgCode)
case o2::constants::physics::kEta:
mass = o2::constants::physics::MassEta;
break;
case kNeutron:
mass = o2::constants::physics::MassNeutron;
break;
case kK0:
mass = o2::constants::physics::MassK0;
break;
case kLambda1520:
mass = o2::constants::physics::MassLambda1520;
break;
case DeltaMinus1232:
case Delta01232:
case DeltaPlus1232:
case DeltaPlusPlus1232:
mass = 1.232; // not defined in O2?
break;
case Xi01530:
case XiMinus1530:
mass = 1.532; // not defined in O2?
break;
default:
LOG(warn) << "PDG code " << pdgCode << " is not suppored. Return 0... ";
}
Expand Down
25 changes: 17 additions & 8 deletions PWGCF/Femto/Core/particleCleaner.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ struct ConfParticleCleaner : o2::framework::ConfigurableGroup {
// allowed by those two lists, this same pt/eta/phi range is what its kinematics are checked
// against -- the window does not vary per pdg code. Defaults are wide open (no-op) like every
// other kinematic window in this codebase, so setting these has no effect unless narrowed.
// activateMotherKinematics gates the whole check (default off), so it has zero cost -- no
// mass lookup, no rapidity computation -- unless explicitly turned on.
o2::framework::Configurable<bool> activateMotherKinematics{"activateMotherKinematics", false, "Activate the pt/eta/phi/rapidity kinematic cut on the mother"};
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"};
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"};
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"};
Expand Down Expand Up @@ -133,6 +136,7 @@ class ParticleCleaner
mRequiredMotherPdgCodes = confMpc.requiredMotherPdgCodes.value;
mRejectedMotherPdgCodes = confMpc.rejectMotherPdgCodes.value;

mActivateMotherKinematics = confMpc.activateMotherKinematics.value;
mMotherPtMin = confMpc.motherPtMin.value;
mMotherPtMax = confMpc.motherPtMax.value;
mMotherEtaMin = confMpc.motherEtaMin.value;
Expand Down Expand Up @@ -237,14 +241,18 @@ class ParticleCleaner
}
}

// One shared pt/eta/phi window, applied to the mother regardless of which (if any)
// requiredMotherPdgCodes/rejectMotherPdgCodes entry it matched above
double motherRapidity = mother.y(utils::getPdgMass(mother.pdgCode()));
if (!(mother.pt() > mMotherPtMin && mother.pt() < mMotherPtMax &&
mother.eta() > mMotherEtaMin && mother.eta() < mMotherEtaMax &&
motherRapidity > mMotherRapidityMin && motherRapidity < mMotherRapidityMax &&
mother.phi() > mMotherPhiMin && mother.phi() < mMotherPhiMax)) {
motherKinematicsOk = false;
// One shared pt/eta/phi/rapidity window, applied to the mother regardless of which (if
// any) requiredMotherPdgCodes/rejectMotherPdgCodes entry it matched above. Gated behind
// activateMotherKinematics so it costs nothing (no mass lookup, no rapidity computation)
// unless explicitly turned on.
if (mActivateMotherKinematics) {
double motherRapidity = mother.y(utils::getPdgMass(mother.pdgCode()));
if (!(mother.pt() > mMotherPtMin && mother.pt() < mMotherPtMax &&
mother.eta() > mMotherEtaMin && mother.eta() < mMotherEtaMax &&
motherRapidity > mMotherRapidityMin && motherRapidity < mMotherRapidityMax &&
mother.phi() > mMotherPhiMin && mother.phi() < mMotherPhiMax)) {
motherKinematicsOk = false;
}
}
}

Expand Down Expand Up @@ -292,6 +300,7 @@ class ParticleCleaner
std::vector<int> mRejectedPdgCodes;
std::vector<int> mRequiredMotherPdgCodes;
std::vector<int> mRejectedMotherPdgCodes;
bool mActivateMotherKinematics = false;
float mMotherPtMin = 0.f;
float mMotherPtMax = 1e6f;
float mMotherEtaMin = -1e6f;
Expand Down
Loading