Skip to content

Commit e1c88d5

Browse files
[PWGLF] Add option to select only physical primary MC V0s (if not associated to a recoed one) (#11320)
1 parent 0f769ed commit e1c88d5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

PWGLF/TableProducer/Strangeness/strangenessbuilder.cxx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ struct StrangenessBuilder {
308308
Configurable<bool> mc_populateV0MCCoresAsymmetric{"mc_populateV0MCCoresAsymmetric", true, "populate V0MCCores table for derived data analysis, create V0Cores -> V0MCCores interlink. Saves only labeled V0s."};
309309
Configurable<bool> mc_treatPiToMuDecays{"mc_treatPiToMuDecays", true, "if true, will correctly capture pi -> mu and V0 label will still point to originating V0 decay in those cases. Nota bene: prong info will still be for the muon!"};
310310
Configurable<float> mc_rapidityWindow{"mc_rapidityWindow", 0.5, "rapidity window to save non-recoed candidates"};
311+
Configurable<bool> mc_keepOnlyPhysicalPrimary{"mc_keepOnlyPhysicalPrimary", false, "Keep only physical primary generated V0s if not recoed"};
311312
Configurable<bool> mc_addGeneratedK0Short{"mc_addGeneratedK0Short", true, "add V0MCCore entry for generated, not-recoed K0Short"};
312313
Configurable<bool> mc_addGeneratedLambda{"mc_addGeneratedLambda", true, "add V0MCCore entry for generated, not-recoed Lambda"};
313314
Configurable<bool> mc_addGeneratedAntiLambda{"mc_addGeneratedAntiLambda", true, "add V0MCCore entry for generated, not-recoed AntiLambda"};
@@ -347,6 +348,7 @@ struct StrangenessBuilder {
347348
Configurable<bool> mc_addGeneratedOmegaPlus{"mc_addGeneratedOmegaPlus", true, "add CascMCCore entry for generated, not-recoed OmegaPlus"};
348349
Configurable<bool> mc_treatPiToMuDecays{"mc_treatPiToMuDecays", true, "if true, will correctly capture pi -> mu and V0 label will still point to originating V0 decay in those cases. Nota bene: prong info will still be for the muon!"};
349350
Configurable<float> mc_rapidityWindow{"mc_rapidityWindow", 0.5, "rapidity window to save non-recoed candidates"};
351+
Configurable<bool> mc_keepOnlyPhysicalPrimary{"mc_keepOnlyPhysicalPrimary", false, "Keep only physical primary generated cascades if not recoed"};
350352
Configurable<bool> mc_findableDetachedCascade{"mc_findableDetachedCascade", false, "if true, generate findable cascades that have collisionId -1. Caution advised."};
351353
} cascadeBuilderOpts;
352354

@@ -1612,6 +1614,9 @@ struct StrangenessBuilder {
16121614
if (std::fabs(mcParticle.y()) > v0BuilderOpts.mc_rapidityWindow)
16131615
continue; // skip outside midrapidity
16141616

1617+
if (v0BuilderOpts.mc_keepOnlyPhysicalPrimary && !mcParticle.isPhysicalPrimary())
1618+
continue; // skip secondary MC V0s
1619+
16151620
if (
16161621
(v0BuilderOpts.mc_addGeneratedK0Short && mcParticle.pdgCode() == 310) ||
16171622
(v0BuilderOpts.mc_addGeneratedLambda && mcParticle.pdgCode() == 3122) ||
@@ -2079,6 +2084,9 @@ struct StrangenessBuilder {
20792084
if (std::fabs(mcParticle.y()) > cascadeBuilderOpts.mc_rapidityWindow)
20802085
continue; // skip outside midrapidity
20812086

2087+
if (cascadeBuilderOpts.mc_keepOnlyPhysicalPrimary && !mcParticle.isPhysicalPrimary())
2088+
continue; // skip secondary MC cascades
2089+
20822090
if (
20832091
(cascadeBuilderOpts.mc_addGeneratedXiMinus && mcParticle.pdgCode() == 3312) ||
20842092
(cascadeBuilderOpts.mc_addGeneratedXiPlus && mcParticle.pdgCode() == -3312) ||

0 commit comments

Comments
 (0)