Skip to content

Commit 4d107d9

Browse files
committed
Add 2-prong MC functions, reduce code duplication
1 parent 8ac448f commit 4d107d9

File tree

2 files changed

+200
-199
lines changed

2 files changed

+200
-199
lines changed

PWGCF/DataModel/CorrelationsDerived.h

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

150150
namespace cf2prongmcpart
151151
{
152-
DECLARE_SOA_INDEX_COLUMN_FULL(CFParticleDaugh0, cfParticleDaugh0, int, CFMcParticles, "_0"); //! Index to prong 1 CFMcParticle
153-
DECLARE_SOA_INDEX_COLUMN_FULL(CFParticleDaugh1, cfParticleDaugh1, int, CFMcParticles, "_1"); //! Index to prong 2 CFMcParticle
154-
DECLARE_SOA_COLUMN(Decay, decay, uint8_t); //! Particle decay and flags
152+
DECLARE_SOA_INDEX_COLUMN_FULL(CFParticleDaugh0, cfParticleDaugh0, int, CFMcParticles, "_0"); //! Index to prong 1 CFMcParticle
153+
DECLARE_SOA_INDEX_COLUMN_FULL(CFParticleDaugh1, cfParticleDaugh1, int, CFMcParticles, "_1"); //! Index to prong 2 CFMcParticle
154+
DECLARE_SOA_COLUMN(Decay, decay, uint8_t); //! Particle decay and flags
155+
DECLARE_SOA_DYNAMIC_COLUMN(McDecay, mcDecay, [](uint8_t decay) -> uint8_t { return decay & 0x7f; }); //! MC particle decay
155156
enum ParticleDecayFlags {
156157
Prompt = 0x80
157158
};
@@ -160,7 +161,8 @@ DECLARE_SOA_TABLE(CF2ProngMcParts, "AOD", "CF2PRONGMCPART", //! Table for the da
160161
o2::soa::Index<>,
161162
cf2prongmcpart::CFParticleDaugh0Id,
162163
cf2prongmcpart::CFParticleDaugh1Id,
163-
cf2prongmcpart::Decay)
164+
cf2prongmcpart::Decay,
165+
cf2prongmcpart::McDecay<cf2prongmcpart::Decay>)
164166
using CF2ProngMcPart = CF2ProngMcParts::iterator;
165167

166168
} // namespace o2::aod

0 commit comments

Comments
 (0)