Skip to content

Commit 5863b59

Browse files
EmilGormalibuild
andauthored
[PWGCF] Add efficiency-corrected multiplicity information to CF derived data (#17783)
Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
1 parent 706aa10 commit 5863b59

4 files changed

Lines changed: 563 additions & 316 deletions

File tree

PWGCF/DataModel/CorrelationsDerived.h

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ using CFMcCollisionWithExtra = CFMcCollisionsWithExtra::iterator;
4040

4141
namespace cfmcparticle
4242
{
43-
DECLARE_SOA_INDEX_COLUMN(CFMcCollision, cfMcCollision); //! Index to reduced MC collision
43+
DECLARE_SOA_INDEX_COLUMN(CFMcCollision, cfMcCollision); //! Index to reduced MC collision; o2-linter: disable=name/o2-column (preserve the established derived-table API)
4444
DECLARE_SOA_COLUMN(Pt, pt, float); //! pT (GeV/c)
4545
DECLARE_SOA_COLUMN(Eta, eta, float); //! Pseudorapidity
4646
DECLARE_SOA_COLUMN(Phi, phi, float); //! Phi angle
@@ -58,31 +58,42 @@ using CFMcParticle = CFMcParticles::iterator;
5858
namespace cfmultiplicity
5959
{
6060
DECLARE_SOA_COLUMN(Multiplicity, multiplicity, float);
61-
}
61+
} // namespace cfmultiplicity
6262
DECLARE_SOA_TABLE(CFMultiplicities, "AOD", "CFMULTIPLICITY", cfmultiplicity::Multiplicity);
6363

6464
using CFMultiplicity = CFMultiplicities::iterator;
6565

6666
namespace cfcollision
6767
{
68-
DECLARE_SOA_INDEX_COLUMN(CFMcCollision, cfMcCollision); //! Index to reduced MC collision
69-
DECLARE_SOA_COLUMN(Multiplicity, multiplicity, float); //! Centrality/multiplicity value
68+
DECLARE_SOA_INDEX_COLUMN(CFMcCollision, cfMcCollision); //! Index to reduced MC collision; o2-linter: disable=name/o2-column (preserve the established derived-table API)
69+
DECLARE_SOA_COLUMN(Multiplicity, multiplicity, float); //! Centrality/multiplicity value
70+
DECLARE_SOA_COLUMN(BestRecoCollision, bestRecoCollision, bool); //! Whether this is the best reconstructed collision for the associated MC collision (largest number of contributors)
7071
} // namespace cfcollision
7172
DECLARE_SOA_TABLE(CFCollisions, "AOD", "CFCOLLISION", //! Reduced collision table
7273
o2::soa::Index<>,
7374
bc::RunNumber, collision::PosZ,
7475
cfcollision::Multiplicity, timestamp::Timestamp);
7576
DECLARE_SOA_TABLE(CFCollLabels, "AOD", "CFCOLLLABEL", //! Labels for reduced collision table
76-
cfcollision::CFMcCollisionId);
77+
cfcollision::CFMcCollisionId, cfcollision::BestRecoCollision);
7778
using CFCollision = CFCollisions::iterator;
7879
using CFCollLabel = CFCollLabels::iterator;
7980
using CFCollisionsWithLabel = soa::Join<CFCollisions, CFCollLabels>;
8081
using CFCollisionWithLabel = CFCollisionsWithLabel::iterator;
8182

