Skip to content

Commit 41103b3

Browse files
authored
[PWGCF] Add 2-prong MC functions, reduce code duplication (#11967)
1 parent 048e50c commit 41103b3

File tree

2 files changed

+205
-199
lines changed

2 files changed

+205
-199
lines changed

PWGCF/DataModel/CorrelationsDerived.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,10 @@ using CF2ProngTrackml = CF2ProngTrackmls::iterator;
153153

154154
namespace cf2prongmcpart
155155
{
156-
DECLARE_SOA_INDEX_COLUMN_FULL(CFParticleDaugh0, cfParticleDaugh0, int, CFMcParticles, "_0"); //! Index to prong 1 CFMcParticle
157-
DECLARE_SOA_INDEX_COLUMN_FULL(CFParticleDaugh1, cfParticleDaugh1, int, CFMcParticles, "_1"); //! Index to prong 2 CFMcParticle
158-
DECLARE_SOA_COLUMN(Decay, decay, uint8_t); //! Particle decay and flags
156+
DECLARE_SOA_INDEX_COLUMN_FULL(CFParticleDaugh0, cfParticleDaugh0, int, CFMcParticles, "_0"); //! Index to prong 1 CFMcParticle
157+
DECLARE_SOA_INDEX_COLUMN_FULL(CFParticleDaugh1, cfParticleDaugh1, int, CFMcParticles, "_1"); //! Index to prong 2 CFMcParticle
158+
DECLARE_SOA_COLUMN(Decay, decay, uint8_t); //! Particle decay and flags
159+
DECLARE_SOA_DYNAMIC_COLUMN(McDecay, mcDecay, [](uint8_t decay) -> uint8_t { return decay & 0x7f; }); //! MC particle decay
159160
enum ParticleDecayFlags {
160161
Prompt = 0x80
161162
};
@@ -164,7 +165,8 @@ DECLARE_SOA_TABLE(CF2ProngMcParts, "AOD", "CF2PRONGMCPART", //! Table for the da
164165
o2::soa::Index<>,
165166
cf2prongmcpart::CFParticleDaugh0Id,
166167
cf2prongmcpart::CFParticleDaugh1Id,
167-
cf2prongmcpart::Decay)
168+
cf2prongmcpart::Decay,
169+
cf2prongmcpart::McDecay<cf2prongmcpart::Decay>)
168170
using CF2ProngMcPart = CF2ProngMcParts::iterator;
169171

170172
} // namespace o2::aod

0 commit comments

Comments
 (0)