From 4cf4e1c5f340c2565c3a392e9d02a5b57d03e321 Mon Sep 17 00:00:00 2001 From: Chiara De Martin Date: Mon, 14 Oct 2024 17:54:34 +0200 Subject: [PATCH] add boolean to store only true cascades in MC analysis --- PWGLF/TableProducer/Strangeness/cascadeflow.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/PWGLF/TableProducer/Strangeness/cascadeflow.cxx b/PWGLF/TableProducer/Strangeness/cascadeflow.cxx index b88de88b006..c345ef10c57 100644 --- a/PWGLF/TableProducer/Strangeness/cascadeflow.cxx +++ b/PWGLF/TableProducer/Strangeness/cascadeflow.cxx @@ -128,6 +128,7 @@ struct cascadeFlow { ConfigurableAxis axisQVsNorm{"axisQVsNorm", {200, -1.f, 1.f}, "axisQVsNorm"}; // Event selection criteria + Configurable isStoreTrueCascOnly{"isStoreTrueCascOnly", 1, ""}; Configurable cutzvertex{"cutzvertex", 10.0f, "Accepted z-vertex range (cm)"}; Configurable sel8{"sel8", 1, "Apply sel8 event selection"}; Configurable isNoSameBunchPileupCut{"isNoSameBunchPileupCut", 1, "Same found-by-T0 bunch crossing rejection"}; @@ -790,7 +791,7 @@ struct cascadeFlow { { pdgCode = 0; } - + /// Add some minimal cuts for single track variables (min number of TPC clusters) auto negExtra = casc.negTrackExtra_as(); auto posExtra = casc.posTrackExtra_as(); @@ -859,6 +860,9 @@ struct cascadeFlow { BDTresponse[0] = bdtScore[0][1]; BDTresponse[1] = bdtScore[1][1]; } + if (isStoreTrueCascOnly){ + if (pdgCode==0) continue; + } if (isSelectedCasc[0] || isSelectedCasc[1]) fillAnalysedTable(coll, casc, v2CSP, v2CEP, PsiT0C, BDTresponse[0], BDTresponse[1], pdgCode); }