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