From a9c80e0e74eb25dbabdc2a7ff28b841b8983e48f Mon Sep 17 00:00:00 2001 From: jokonig Date: Tue, 20 Oct 2026 13:17:54 +0200 Subject: [PATCH] [PWGEM] Add option to save Dalitz and two-gamma events --- .../PhotonMeson/TableProducer/skimmerDalitzEvents.cxx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/PWGEM/PhotonMeson/TableProducer/skimmerDalitzEvents.cxx b/PWGEM/PhotonMeson/TableProducer/skimmerDalitzEvents.cxx index e038b916848..4d5bcf13a00 100644 --- a/PWGEM/PhotonMeson/TableProducer/skimmerDalitzEvents.cxx +++ b/PWGEM/PhotonMeson/TableProducer/skimmerDalitzEvents.cxx @@ -59,6 +59,7 @@ struct skimmerDalitzEvents { Configurable minNElecCand{"minNElecCand", 2, "minimum number of electrons/positron candidates in one event"}; Configurable minNGammaCand{"minNGammaCand", 1, "minimum number of V0 photon candidates in one event"}; + Configurable accPCMGGAndDalitz{"accPCMGGAndDalitz", false, "set to true if you want to create DD for both PCM-PCM and PCM-Dalitz"}; // ---------- for data ---------- template @@ -71,7 +72,7 @@ struct skimmerDalitzEvents { auto tracks = emPrimaryElecTmp.sliceBy(perCollisionEl, collision.globalIndex()); // check that there are at least minNElecCand in the collision - if (tracks.size() < minNElecCand) { + if (!accPCMGGAndDalitz && tracks.size() < minNElecCand) { continue; } @@ -79,10 +80,16 @@ struct skimmerDalitzEvents { auto photonskf = v0photonskfTmp.sliceBy(perCol_pcm, collision.globalIndex()); // check that there are at least minNGammaCand in the collision - if (photonskf.size() < minNGammaCand) { + if (!accPCMGGAndDalitz && photonskf.size() < minNGammaCand) { continue; } + if (accPCMGGAndDalitz) { + if (!(photonskf.size() >= 2 || (tracks.size() >= 2 && photonskf.size() >= 1))) { // o2-linter: disable=magic-number (settings to obtain either two photons in the event or one photon with one dielectron) + continue; + } + } + // Write electron tracks for (const auto& track : tracks) { emprimaryelectrons(track.collisionId(), track.trackId(), track.sign(),