Project
Loading...
Searching...
No Matches
Run2LikeAO2D.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
13
14//******************************************************************
15// AO2D helper information
16//
17// This header contains basic info needed to mimick a Run 2-like
18// converted AO2D file. Its current use case is the ALICE 3
19// G3/G4 simulation to AO2D conversion.
20//
21//******************************************************************
22#ifndef RUN2LIKE_AOD_H
23#define RUN2LIKE_AOD_H
24#include <TString.h>
25
26namespace o2
27{
28namespace upgrades_utils
29{
30
31enum TreeIndex { // Index of the output trees
32 kEvents = 0, //ok
34 kTracks, //ok
35 kCalo, //N/A
37 kMuon, //N/A
38 kZdc, //N/A
39 kFV0A, //N/A
40 kFV0C, //N/A
41 kFT0, //N/A
42 kFDD, //N/A
43 kV0s, //may be ok (requires tuning)
44 kCascades, //may be ok (requires tuning)
45 kTOF, //N/A... for now
46 kMcParticle, //MC operation
47 kMcCollision, //MC operation
48 kMcTrackLabel, //MC operation
50 kMcCollisionLabel, //MC operation
51 kBC, //N/A
52 kTrees //N/A
53};
54
55enum MCParticleFlags : uint8_t {
56 ProducedInTransport = 1 // Bit 0: 0 = from generator; 1 = from transport
57};
58
59const TString gTreeName[kTrees] = {"O2collision", "DbgEventExtra", "O2track", "O2calo", "O2calotrigger", "O2muon", "O2zdc", "O2fv0a", "O2fv0c", "O2ft0", "O2fdd", "O2v0", "O2cascade", "O2tof", "O2mcparticle", "O2mccollision", "O2mctracklabel", "O2mccalolabel", "O2mccollisionlabel", "O2bc"};
60const TString gTreeTitle[kTrees] = {"Collision tree", "Collision extra", "Barrel tracks", "Calorimeter cells", "Calorimeter triggers", "MUON tracks", "ZDC", "FV0A", "FV0C", "FT0", "FDD", "V0s", "Cascades", "TOF hits", "Kinematics", "MC collisions", "MC track labels", "MC calo labels", "MC collision labels", "BC info"};
61
62const Bool_t gSaveTree[kTrees] = {kTRUE, kFALSE, kTRUE, kFALSE, kFALSE, kFALSE, kTRUE, kTRUE, kTRUE, kTRUE, kTRUE,
63 //V0 and cascade (not done for now)
64 kFALSE, kFALSE,
65 //TOF
66 kFALSE,
67 //MC information (not done for now)
68 kTRUE, kTRUE, kTRUE, kFALSE, kTRUE, kTRUE};
69
70//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
71// structs for AO2D convenience
72// straight from AO2D converter
73struct {
74 // Event data
75 Int_t fBCsID = 0u;
76 // Primary vertex position
77 Float_t fPosX = -999.f;
78 Float_t fPosY = -999.f;
79 Float_t fPosZ = -999.f;
80 // Primary vertex covariance matrix
81 Float_t fCovXX = 999.f;
84 Float_t fCovYY = 999.f;
86 Float_t fCovZZ = 999.f;
87 // Quality parameters
88 Float_t fChi2 = 999.f;
89 UInt_t fN = 0u;
90
91 // The calculation of event time certainly will be modified in Run3
92 // The prototype below can be switched on request
95 UChar_t fCollisionTimeMask = 0u;
96
98
99struct {
100 // Start indices and numbers of elements for data in the other trees matching this vertex.
101 // Needed for random access of collision-related data, allowing skipping data discarded by the user
102 Int_t fStart[kTrees] = {0};
103 Int_t fNentries[kTrees] = {0};
105
106struct {
107 int fRunNumber = -1;
108 ULong64_t fGlobalBC = 0u;
109 ULong64_t fTriggerMask = 0u;
110} bc;
111
112struct {
113 // Track data
114
115 Int_t fCollisionsID = -1;
116
117 uint8_t fTrackType = 0; // Type of track: global, ITS standalone, tracklet, ...
118
119 // In case we need connection to TOF clusters, activate next lines
120 // Int_t fTOFclsIndex; /// The index of the associated TOF cluster
121 // Int_t fNTOFcls; /// The number of TOF clusters
122
123 // Coordinate system parameters
124 Float_t fX = -999.f;
125 Float_t fAlpha = -999.f;
126
127 // Track parameters
128 Float_t fY = -999.f;
129 Float_t fZ = -999.f;
130 Float_t fSnp = -999.f;
131 Float_t fTgl = -999.f;
133
134 // "Covariance matrix"
135 // The diagonal elements represent the errors = Sqrt(C[i,i])
136 // The off-diagonal elements are the correlations = C[i,j]/Sqrt(C[i,i])/Sqrt(C[j,j])
137 // The off-diagonal elements are multiplied by 128 (7bits) and packed in Char_t
138 Float_t fSigmaY = -999.f;
139 Float_t fSigmaZ = -999.f;
143 Char_t fRhoZY = 0;
144 Char_t fRhoSnpY = 0;
145 Char_t fRhoSnpZ = 0;
146 Char_t fRhoTglY = 0;
147 Char_t fRhoTglZ = 0;
148 Char_t fRhoTglSnp = 0;
149 Char_t fRho1PtY = 0;
150 Char_t fRho1PtZ = 0;
151 Char_t fRho1PtSnp = 0;
152 Char_t fRho1PtTgl = 0;
153
154 // Additional track parameters
156
157 // Track quality parameters
158 UInt_t fFlags = 0u;
159
160 // Clusters and tracklets
161 UChar_t fITSClusterMap = 0u;
162 UChar_t fTPCNClsFindable = 0u;
165 UChar_t fTPCNClsShared = 0u;
166 UChar_t fTRDPattern = 0u;
167
168 // Chi2
171 Float_t fTRDChi2 = -999.f;
172 Float_t fTOFChi2 = -999.f;
173
174 // PID
178 Float_t fLength = -999.f;
180
181 // Track extrapolation to EMCAL surface
185
186struct {
187 // MC collision
188 Int_t fBCsID = 0u;
189 Short_t fGeneratorsID = 0u;
190 Float_t fPosX = -999.f;
191 Float_t fPosY = -999.f;
192 Float_t fPosZ = -999.f;
193 Float_t fT = -999.f;
194 Float_t fWeight = -999.f;
195 // Generation details (HepMC3 in the future)
198
199struct {
200 // Track label to find the corresponding MC particle
201 UInt_t fLabel = 0;
202 UShort_t fLabelMask = 0;
207
208struct {
209 // MC particle
210
211 Int_t fMcCollisionsID = -1;
212
213 // MC information (modified version of TParticle
214 Int_t fPdgCode = -99999;
215 Int_t fStatusCode = -99999;
216 uint8_t fFlags = 0;
217 Int_t fMother0 = 0;
218 Int_t fMother1 = 0;
219 Int_t fDaughter0 = 0;
220 Int_t fDaughter1 = 0;
221 Float_t fWeight = 1;
222
223 Float_t fPx = -999.f;
224 Float_t fPy = -999.f;
225 Float_t fPz = -999.f;
226 Float_t fE = -999.f;
227
228 Float_t fVx = -999.f;
229 Float_t fVy = -999.f;
230 Float_t fVz = -999.f;
231 Float_t fVt = -999.f;
232 // We do not use the polarisation so far
234
235struct {
236 // MC collision label
237 UInt_t fLabel = 0;
238 UShort_t fLabelMask = 0;
241
242struct {
244 Int_t fBCsID = 0u;
245 Float_t fAmplitudeA[4] = {0.f};
246 Float_t fAmplitudeC[4] = {0.f};
247 Float_t fTimeA = 56.7f;
248 Float_t fTimeC = 65.3f;
249 uint8_t fTriggerMask = 0;
251
252struct {
254 Int_t fBCsID = 0u;
255 Float_t fAmplitude[48] = {0.f};
256 Float_t fTime = 11.f;
257 uint8_t fTriggerMask = 0;
259
260struct {
262 Int_t fBCsID = 0u;
263 Float_t fAmplitude[32] = {0.f};
264 Float_t fTime = 3.6f;
266
267struct {
269 Int_t fBCsID = 0u;
270 Float_t fAmplitudeA[96] = {0.f};
271 Float_t fAmplitudeC[112] = {0.f};
272 Float_t fTimeA = 0.02f;
273 Float_t fTimeC = 0.03f;
276
277struct {
278 Int_t fBCsID = 0u;
291 Float_t fTimeZNA = 0.055f;
292 Float_t fTimeZNC = -0.049f;
297} // namespace upgrades_utils
298} // namespace o2
299
300#endif
uint8_t itsSharedClusterMap uint8_t
const TString gTreeTitle[kTrees]
Int_t fDaughter1
Indices of the daughter particles.
struct o2::upgrades_utils::@456 mctracklabel
MC collisions = vertices.
Float_t fT
Primary vertex z coordinate from MC.
Float_t fY
Local <--> global coor.system rotation angle.
Char_t fRho1PtSnp
128*fC[11]/Sigma1Pt/SigmaZ
Short_t fGeneratorsID
Index to BC table.
Int_t fPdgCode
The index of the MC collision vertex.
uint8_t fTrackType
The index of the collision vertex in the TF, to which the track is attached.
struct o2::upgrades_utils::@460 fv0a
UShort_t fLabelMask
Track label.
Int_t fBCsID
FDD (AD)
Float_t fSigmaTgl
Sqrt(fC[5])
Float_t fEnergySectorZNC[4]
E in 4 ZNC sectors - high gain chain.
struct o2::upgrades_utils::@463 zdc
structure to keep FT0 information
Float_t fEnergyCommonZNA
E in common ZNA PMT - high gain chain.
struct o2::upgrades_utils::@454 tracks
structure to keep trigger-related info
Float_t fTimeZEM2
Corrected time in ZEM2.
UChar_t fTPCNClsFindable
ITS map of clusters, one bit per a layer.
Float_t fEnergyCommonZPC
E in common ZPC PMT - high gain chain.
struct o2::upgrades_utils::@459 fdd
Collision labels.
Char_t fTPCNClsFindableMinusFound
number of clusters that could be assigned in the TPC
struct o2::upgrades_utils::@461 fv0c
structure to keep V0A information
Float_t fAlpha
X coordinate for the point of parametrisation.
Char_t fRho1PtZ
128*fC[10]/Sigma1Pt/SigmaY
Float_t fSnp
fP[1] local Z-coordinate of a track (cm)
Float_t fPy
x component of momentum
Float_t fTRDSignal
dE/dX TPC
UChar_t fITSClusterMap
Reconstruction status flags.
Float_t fPx
particle weight from the generator or ML
Float_t fEnergySectorZNA[4]
E in 4 ZNA sectors - high gain chain.
Float_t fEnergyCommonZPA
E in common ZPA PMT - high gain chain.
Float_t fTime
Multiplicity for each channel.
Int_t fNentries[kTrees]
Start entry indices for data in the other trees matching this vertex.
Float_t fVx
Energy (covers the case of resonances, no need for calculated mass)
Float_t fAmplitudeC[4]
Multiplicity for each A-side channel.
Float_t fAmplitude[48]
Index to BC table.
Float_t fSigmaSnp
Sqrt(fC[2])
Char_t fRho1PtTgl
128*fC[12]/Sigma1Pt/SigmaSnp
Float_t fSigmaY
fP[4] 1/pt (1/(GeV/c))
Int_t fStatusCode
PDG code of the particle.
Float_t fPosY
Primary vertex x coordinate.
struct o2::upgrades_utils::@451 collision
UChar_t fTPCNClsShared
difference between foundable clsuters and crossed rows
Float_t fTimeC
Average A-side time.
Float_t fTOFExpMom
Int.Lenght @ TOF.
Float_t fTimeZPA
Corrected time in ZPA.
Int_t fStart[kTrees]
Float_t fLength
TOFsignal.
Float_t fTgl
fP[2] local sine of the track momentum azimuthal angle
Float_t fCovXX
Primary vertex z coordinate.
Float_t fCovZZ
cov[4]
Float_t fTOFSignal
dE/dX TRD
Float_t fCovXZ
cov[1]
Float_t fPz
y component of momentum
Float_t fTPCSignal
chi2 TOF match (?)
Float_t fTimeZEM1
Corrected time in ZEM1.
Float_t fEnergyZEM2
E in ZEM2.
Float_t fImpactParameter
Weight from MC.
Float_t fTRDChi2
chi2/Ncl TPC
Int_t fMother1
Indices of the mother particles.
struct o2::upgrades_utils::@455 mccollision
structure to keep track information
Int_t fMother0
See enum MCParticleFlags.
UChar_t fCollisionTimeMask
Resolution on the event time (t0) obtained with different methods (best, T0, T0-TOF,...
Float_t fTrackPhiEMCAL
Track eta at the EMCAL surface.
UInt_t fFlags
Full momentum at the inner wall of TPC for dE/dx PID.
struct o2::upgrades_utils::@453 bc
structure for benchmarking information
Float_t fVz
y of production vertex
Float_t fChi2
cov[5]
struct o2::upgrades_utils::@452 eventextra
structure to keep the primary vertex (avoid name conflicts)
Float_t fTPCinnerP
128*fC[13]/Sigma1Pt/SigmaTgl
Float_t fCovYY
cov[2]
Float_t fWeight
Time of the collision from MC.
Float_t fCollisionTimeRes
Event time (t0) obtained with different methods (best, T0, T0-TOF, ...)
Char_t fRhoTglY
128*fC[4]/SigmaSnp/SigmaZ
Float_t fEnergyCommonZNC
E in common ZNC PMT - high gain chain.
Float_t fCovXY
cov[0]
Float_t fSigmaZ
Sqrt(fC[0])
Float_t fTPCChi2NCl
chi2/Ncl ITS
Float_t fPosX
Index to BC table.
Float_t fCollisionTime
Number of contributors.
Float_t fAmplitudeA[4]
Index to BC table.
Float_t fEnergySectorZPC[4]
E in 4 ZPC sectors - high gain chain.
Float_t fEnergyZEM1
Index to BC table.
Float_t fITSChi2NCl
Bit 0-5 if tracklet from TRD layer used for this track.
struct o2::upgrades_utils::@458 mccollisionlabel
MC particles from the kinematics tree.
Char_t fRhoTglZ
128*fC[6]/SigmaTgl/SigmaY
Float_t fSigned1Pt
fP[3] tangent of the track momentum dip angle
Char_t fRho1PtY
128*fC[8]/SigmaTgl/SigmaSnp
Char_t fTPCNClsFindableMinusCrossedRows
difference between foundable and found clusters
Float_t fTimeZNC
Corrected time in ZNC.
ULong64_t fTriggerMask
Unique bunch crossing id. Contains period, orbit and bunch crossing numbers.
Char_t fRhoSnpZ
128*fC[3]/SigmaSnp/SigmaY
struct o2::upgrades_utils::@457 mcparticle
Track labels.
const TString gTreeName[kTrees]
Float_t fVy
x of production vertex
Float_t fZ
fP[0] local Y-coordinate of a track (cm)
Float_t fTimeZPC
Corrected time in ZPC.
ULong64_t fGlobalBC
Run number.
Float_t fEnergySectorZPA[4]
E in 4 ZPA sectors - high gain chain.
Float_t fTimeA
Multiplicity for each C-side channel.
Float_t fTOFChi2
chi2 TRD match (?)
UChar_t fTRDPattern
Number of shared clusters.
Float_t fTimeZNA
Corrected time in ZNA.
Float_t fSigma1Pt
Sqrt(fC[9])
Char_t fRhoZY
Sqrt(fC[14])
Char_t fRhoSnpY
128*fC[1]/SigmaZ/SigmaY
Float_t fPosZ
Primary vertex y coordinate.
Float_t fE
z component of momentum
struct o2::upgrades_utils::@462 ft0
structure to keep V0C information
Float_t fVt
z of production vertex
UInt_t fN
Chi2 of the vertex.
Char_t fRhoTglSnp
128*fC[7]/SigmaTgl/SigmaZ
const Bool_t gSaveTree[kTrees]
Float_t fTrackEtaEMCAL
TOF Expected momentum based on the expected time of pions.
Float_t fCovYZ
cov[3]
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...