Skip to content

Commit 6afe062

Browse files
committed
Non-prompt flag for the filter2prong
1 parent 43c495c commit 6afe062

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

PWGCF/DataModel/CorrelationsDerived.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,10 @@ namespace cf2prongmcpart
186186
DECLARE_SOA_INDEX_COLUMN_FULL(CFParticleDaugh0, cfParticleDaugh0, int, CFMcParticles, "_0"); //! Index to prong 1 CFMcParticle
187187
DECLARE_SOA_INDEX_COLUMN_FULL(CFParticleDaugh1, cfParticleDaugh1, int, CFMcParticles, "_1"); //! Index to prong 2 CFMcParticle
188188
DECLARE_SOA_COLUMN(Decay, decay, uint8_t); //! Particle decay and flags
189-
DECLARE_SOA_DYNAMIC_COLUMN(McDecay, mcDecay, [](uint8_t decay) -> uint8_t { return decay & 0x7f; }); //! MC particle decay
189+
DECLARE_SOA_DYNAMIC_COLUMN(McDecay, mcDecay, [](uint8_t decay) -> uint8_t { return decay & 0x3f; }); //! MC particle decay
190190
enum ParticleDecayFlags {
191-
Prompt = 0x80
191+
Prompt = 0x40,
192+
NonPrompt = 0x80
192193
};
193194
} // namespace cf2prongmcpart
194195
DECLARE_SOA_TABLE(CF2ProngMcParts, "AOD", "CF2PRONGMCPART", //! Table for the daughter particles of a 2-prong particle, to be joined with CFMcParticles

PWGCF/TableProducer/filter2Prong.cxx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,11 @@ struct Filter2Prong {
288288
}
289289
}
290290
}
291+
uint8_t pcode =
292+
(mcParticle.originMcGen() == RecoDecay::OriginType::Prompt) ? aod::cf2prongmcpart::Prompt :
293+
((mcParticle.originMcGen() == RecoDecay::OriginType::NonPrompt) ? aod::cf2prongmcpart::NonPrompt) : 0;
291294
output2ProngMcParts(prongCFId[0], prongCFId[1],
292-
(mcParticle.pdgCode() >= 0 ? aod::cf2prongtrack::D0ToPiK : aod::cf2prongtrack::D0barToKPiExclusive) | ((mcParticle.originMcGen() == RecoDecay::OriginType::Prompt) ? aod::cf2prongmcpart::Prompt : 0));
295+
(mcParticle.pdgCode() >= 0 ? aod::cf2prongtrack::D0ToPiK : aod::cf2prongtrack::D0barToKPiExclusive) | pcode);
293296
}
294297
}
295298
PROCESS_SWITCH(Filter2Prong, processMC, "Process MC 2-prong daughters", false);

0 commit comments

Comments
 (0)