From f0032e5a7153ad6cdb03e92e0bfa8a122ceac9b1 Mon Sep 17 00:00:00 2001 From: rspijkers Date: Fri, 3 Oct 2025 15:20:36 +0200 Subject: [PATCH] add evsel at gen level --- PWGLF/Tasks/Strangeness/cascadecorrelations.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/PWGLF/Tasks/Strangeness/cascadecorrelations.cxx b/PWGLF/Tasks/Strangeness/cascadecorrelations.cxx index 05d7c23b63d..56354e1502f 100644 --- a/PWGLF/Tasks/Strangeness/cascadecorrelations.cxx +++ b/PWGLF/Tasks/Strangeness/cascadecorrelations.cxx @@ -502,9 +502,14 @@ struct CascadeSelector { } // processCandidate - void processGenMC(aod::McCollision const&, soa::SmallGroups> const& collisions, aod::McParticles const& mcParticles) + void processGenMC(aod::McCollision const& mcCollision, soa::SmallGroups> const& collisions, aod::McParticles const& mcParticles) { - // N gen events without any event selection or matched reco event + // evsel + if (INEL < 0 || pwglf::isINELgtNmc(mcParticles, INEL, pdgDB)) + return; + if (std::abs(mcCollision.posZ()) > maxVertexZ) + return; + registry.fill(HIST("gen/hNevents"), 0); for (auto const& mcPart : mcParticles) {