]>
Commit | Line | Data |
---|---|---|
77f43bb7 | 1 | #ifndef ALIAODHEADER_H |
2 | #define ALIAODHEADER_H | |
df9db588 | 3 | /* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. * |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
8 | //------------------------------------------------------------------------- | |
9ae2e5e6 | 9 | // AOD event header class |
df9db588 | 10 | // Author: Markus Oldenburg, CERN |
11 | //------------------------------------------------------------------------- | |
12 | ||
c7d82ff7 | 13 | #include <TVector2.h> |
14 | ||
9ae2e5e6 | 15 | #include "AliVHeader.h" |
df9db588 | 16 | #include "AliAODVertex.h" |
a5f7aba4 | 17 | #include <TString.h> |
4ccebdba | 18 | #include <TBits.h> |
f1c1d7c6 | 19 | #include "AliCentrality.h" |
ce7adfe9 | 20 | #include "AliEventplane.h" |
df9db588 | 21 | |
1aa76f71 | 22 | class TGeoHMatrix; |
27346f69 | 23 | class TString; |
1aa76f71 | 24 | |
f1c1d7c6 | 25 | |
9ae2e5e6 | 26 | class AliAODHeader : public AliVHeader { |
df9db588 | 27 | |
28 | public : | |
31fd97b2 | 29 | AliAODHeader(); |
df9db588 | 30 | |
abfce367 | 31 | AliAODHeader(Int_t nRun, UShort_t nBunchX, UInt_t nOrbit, UInt_t nPeriod, const Char_t *title=""); |
31fd97b2 | 32 | AliAODHeader(Int_t nRun, |
33 | UShort_t nBunchX, | |
34 | UInt_t nOrbit, | |
89cf15db | 35 | UInt_t nPeriod, |
31fd97b2 | 36 | Int_t refMult, |
37 | Int_t refMultPos, | |
38 | Int_t refMultNeg, | |
e9f4e33d | 39 | Int_t refMultComb05, |
40 | Int_t refMultComb08, | |
31fd97b2 | 41 | Double_t magField, |
6b6f8d32 | 42 | Double_t muonMagFieldScale, |
43 | Double_t cent, | |
ce7adfe9 | 44 | Double_t eventplane, |
6b6f8d32 | 45 | Double_t n1Energy, |
46 | Double_t p1Energy, | |
47 | Double_t n2Energy, | |
48 | Double_t p2Energy, | |
a85132e7 | 49 | Double_t *emEnergy, |
31fd97b2 | 50 | ULong64_t fTriggerMask, |
51 | UChar_t fTriggerCluster, | |
52 | UInt_t fEventType, | |
5e14e698 | 53 | const Float_t *vzeroEqFactors, |
fa8b0e56 | 54 | const Char_t *title="", |
55 | Int_t nMuons=0, | |
56 | Int_t nDimuons=0); | |
31fd97b2 | 57 | |
df9db588 | 58 | virtual ~AliAODHeader(); |
59 | AliAODHeader(const AliAODHeader& evt); | |
60 | AliAODHeader& operator=(const AliAODHeader& evt); | |
a5f7aba4 | 61 | |
62 | Int_t GetRunNumber() const { return fRunNumber;} | |
63 | Int_t GetEventNumberESDFile() const { return fEventNumberESDFile;} | |
31fd97b2 | 64 | UShort_t GetBunchCrossNumber() const { return fBunchCrossNumber; } |
65 | UInt_t GetOrbitNumber() const { return fOrbitNumber; } | |
89cf15db | 66 | UInt_t GetPeriodNumber() const { return fPeriodNumber; } |
df9db588 | 67 | ULong64_t GetTriggerMask() const { return fTriggerMask; } |
68 | UChar_t GetTriggerCluster() const { return fTriggerCluster; } | |
27346f69 | 69 | TString GetFiredTriggerClasses()const { return fFiredTriggers;} |
df9db588 | 70 | UInt_t GetEventType() const { return fEventType; } |
71 | Double_t GetMagneticField() const { return fMagneticField; } | |
6b6f8d32 | 72 | Double_t GetMuonMagFieldScale() const { return fMuonMagFieldScale; } |
73 | ||
df9db588 | 74 | Double_t GetCentrality() const { return fCentrality; } |
ce7adfe9 | 75 | Double_t GetEventplane() const { return fEventplane; } |
a52246de | 76 | Double_t GetEventplaneMag() const { return fEventplaneMag; } |
6b6f8d32 | 77 | Double_t GetZDCN1Energy() const { return fZDCN1Energy; } |
78 | Double_t GetZDCP1Energy() const { return fZDCP1Energy; } | |
79 | Double_t GetZDCN2Energy() const { return fZDCN2Energy; } | |
80 | Double_t GetZDCP2Energy() const { return fZDCP2Energy; } | |
a85132e7 | 81 | Double_t GetZDCEMEnergy(Int_t i) const { return fZDCEMEnergy[i]; } |
df9db588 | 82 | Int_t GetRefMultiplicity() const { return fRefMult; } |
83 | Int_t GetRefMultiplicityPos() const { return fRefMultPos; } | |
84 | Int_t GetRefMultiplicityNeg() const { return fRefMultNeg; } | |
fa8b0e56 | 85 | Int_t GetNumberOfMuons() const { return fNMuons; } |
86 | Int_t GetNumberOfDimuons() const { return fNDimuons; } | |
e9f4e33d | 87 | Int_t GetRefMultiplicityComb05() const { return fRefMultComb05; } |
88 | Int_t GetRefMultiplicityComb08() const { return fRefMultComb08; } | |
ff254193 | 89 | |
90 | Double_t GetQTheta(UInt_t i) const; | |
91 | UInt_t GetNQTheta() const { return (UInt_t)fNQTheta; } | |
613fc341 | 92 | |
93 | Double_t GetDiamondX() const {return fDiamondXY[0];} | |
94 | Double_t GetDiamondY() const {return fDiamondXY[1];} | |
49fc2e2c | 95 | Double_t GetDiamondZ() const {return fDiamondZ;} |
613fc341 | 96 | Double_t GetSigma2DiamondX() const {return fDiamondCovXY[0];} |
97 | Double_t GetSigma2DiamondY() const {return fDiamondCovXY[2];} | |
49fc2e2c | 98 | Double_t GetSigma2DiamondZ() const {return fDiamondSig2Z;} |
613fc341 | 99 | void GetDiamondCovXY(Float_t cov[3]) const { |
100 | for(Int_t i=0;i<3;i++) cov[i]=fDiamondCovXY[i]; return; | |
101 | } | |
a5f7aba4 | 102 | UInt_t GetL0TriggerInputs() const {return fL0TriggerInputs;} |
103 | UInt_t GetL1TriggerInputs() const {return fL1TriggerInputs;} | |
104 | UShort_t GetL2TriggerInputs() const {return fL2TriggerInputs;} | |
f1c1d7c6 | 105 | AliCentrality* GetCentralityP() const { return fCentralityP; } |
ce7adfe9 | 106 | AliEventplane* GetEventplaneP() const { return fEventplaneP; } |
a5f7aba4 | 107 | |
6b6f8d32 | 108 | |
df9db588 | 109 | void SetRunNumber(Int_t nRun) { fRunNumber = nRun; } |
a5f7aba4 | 110 | void SetEventNumberESDFile(Int_t n) { fEventNumberESDFile=n; } |
31fd97b2 | 111 | void SetBunchCrossNumber(UShort_t nBx) { fBunchCrossNumber = nBx; } |
9ae2e5e6 | 112 | void SetOrbitNumber(UInt_t nOr) { fOrbitNumber = nOr; } |
113 | void SetPeriodNumber(UInt_t nPer) { fPeriodNumber = nPer; } | |
df9db588 | 114 | void SetTriggerMask(ULong64_t trigMsk) { fTriggerMask = trigMsk; } |
27346f69 | 115 | void SetFiredTriggerClasses(TString trig) { fFiredTriggers = trig;} |
df9db588 | 116 | void SetTriggerCluster(UChar_t trigClus) { fTriggerCluster = trigClus; } |
117 | void SetEventType(UInt_t evttype) { fEventType = evttype; } | |
118 | void SetMagneticField(Double_t magFld) { fMagneticField = magFld; } | |
6b6f8d32 | 119 | void SetMuonMagFieldScale(Double_t magFldScl){ fMuonMagFieldScale = magFldScl; } |
77f43bb7 | 120 | void SetCentrality(const AliCentrality* cent); |
ce7adfe9 | 121 | void SetEventplane(AliEventplane* eventplane); |
6b6f8d32 | 122 | void SetZDCN1Energy(Double_t n1Energy) { fZDCN1Energy = n1Energy; } |
123 | void SetZDCP1Energy(Double_t p1Energy) { fZDCP1Energy = p1Energy; } | |
124 | void SetZDCN2Energy(Double_t n2Energy) { fZDCN2Energy = n2Energy; } | |
125 | void SetZDCP2Energy(Double_t p2Energy) { fZDCP2Energy = p2Energy; } | |
a85132e7 | 126 | void SetZDCEMEnergy(Double_t emEnergy1, Double_t emEnergy2) |
127 | { fZDCEMEnergy[0] = emEnergy1; fZDCEMEnergy[1] = emEnergy2;} | |
df9db588 | 128 | void SetRefMultiplicity(Int_t refMult) { fRefMult = refMult; } |
129 | void SetRefMultiplicityPos(Int_t refMultPos) { fRefMultPos = refMultPos; } | |
130 | void SetRefMultiplicityNeg(Int_t refMultNeg) { fRefMultNeg = refMultNeg; } | |
fa8b0e56 | 131 | void SetNumberOfMuons(Int_t nMuons) { fNMuons = nMuons; } |
132 | void SetNumberOfDimuons(Int_t nDimuons) { fNDimuons = nDimuons; } | |
e9f4e33d | 133 | void SetRefMultiplicityComb05(Int_t refMult) { fRefMultComb05 = refMult; } |
134 | void SetRefMultiplicityComb08(Int_t refMult) { fRefMultComb08 = refMult; } | |
135 | ||
ff254193 | 136 | void SetQTheta(Double_t *QTheta, UInt_t size = 5); |
137 | void RemoveQTheta(); | |
138 | ||
c7d82ff7 | 139 | void ResetEventplanePointer(); |
140 | ||
613fc341 | 141 | void SetDiamond(Float_t xy[2],Float_t cov[3]) { |
11becff8 | 142 | for(Int_t i=0;i<3;i++) {fDiamondCovXY[i] = cov[i];} |
143 | for(Int_t i=0;i<2;i++) {fDiamondXY[i] = xy[i] ;} | |
613fc341 | 144 | } |
49fc2e2c | 145 | void SetDiamondZ(Float_t z, Float_t sig2z){ |
146 | fDiamondZ=z; fDiamondSig2Z=sig2z; | |
147 | } | |
a5f7aba4 | 148 | void SetL0TriggerInputs(UInt_t n) {fL0TriggerInputs=n;} |
149 | void SetL1TriggerInputs(UInt_t n) {fL1TriggerInputs=n;} | |
150 | void SetL2TriggerInputs(UShort_t n) {fL2TriggerInputs=n;} | |
151 | void SetESDFileName(TString name) {fESDFileName = name;} | |
df9db588 | 152 | void Print(Option_t* option = "") const; |
1aa76f71 | 153 | |
154 | void SetPHOSMatrix(TGeoHMatrix*matrix, Int_t i) { | |
155 | if ((i >= 0) && (i < kNPHOSMatrix)) fPHOSMatrix[i] = matrix; | |
156 | } | |
157 | const TGeoHMatrix* GetPHOSMatrix(Int_t i) const { | |
158 | return ((i >= 0) && (i < kNPHOSMatrix)) ? fPHOSMatrix[i] : NULL; | |
159 | } | |
6b6f8d32 | 160 | |
1aa76f71 | 161 | void SetEMCALMatrix(TGeoHMatrix*matrix, Int_t i) { |
162 | if ((i >= 0) && (i < kNEMCALMatrix)) fEMCALMatrix[i] = matrix; | |
163 | } | |
164 | const TGeoHMatrix* GetEMCALMatrix(Int_t i) const { | |
165 | return ((i >= 0) && (i < kNEMCALMatrix)) ? fEMCALMatrix[i] : NULL; | |
166 | } | |
167 | ||
0c6c629b | 168 | UInt_t GetOfflineTrigger() { return fOfflineTrigger; } |
f7ce7a37 | 169 | void SetOfflineTrigger(UInt_t trigger) { fOfflineTrigger = trigger; } |
170 | UInt_t GetNumberOfITSClusters(Int_t ilay) const {return fITSClusters[ilay];} | |
171 | void SetITSClusters(Int_t ilay, UInt_t nclus); | |
172 | Int_t GetTPConlyRefMultiplicity() const {return fTPConlyRefMult;} | |
173 | void SetTPConlyRefMultiplicity(Int_t mult) {fTPConlyRefMult = mult;} | |
174 | ||
5e6a3170 | 175 | TString GetESDFileName() const {return fESDFileName;} |
99dbf027 | 176 | void Clear(Option_t* = ""); |
1aa76f71 | 177 | enum {kNPHOSMatrix = 5}; |
178 | enum {kNEMCALMatrix = 12}; | |
949be341 | 179 | enum {kT0SpreadSize = 4}; |
5e14e698 | 180 | |
181 | void SetVZEROEqFactors(const Float_t* factors) { | |
182 | if (factors) | |
183 | for (Int_t i = 0; i < 64; ++i) fVZEROEqFactors[i] = factors[i];} | |
184 | const Float_t* GetVZEROEqFactors() const {return fVZEROEqFactors;} | |
185 | Float_t GetVZEROEqFactors(Int_t i) const {return fVZEROEqFactors[i];} | |
949be341 | 186 | Float_t GetT0spread(Int_t i) const { |
187 | return ((i >= 0) && (i<kT0SpreadSize)) ? fT0spread[i] : 0;} | |
188 | void SetT0spread(Int_t i, Float_t t) { | |
189 | if ((i>=0)&&(i<kT0SpreadSize)) fT0spread[i]=t;} | |
190 | ||
4ccebdba | 191 | Int_t FindIRIntInteractionsBXMap(Int_t difference); |
192 | void SetIRInt2InteractionMap(TBits bits) { fIRInt2InteractionsMap = bits; } | |
193 | void SetIRInt1InteractionMap(TBits bits) { fIRInt1InteractionsMap = bits; } | |
194 | TBits GetIRInt2InteractionMap() { return fIRInt2InteractionsMap; } | |
195 | TBits GetIRInt1InteractionMap() { return fIRInt1InteractionsMap; } | |
196 | Int_t GetIRInt2ClosestInteractionMap(); | |
197 | Int_t GetIRInt2LastInteractionMap(); | |
6b6f8d32 | 198 | |
df9db588 | 199 | private : |
6b6f8d32 | 200 | |
201 | Double32_t fMagneticField; // Solenoid Magnetic Field in kG | |
202 | Double32_t fMuonMagFieldScale; // magnetic field scale of muon arm magnet | |
203 | Double32_t fCentrality; // Centrality | |
ce7adfe9 | 204 | Double32_t fEventplane; // Event plane angle |
c7d82ff7 | 205 | Double32_t fEventplaneMag; // Length of Q vector from TPC event plance |
6b6f8d32 | 206 | Double32_t fZDCN1Energy; // reconstructed energy in the neutron1 ZDC |
207 | Double32_t fZDCP1Energy; // reconstructed energy in the proton1 ZDC | |
208 | Double32_t fZDCN2Energy; // reconstructed energy in the neutron2 ZDC | |
209 | Double32_t fZDCP2Energy; // reconstructed energy in the proton2 ZDC | |
a85132e7 | 210 | Double32_t fZDCEMEnergy[2]; // reconstructed energy in the electromagnetic ZDCs |
ff254193 | 211 | Int_t fNQTheta; // number of QTheta elements |
212 | Double32_t *fQTheta; // [fNQTheta] values to store Lee-Yang-Zeros | |
6b6f8d32 | 213 | ULong64_t fTriggerMask; // Trigger Type (mask) |
27346f69 | 214 | TString fFiredTriggers; // String with fired triggers |
6b6f8d32 | 215 | Int_t fRunNumber; // Run Number |
216 | Int_t fRefMult; // reference multiplicity | |
217 | Int_t fRefMultPos; // reference multiplicity of positive particles | |
218 | Int_t fRefMultNeg; // reference multiplicity of negative particles | |
fa8b0e56 | 219 | Int_t fNMuons; // number of muons in the forward spectrometer |
220 | Int_t fNDimuons; // number of dimuons in the forward spectrometer | |
9333290e | 221 | UInt_t fEventType; // Type of Event |
222 | UInt_t fOrbitNumber; // Orbit Number | |
223 | UInt_t fPeriodNumber; // Period Number | |
224 | UShort_t fBunchCrossNumber; // BunchCrossingNumber | |
e9f4e33d | 225 | Short_t fRefMultComb05; // combined reference multiplicity (tracklets + ITSTPC) in |eta|<0.5 |
226 | Short_t fRefMultComb08; // combined reference multiplicity (tracklets + ITSTPC) in |eta|<0.8 | |
6b6f8d32 | 227 | UChar_t fTriggerCluster; // Trigger cluster (mask) |
613fc341 | 228 | Double32_t fDiamondXY[2]; // Interaction diamond (x,y) in RUN |
229 | Double32_t fDiamondCovXY[3]; // Interaction diamond covariance (x,y) in RUN | |
49fc2e2c | 230 | Double32_t fDiamondZ; // Interaction diamond (z) in RUN |
231 | Double32_t fDiamondSig2Z; // Interaction diamond sigma^2 (z) in RUN | |
1aa76f71 | 232 | TGeoHMatrix* fPHOSMatrix[kNPHOSMatrix]; //PHOS module position and orientation matrices |
233 | TGeoHMatrix* fEMCALMatrix[kNEMCALMatrix]; //EMCAL supermodule position and orientation matrices | |
0c6c629b | 234 | UInt_t fOfflineTrigger; // fired offline triggers for this event |
a5f7aba4 | 235 | TString fESDFileName; // ESD file name to which this event belongs |
236 | Int_t fEventNumberESDFile; // Event number in ESD file | |
237 | UInt_t fL0TriggerInputs; // L0 Trigger Inputs (mask) | |
238 | UInt_t fL1TriggerInputs; // L1 Trigger Inputs (mask) | |
239 | UShort_t fL2TriggerInputs; // L2 Trigger Inputs (mask) | |
f7ce7a37 | 240 | UInt_t fITSClusters[6]; // Number of ITS cluster per layer |
241 | Int_t fTPConlyRefMult; // Reference multiplicty for standard TPC only tracks | |
f1c1d7c6 | 242 | AliCentrality* fCentralityP; // Pointer to full centrality information |
ce7adfe9 | 243 | AliEventplane* fEventplaneP; // Pointer to full event plane information |
5e14e698 | 244 | Float_t fVZEROEqFactors[64]; // V0 channel equalization factors for event-plane reconstruction |
949be341 | 245 | Float_t fT0spread[kT0SpreadSize]; // spread of time distributions: (TOA+T0C/2), T0A, T0C, (T0A-T0C)/2 |
4ccebdba | 246 | TBits fIRInt2InteractionsMap; // map of the Int2 events (normally 0TVX) near the event, that's Int2Id-EventId in a -90 to 90 window |
247 | TBits fIRInt1InteractionsMap; // map of the Int1 events (normally V0A&V0C) near the event, that's Int1Id-EventId in a -90 to 90 window | |
248 | ClassDef(AliAODHeader, 21); | |
df9db588 | 249 | }; |
5e6a3170 | 250 | inline |
77f43bb7 | 251 | void AliAODHeader::SetCentrality(const AliCentrality* cent) { |
5e6a3170 | 252 | if(cent){ |
253 | if(fCentralityP)*fCentralityP = *cent; | |
254 | else fCentralityP = new AliCentrality(*cent); | |
255 | fCentrality = cent->GetCentralityPercentile("V0M"); | |
256 | } | |
257 | else{ | |
258 | fCentrality = -999; | |
259 | } | |
260 | } | |
ce7adfe9 | 261 | inline |
262 | void AliAODHeader::SetEventplane(AliEventplane* eventplane) { | |
263 | if(eventplane){ | |
264 | if(fEventplaneP)*fEventplaneP = *eventplane; | |
265 | else fEventplaneP = new AliEventplane(*eventplane); | |
266 | fEventplane = eventplane->GetEventplane("Q"); | |
c7d82ff7 | 267 | const TVector2* qvect=eventplane->GetQVector(); |
268 | fEventplaneMag = -999; | |
269 | if (qvect) fEventplaneMag=qvect->Mod(); | |
ce7adfe9 | 270 | } |
271 | else{ | |
272 | fEventplane = -999; | |
c7d82ff7 | 273 | fEventplaneMag = -999; |
ce7adfe9 | 274 | } |
275 | } | |
c7d82ff7 | 276 | inline |
277 | void AliAODHeader::ResetEventplanePointer() { | |
278 | delete fEventplaneP; | |
279 | fEventplaneP = 0x0; | |
280 | } | |
f7ce7a37 | 281 | |
282 | inline | |
283 | void AliAODHeader::SetITSClusters(Int_t ilay, UInt_t nclus) | |
284 | { | |
285 | if (ilay >= 0 && ilay < 6) fITSClusters[ilay] = nclus; | |
286 | } | |
287 | ||
288 | ||
df9db588 | 289 | #endif |