83+
namespace cfcollisionextra
84+
{
85+
DECLARE_SOA_COLUMN(MultiplicityCorrected, multiplicityCorrected, float); //! Efficiency-corrected track count
86+
} // namespace cfcollisionextra
87+
DECLARE_SOA_TABLE(CFCollisionsExtra, "AOD", "CFCOLLSEXTRA", //! Row-aligned extension of CFCollisions; filled only when multiplicity efficiency is configured
88+
cfcollisionextra::MultiplicityCorrected);
89+
using CFCollisionExtra = CFCollisionsExtra::iterator;
90+
using CFCollisionsWithExtra = soa::Join<CFCollisions, CFCollisionsExtra>;
91+
using CFCollisionWithExtra = CFCollisionsWithExtra::iterator;
92+
8293
namespace cftrack
8394
{
84-
DECLARE_SOA_INDEX_COLUMN(CFCollision, cfCollision); //! Index to collision
85-
DECLARE_SOA_INDEX_COLUMN(CFMcParticle, cfMCParticle); //! Index to MC particle
95+
DECLARE_SOA_INDEX_COLUMN(CFCollision, cfCollision); //! Index to collision; o2-linter: disable=name/o2-column (preserve the established derived-table API)
96+
DECLARE_SOA_INDEX_COLUMN(CFMcParticle, cfMCParticle); //! Index to MC particle; o2-linter: disable=name/o2-column (preserve the established derived-table API)
8697
DECLARE_SOA_COLUMN(Pt, pt, float); //! pT (GeV/c)
8798
DECLARE_SOA_COLUMN(Eta, eta, float); //! Pseudorapidity
8899
DECLARE_SOA_COLUMN(Phi, phi, float); //! Phi angle
@@ -114,7 +125,6 @@ enum MultiplicityEstimators : uint8_t {
114125
MultNTracksGlobal = 0x8,
115126
CentFT0M = 0x10,
116127
};
117-
118128
inline constexpr uint32_t NMultiplicityEstimators = __builtin_ctz(CentFT0M) + 1;
119129

120130
} // namespace cfmultset
@@ -147,8 +157,8 @@ using CFMcParticleRef = CFMcParticleRefs::iterator;
147157

148158
namespace cf2prongtrack
149159
{
150-
DECLARE_SOA_INDEX_COLUMN_FULL(CFTrackProng0, cfTrackProng0, int, CFTracks, "_0"); //! Index to prong 1 CFTrack
151-
DECLARE_SOA_INDEX_COLUMN_FULL(CFTrackProng1, cfTrackProng1, int, CFTracks, "_1"); //! Index to prong 2 CFTrack
160+
DECLARE_SOA_INDEX_COLUMN_FULL(CFTrackProng0, cfTrackProng0, int, CFTracks, "_0"); //! Index to prong 1 CFTrack; o2-linter: disable=name/o2-column (preserve the established derived-table API)
161+
DECLARE_SOA_INDEX_COLUMN_FULL(CFTrackProng1, cfTrackProng1, int, CFTracks, "_1"); //! Index to prong 2 CFTrack; o2-linter: disable=name/o2-column (preserve the established derived-table API)
152162
DECLARE_SOA_COLUMN(Pt, pt, float); //! pT (GeV/c)
153163
DECLARE_SOA_COLUMN(Eta, eta, float); //! Pseudorapidity
154164
DECLARE_SOA_COLUMN(Phi, phi, float); //! Phi angle
@@ -201,8 +211,8 @@ using CF2ProngTrackml = CF2ProngTrackmls::iterator;
201211

202212
namespace cf2prongmcpart
203213
{
204-
DECLARE_SOA_INDEX_COLUMN_FULL(CFParticleDaugh0, cfParticleDaugh0, int, CFMcParticles, "_0"); //! Index to prong 1 CFMcParticle
205-
DECLARE_SOA_INDEX_COLUMN_FULL(CFParticleDaugh1, cfParticleDaugh1, int, CFMcParticles, "_1"); //! Index to prong 2 CFMcParticle
214+
DECLARE_SOA_INDEX_COLUMN_FULL(CFParticleDaugh0, cfParticleDaugh0, int, CFMcParticles, "_0"); //! Index to prong 1 CFMcParticle; o2-linter: disable=name/o2-column (preserve the established derived-table API)
215+
DECLARE_SOA_INDEX_COLUMN_FULL(CFParticleDaugh1, cfParticleDaugh1, int, CFMcParticles, "_1"); //! Index to prong 2 CFMcParticle; o2-linter: disable=name/o2-column (preserve the established derived-table API)
206216
DECLARE_SOA_COLUMN(Decay, decay, uint8_t); //! Particle decay and flags
207217
DECLARE_SOA_DYNAMIC_COLUMN(McDecay, mcDecay, [](uint8_t decay) -> uint8_t { return decay & 0x3f; }); //! MC particle decay
208218
enum ParticleDecayFlags {

0 commit comments

Comments
 (0)