Skip to content

Commit 73d3c4d

Browse files
jokonigjokonig
andauthored
[PWGEM] Add option to save Dalitz and two-gamma events (#18363)
Co-authored-by: jokonig <jokonig@cern.ch>
1 parent b313b31 commit 73d3c4d

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

‎PWGEM/PhotonMeson/TableProducer/skimmerDalitzEvents.cxx‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ struct skimmerDalitzEvents {
5959

6060
Configurable<unsigned int> minNElecCand{"minNElecCand", 2, "minimum number of electrons/positron candidates in one event"};
6161
Configurable<unsigned int> minNGammaCand{"minNGammaCand", 1, "minimum number of V0 photon candidates in one event"};
62+
Configurable<bool> accPCMGGAndDalitz{"accPCMGGAndDalitz", false, "set to true if you want to create DD for both PCM-PCM and PCM-Dalitz"};
6263

6364
// ---------- for data ----------
6465
template <bool isMC, o2::soa::is_table TElectrons, o2::soa::is_table TV0Photons, o2::soa::is_table TV0Legs>
@@ -71,18 +72,24 @@ struct skimmerDalitzEvents {
7172
auto tracks = emPrimaryElecTmp.sliceBy(perCollisionEl, collision.globalIndex());
7273

7374
// check that there are at least minNElecCand in the collision
74-
if (tracks.size() < minNElecCand) {
75+
if (!accPCMGGAndDalitz && tracks.size() < minNElecCand) {
7576
continue;
7677
}
7778

7879
// get photons for current collision
7980
auto photonskf = v0photonskfTmp.sliceBy(perCol_pcm, collision.globalIndex());
8081

8182
// check that there are at least minNGammaCand in the collision
82-
if (photonskf.size() < minNGammaCand) {
83+
if (!accPCMGGAndDalitz && photonskf.size() < minNGammaCand) {
8384
continue;
8485
}
8586

87+
if (accPCMGGAndDalitz) {
88+
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)
89+
continue;
90+
}
91+
}
92+
8693
// Write electron tracks
8794
for (const auto& track : tracks) {
8895
emprimaryelectrons(track.collisionId(), track.trackId(), track.sign(),

0 commit comments

Comments
 (0)