From e12312293e91795caef155236f8ee073aec8cf90 Mon Sep 17 00:00:00 2001 From: smonira Date: Mon, 30 Nov 2026 20:29:53 +0100 Subject: [PATCH] To enable non-primary cascade particles in MC truth PID selection --- .../TableProducer/femtoUniverseProducerTask.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.cxx b/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.cxx index c400fbf4f32..187217f627a 100644 --- a/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.cxx +++ b/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.cxx @@ -194,6 +194,8 @@ struct FemtoUniverseProducerTask { Configurable confTPCOccupancyMax{"confTPCOccupancyMax", 5000, "Maximum value for TPC Occupancy selection"}; Configurable confIsCent{"confIsCent", true, "Centrality or multiplicity selection"}; Configurable confIsCheckRCTFlags{"confIsCheckRCTFlags", true, "Use RCTFlags"}; + Configurable confActivateXiTruth{"confActivateXiTruth", false, "Include non-primary Xi/anti-Xi in MC truth PID selection"}; + Configurable confActivateOmegaTruth{"confActivateOmegaTruth", false, "Include non-primary Omega/anti-Omega in MC truth PID selection"}; } ConfGeneral; Filter customCollCentFilter = (aod::cent::centFT0C > ConfGeneral.confCentFT0Min) && (aod::cent::centFT0C < ConfGeneral.confCentFT0Max); @@ -2399,13 +2401,16 @@ struct FemtoUniverseProducerTask { } auto pdgCode = static_cast(particle.pdgCode()); + int signedPdg = static_cast(pdgCode); + bool isXi = (signedPdg == kXiMinus || signedPdg == kXiPlusBar); + bool isOmega = (signedPdg == kOmegaMinus || signedPdg == kOmegaPlusBar); if (ConfGeneral.confMCTruthAnalysisWithPID) { bool pass = false; std::vector tmpPDGCodes = ConfGeneral.confMCTruthPDGCodes; // necessary due to some features of the Configurable for (auto const& pdg : tmpPDGCodes) { if (static_cast(pdg) == static_cast(pdgCode)) { - if (pdgCode == Pdg::kPhi || pdgCode == Pdg::kD0) { // && (recoMcIds && recoMcIds->get().contains(particle.globalIndex()))) { // ATTENTION: all Phi mesons are NOT primary particles + if (pdgCode == Pdg::kPhi || pdgCode == Pdg::kD0 || (ConfGeneral.confActivateXiTruth && isXi) || (ConfGeneral.confActivateOmegaTruth && isOmega)) { // && (recoMcIds && recoMcIds->get().contains(particle.globalIndex()))) { // ATTENTION: all Phi mesons are NOT primary particles pass = true; } else { if (confStoreMCmothers || particle.isPhysicalPrimary() || (ConfGeneral.confActivateSecondaries && recoMcIds && recoMcIds->get().contains(particle.globalIndex()))) {