Skip to content

Commit 81492cf

Browse files
authored
[PWGLF] add evsel at gen level (#13223)
1 parent 36f10e0 commit 81492cf

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

PWGLF/Tasks/Strangeness/cascadecorrelations.cxx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,9 +502,14 @@ struct CascadeSelector {
502502

503503
} // processCandidate
504504

505-
void processGenMC(aod::McCollision const&, soa::SmallGroups<soa::Join<aod::McCollisionLabels, MyCollisions>> const& collisions, aod::McParticles const& mcParticles)
505+
void processGenMC(aod::McCollision const& mcCollision, soa::SmallGroups<soa::Join<aod::McCollisionLabels, MyCollisions>> const& collisions, aod::McParticles const& mcParticles)
506506
{
507-
// N gen events without any event selection or matched reco event
507+
// evsel
508+
if (INEL < 0 || pwglf::isINELgtNmc(mcParticles, INEL, pdgDB))
509+
return;
510+
if (std::abs(mcCollision.posZ()) > maxVertexZ)
511+
return;
512+
508513
registry.fill(HIST("gen/hNevents"), 0);
509514

510515
for (auto const& mcPart : mcParticles) {

0 commit comments

Comments
 (0)