diff --git a/PWGLF/Tasks/QC/mcParticlePrediction.cxx b/PWGLF/Tasks/QC/mcParticlePrediction.cxx index 2f506ba14e5..57fc6d88ab3 100644 --- a/PWGLF/Tasks/QC/mcParticlePrediction.cxx +++ b/PWGLF/Tasks/QC/mcParticlePrediction.cxx @@ -57,7 +57,7 @@ using namespace o2::pwglf; // Particles static const std::vector parameterNames{"Enable"}; static constexpr int nParameters = 1; -static const int defaultParticles[PIDExtended::NIDsTot][nParameters]{{0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {1}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}}; +static const int defaultParticles[PIDExtended::NIDsTot][nParameters]{{0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {1}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}}; bool enabledParticlesArray[PIDExtended::NIDsTot]; // Estimators @@ -180,7 +180,6 @@ struct mcParticlePrediction { "Estimators enabled"}; Configurable selectInelGt0{"selectInelGt0", true, "Select only inelastic events"}; Configurable selectPrimaries{"selectPrimaries", true, "Select only primary particles"}; - Configurable rapidityCut{"rapidityCut", 0.5, "Select only particles within |y| < cut"}; Configurable requireCoincidenceEstimators{"requireCoincidenceEstimators", false, "Asks for a coincidence when two estimators are used"}; Configurable discardkIsGoodZvtxFT0vsPV{"discardkIsGoodZvtxFT0vsPV", false, "Select only collisions with matching BC and MC BC"}; Configurable discardMismatchedBCs{"discardMismatchedBCs", false, "Select only collisions with matching BC and MC BC"}; @@ -494,9 +493,9 @@ struct mcParticlePrediction { continue; } - // if (!particle.isPhysicalPrimary()) { - // continue; - // } + if (!particle.isPhysicalPrimary()) { + continue; + } TParticlePDG* p = pdgDB->GetParticle(particle.pdgCode()); if (p) { @@ -507,28 +506,7 @@ struct mcParticlePrediction { } } - if (std::abs(particle.y()) >= rapidityCut) { - continue; - } - - // Check if particle has daughters (not a final state particle) - auto daughters = particle.daughters_as(); - bool isValid = false; - - if (daughters.size() > 0) { - isValid = true; - for (const auto& daughter : daughters) { - if (!daughter.isPhysicalPrimary()) { - isValid = false; - break; - } - } - } else { - // Final state particle - check if particle itself is physical primary - isValid = particle.isPhysicalPrimary(); - } - - if (!isValid) { + if (std::abs(particle.y()) > 0.5) { continue; } @@ -694,10 +672,10 @@ struct mcParticlePrediction { float nMultRecoMCBC[Estimators::nEstimators] = {0}; if (mcBC.has_ft0()) { const auto& ft0 = mcBC.ft0(); - for (const auto& amplitude : ft0.amplitudeA()) { + for (auto amplitude : ft0.amplitudeA()) { nMultRecoMCBC[Estimators::FT0A] += amplitude; } - for (const auto& amplitude : ft0.amplitudeC()) { + for (auto amplitude : ft0.amplitudeC()) { nMultRecoMCBC[Estimators::FT0C] += amplitude; } nMultRecoMCBC[Estimators::FT0AC] = nMultRecoMCBC[Estimators::FT0A] + nMultRecoMCBC[Estimators::FT0C]; diff --git a/PWGLF/Utils/mcParticle.h b/PWGLF/Utils/mcParticle.h index 657e696ec9a..745fcd94fbf 100644 --- a/PWGLF/Utils/mcParticle.h +++ b/PWGLF/Utils/mcParticle.h @@ -134,7 +134,8 @@ class PIDExtended static constexpr ID KstarPM = PIDCounts + 40; static constexpr ID Kshort = PIDCounts + 41; static constexpr ID Xi1530 = PIDCounts + 42; - static constexpr ID NIDsTot = PIDCounts + 43; + static constexpr ID Lambda1520 = PIDCounts + 43; + static constexpr ID NIDsTot = PIDCounts + 44; static constexpr const char* sNames[NIDsTot + 1] = { o2::track::pid_constants::sNames[Electron], // Electron @@ -199,6 +200,7 @@ class PIDExtended "KstarPM", // KstarPM "Kshort", // Kshort "Xi1530", // Xi1530 + "Lambda1520", // Lambda1520 nullptr}; static std::vector arrayNames() @@ -341,6 +343,8 @@ class PIDExtended return Kshort; case 3324: return Xi1530; + case 3124: + return Lambda1520; default: LOG(debug) << "Cannot identify particle with PDG code " << particle.pdgCode(); break;