-
Notifications
You must be signed in to change notification settings - Fork 650
Expand file tree
/
Copy pathCorrelationsDerived.h
More file actions
203 lines (180 loc) · 8.55 KB
/
CorrelationsDerived.h
File metadata and controls
203 lines (180 loc) · 8.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
#ifndef PWGCF_DATAMODEL_CORRELATIONSDERIVED_H_
#define PWGCF_DATAMODEL_CORRELATIONSDERIVED_H_
#include <Framework/ASoA.h>
#include <Framework/AnalysisDataModel.h>
#include <cstdint>
#include <vector>
namespace o2::aod
{
namespace cfmccollision
{
DECLARE_SOA_COLUMN(Multiplicity, multiplicity, float); //! Centrality/multiplicity value
} // namespace cfmccollision
DECLARE_SOA_TABLE(CFMcCollisions, "AOD", "CFMCCOLLISION", //! Reduced MC collision table
o2::soa::Index<>,
mccollision::PosZ, cfmccollision::Multiplicity);
using CFMcCollision = CFMcCollisions::iterator;
namespace cfmcparticle
{
DECLARE_SOA_INDEX_COLUMN(CFMcCollision, cfMcCollision); //! Index to reduced MC collision
DECLARE_SOA_COLUMN(Pt, pt, float); //! pT (GeV/c)
DECLARE_SOA_COLUMN(Eta, eta, float); //! Pseudorapidity
DECLARE_SOA_COLUMN(Phi, phi, float); //! Phi angle
DECLARE_SOA_COLUMN(Sign, sign, int8_t); //! Sign (positive, negative)
const uint8_t kReconstructed = 0x80;
} // namespace cfmcparticle
DECLARE_SOA_TABLE(CFMcParticles, "AOD", "CFMCPARTICLE", //! Reduced MC particle table
o2::soa::Index<>,
cfmcparticle::CFMcCollisionId,
cfmcparticle::Pt, cfmcparticle::Eta, cfmcparticle::Phi, cfmcparticle::Sign,
mcparticle::PdgCode, mcparticle::Flags,
mcparticle::IsPhysicalPrimary<mcparticle::Flags>);
using CFMcParticle = CFMcParticles::iterator;
namespace cfcollision
{
DECLARE_SOA_INDEX_COLUMN(CFMcCollision, cfMcCollision); //! Index to reduced MC collision
DECLARE_SOA_COLUMN(Multiplicity, multiplicity, float); //! Centrality/multiplicity value
} // namespace cfcollision
DECLARE_SOA_TABLE(CFCollisions, "AOD", "CFCOLLISION", //! Reduced collision table
o2::soa::Index<>,
bc::RunNumber, collision::PosZ,
cfcollision::Multiplicity, timestamp::Timestamp);
DECLARE_SOA_TABLE(CFCollLabels, "AOD", "CFCOLLLABEL", //! Labels for reduced collision table
cfcollision::CFMcCollisionId);
using CFCollision = CFCollisions::iterator;
using CFCollLabel = CFCollLabels::iterator;
using CFCollisionsWithLabel = soa::Join<CFCollisions, CFCollLabels>;
using CFCollisionWithLabel = CFCollisionsWithLabel::iterator;
namespace cftrack
{
DECLARE_SOA_INDEX_COLUMN(CFCollision, cfCollision); //! Index to collision
DECLARE_SOA_INDEX_COLUMN(CFMcParticle, cfMCParticle); //! Index to MC particle
DECLARE_SOA_COLUMN(Pt, pt, float); //! pT (GeV/c)
DECLARE_SOA_COLUMN(Eta, eta, float); //! Pseudorapidity
DECLARE_SOA_COLUMN(Phi, phi, float); //! Phi angle
DECLARE_SOA_COLUMN(Sign, sign, int8_t); //! Sign (positive, negative)
} // namespace cftrack
DECLARE_SOA_TABLE(CFTracks, "AOD", "CFTRACK", //! Reduced track table
o2::soa::Index<>,
cftrack::CFCollisionId,
cftrack::Pt, cftrack::Eta, cftrack::Phi,
cftrack::Sign, track::TrackType);
DECLARE_SOA_TABLE(CFTrackLabels, "AOD", "CFTRACKLABEL", //! Labels for reduced track table
cftrack::CFMcParticleId);
using CFTrack = CFTracks::iterator;
using CFTrackLabel = CFTrackLabels::iterator;
using CFTracksWithLabel = soa::Join<CFTracks, CFTrackLabels>;
using CFTrackWithLabel = CFTracksWithLabel::iterator;
//------transient CF-filter to CF-2prong-filter
DECLARE_SOA_TABLE(CFCollRefs, "AOD", "CFCOLLREF", o2::soa::Index<>, track::CollisionId); //! Transient cf collision index table
//------multiplicity set
namespace cfmultset
{
DECLARE_SOA_COLUMN(Multiplicities, multiplicities, std::vector<float>); //! List of auxiliary multiplicities
enum MultiplicityEstimators : uint8_t {
CentFT0C = 0x1,
MultFV0A = 0x2,
MultNTracksPV = 0x4,
MultNTracksGlobal = 0x8,
CentFT0M = 0x10,
};
inline constexpr uint32_t NMultiplicityEstimators = __builtin_ctz(CentFT0M) + 1;
} // namespace cfmultset
DECLARE_SOA_TABLE(CFMultSets, "AOD", "CFMULTSET", cfmultset::Multiplicities); //! Auxilary multiplicity set table
using CFMultSet = CFMultSets::iterator;
// Reco
using CFCollRef = CFCollRefs::iterator;
namespace cftrackref
{
DECLARE_SOA_INDEX_COLUMN(Track, track);
} // namespace cftrackref
DECLARE_SOA_TABLE(CFTrackRefs, "AOD", "CFTRACKREF", o2::soa::Index<>, track::CollisionId, cftrackref::TrackId); //! Transient cf track index table
using CFTrackRef = CFTrackRefs::iterator;
// MC
namespace cfmcparticleref
{
DECLARE_SOA_INDEX_COLUMN(McParticle, mcParticle);
} // namespace cfmcparticleref
DECLARE_SOA_TABLE(CFMcParticleRefs, "AOD", "CFMCPARTICLEREF", o2::soa::Index<>, mcparticle::McCollisionId, cfmcparticleref::McParticleId); //! Transient cf track index table
using CFMcParticleRef = CFMcParticleRefs::iterator;
//------
namespace cf2prongtrack
{
DECLARE_SOA_INDEX_COLUMN_FULL(CFTrackProng0, cfTrackProng0, int, CFTracks, "_0"); //! Index to prong 1 CFTrack
DECLARE_SOA_INDEX_COLUMN_FULL(CFTrackProng1, cfTrackProng1, int, CFTracks, "_1"); //! Index to prong 2 CFTrack
DECLARE_SOA_COLUMN(Pt, pt, float); //! pT (GeV/c)
DECLARE_SOA_COLUMN(Eta, eta, float); //! Pseudorapidity
DECLARE_SOA_COLUMN(Phi, phi, float); //! Phi angle
DECLARE_SOA_COLUMN(InvMass, invMass, float); //! Invariant mass
DECLARE_SOA_COLUMN(Decay, decay, uint8_t); //! Particle decay
enum ParticleDecay {
D0ToPiK,
D0barToKPi, // note: often duplicate to D0ToPiK. Choose D0barToKPiExclusive to select uniquely reconstructed D0bars
JPsiToEE,
JPsiToMuMu,
Generic2Prong,
PhiToKKPID1,
PhiToKKPID2,
PhiToKKPID3,
PhiToKKPID3Loose,
PhiToKKPID3Tight,
K0stoPiPi,
LambdatoPPi,
AntiLambdatoPiP,
K0stoPiPiLoose,
K0stoPiPiTight,
LambdaToPPiLoose,
LambdaToPPiTight,
AntiLambdaToPiPLoose,
AntiLambdaToPiPTight,
D0barToKPiExclusive
};
} // namespace cf2prongtrack
DECLARE_SOA_TABLE(CF2ProngTracks, "AOD", "CF2PRONGTRACK", //! Reduced track table
o2::soa::Index<>,
cftrack::CFCollisionId,
cf2prongtrack::CFTrackProng0Id,
cf2prongtrack::CFTrackProng1Id,
cf2prongtrack::Pt, cf2prongtrack::Eta, cf2prongtrack::Phi, cf2prongtrack::InvMass, cf2prongtrack::Decay);
using CF2ProngTrack = CF2ProngTracks::iterator;
//------
namespace cf2prongtrackml
{
DECLARE_SOA_COLUMN(MlProbD0, mlProbD0, std::vector<float>); //!
DECLARE_SOA_COLUMN(MlProbD0bar, mlProbD0bar, std::vector<float>); //!
} // namespace cf2prongtrackml
DECLARE_SOA_TABLE(CF2ProngTrackmls, "AOD", "CF2PRONGTRACKML", //! Reduced track table
o2::soa::Index<>,
cftrack::CFCollisionId,
cf2prongtrackml::MlProbD0, cf2prongtrackml::MlProbD0bar);
using CF2ProngTrackml = CF2ProngTrackmls::iterator;
//------
namespace cf2prongmcpart
{
DECLARE_SOA_INDEX_COLUMN_FULL(CFParticleDaugh0, cfParticleDaugh0, int, CFMcParticles, "_0"); //! Index to prong 1 CFMcParticle
DECLARE_SOA_INDEX_COLUMN_FULL(CFParticleDaugh1, cfParticleDaugh1, int, CFMcParticles, "_1"); //! Index to prong 2 CFMcParticle
DECLARE_SOA_COLUMN(Decay, decay, uint8_t); //! Particle decay and flags
DECLARE_SOA_DYNAMIC_COLUMN(McDecay, mcDecay, [](uint8_t decay) -> uint8_t { return decay & 0x7f; }); //! MC particle decay
enum ParticleDecayFlags {
Prompt = 0x80
};
} // namespace cf2prongmcpart
DECLARE_SOA_TABLE(CF2ProngMcParts, "AOD", "CF2PRONGMCPART", //! Table for the daughter particles of a 2-prong particle, to be joined with CFMcParticles
o2::soa::Index<>,
cf2prongmcpart::CFParticleDaugh0Id,
cf2prongmcpart::CFParticleDaugh1Id,
cf2prongmcpart::Decay,
cf2prongmcpart::McDecay<cf2prongmcpart::Decay>)
using CF2ProngMcPart = CF2ProngMcParts::iterator;
} // namespace o2::aod
#endif // PWGCF_DATAMODEL_CORRELATIONSDERIVED_H_