]>
Commit | Line | Data |
---|---|---|
df9db588 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
16 | /* $Id$ */ | |
17 | ||
18 | //------------------------------------------------------------------------- | |
19 | // AOD event base class | |
20 | // Author: Markus Oldenburg, CERN | |
21 | //------------------------------------------------------------------------- | |
22 | ||
23 | #include "AliAODHeader.h" | |
1d7d8ba7 | 24 | #include "AliCentrality.h" |
ce7adfe9 | 25 | #include "AliEventplane.h" |
1aa76f71 | 26 | #include <TGeoMatrix.h> |
27346f69 | 27 | #include <TObjString.h> |
df9db588 | 28 | |
29 | ClassImp(AliAODHeader) | |
30 | ||
31 | //______________________________________________________________________________ | |
32 | AliAODHeader::AliAODHeader() : | |
9ae2e5e6 | 33 | AliVHeader(), |
df9db588 | 34 | fMagneticField(-999.), |
6b6f8d32 | 35 | fMuonMagFieldScale(-999.), |
df9db588 | 36 | fCentrality(-999.), |
ce7adfe9 | 37 | fEventplane(-999.), |
c7d82ff7 | 38 | fEventplaneMag(-999.), |
6b6f8d32 | 39 | fZDCN1Energy(-999.), |
40 | fZDCP1Energy(-999.), | |
41 | fZDCN2Energy(-999.), | |
42 | fZDCP2Energy(-999.), | |
ff254193 | 43 | fNQTheta(0), |
44 | fQTheta(0x0), | |
df9db588 | 45 | fTriggerMask(0), |
27346f69 | 46 | fFiredTriggers(), |
df9db588 | 47 | fRunNumber(-999), |
48 | fRefMult(-999), | |
49 | fRefMultPos(-999), | |
50 | fRefMultNeg(-999), | |
dba4ebde | 51 | fNMuons(0), |
52 | fNDimuons(0), | |
9333290e | 53 | fEventType(0), |
54 | fOrbitNumber(0), | |
55 | fPeriodNumber(0), | |
56 | fBunchCrossNumber(0), | |
e9f4e33d | 57 | fRefMultComb05(-999), |
58 | fRefMultComb08(-999), | |
65b25288 | 59 | fTriggerCluster(0), |
60 | fDiamondZ(0.), | |
0c6c629b | 61 | fDiamondSig2Z(0.), |
a5f7aba4 | 62 | fOfflineTrigger(0), |
63 | fESDFileName(""), | |
64 | fEventNumberESDFile(-1), | |
65 | fL0TriggerInputs(0), | |
66 | fL1TriggerInputs(0), | |
1d7d8ba7 | 67 | fL2TriggerInputs(0), |
f7ce7a37 | 68 | fTPConlyRefMult(-1), |
ce7adfe9 | 69 | fCentralityP(0), |
4ccebdba | 70 | fEventplaneP(0), |
71 | fIRInt2InteractionsMap(0), | |
72 | fIRInt1InteractionsMap(0) | |
df9db588 | 73 | { |
74 | // default constructor | |
9ae2e5e6 | 75 | |
76 | SetName("header"); | |
a85132e7 | 77 | for(int j=0; j<2; j++) fZDCEMEnergy[j] = -999.; |
613fc341 | 78 | for(Int_t i=0; i<2; i++) fDiamondXY[i]=0.; |
79 | fDiamondCovXY[0]=fDiamondCovXY[2]=3.*3.; | |
80 | fDiamondCovXY[1]=0.; | |
1aa76f71 | 81 | for (Int_t m=0; m<kNPHOSMatrix; m++) fPHOSMatrix[m]=NULL; |
82 | for (Int_t sm=0; sm<kNEMCALMatrix; sm++) fEMCALMatrix[sm]=NULL; | |
f7ce7a37 | 83 | for (Int_t i = 0; i < 6; i++) fITSClusters[i] = 0; |
5e14e698 | 84 | for (Int_t j=0; j<64; ++j) fVZEROEqFactors[j]=-1; |
949be341 | 85 | for (Int_t i=0; i<kT0SpreadSize;i++) fT0spread[i]=0; |
df9db588 | 86 | } |
87 | ||
88 | //______________________________________________________________________________ | |
31fd97b2 | 89 | AliAODHeader::AliAODHeader(Int_t nRun, |
90 | UShort_t nBunchX, | |
91 | UInt_t nOrbit, | |
89cf15db | 92 | UInt_t nPeriod, |
abfce367 | 93 | const Char_t *title) : |
9ae2e5e6 | 94 | AliVHeader(), |
df9db588 | 95 | fMagneticField(-999.), |
6b6f8d32 | 96 | fMuonMagFieldScale(-999.), |
df9db588 | 97 | fCentrality(-999.), |
ce7adfe9 | 98 | fEventplane(-999.), |
c7d82ff7 | 99 | fEventplaneMag(-999.), |
6b6f8d32 | 100 | fZDCN1Energy(-999.), |
101 | fZDCP1Energy(-999.), | |
102 | fZDCN2Energy(-999.), | |
103 | fZDCP2Energy(-999.), | |
ff254193 | 104 | fNQTheta(0), |
105 | fQTheta(0x0), | |
df9db588 | 106 | fTriggerMask(0), |
27346f69 | 107 | fFiredTriggers(), |
ff254193 | 108 | fRunNumber(nRun), |
df9db588 | 109 | fRefMult(-999), |
110 | fRefMultPos(-999), | |
111 | fRefMultNeg(-999), | |
dba4ebde | 112 | fNMuons(0), |
113 | fNDimuons(0), | |
9333290e | 114 | fEventType(0), |
115 | fOrbitNumber(nOrbit), | |
116 | fPeriodNumber(nPeriod), | |
117 | fBunchCrossNumber(nBunchX), | |
e9f4e33d | 118 | fRefMultComb05(-999), |
119 | fRefMultComb08(-999), | |
65b25288 | 120 | fTriggerCluster(0), |
121 | fDiamondZ(0.), | |
0c6c629b | 122 | fDiamondSig2Z(0.), |
a5f7aba4 | 123 | fOfflineTrigger(0), |
124 | fESDFileName(""), | |
125 | fEventNumberESDFile(-1), | |
126 | fL0TriggerInputs(0), | |
127 | fL1TriggerInputs(0), | |
1d7d8ba7 | 128 | fL2TriggerInputs(0), |
f7ce7a37 | 129 | fTPConlyRefMult(-1), |
ce7adfe9 | 130 | fCentralityP(0), |
4ccebdba | 131 | fEventplaneP(0), |
132 | fIRInt2InteractionsMap(0), | |
133 | fIRInt1InteractionsMap(0) | |
df9db588 | 134 | { |
135 | // constructor | |
9ae2e5e6 | 136 | |
137 | SetName("header"); | |
138 | SetTitle(title); | |
a85132e7 | 139 | for(int j=0; j<2; j++) fZDCEMEnergy[j] = -999.; |
613fc341 | 140 | for(Int_t i=0; i<2; i++) fDiamondXY[i]=0.; |
141 | fDiamondCovXY[0]=fDiamondCovXY[2]=3.*3.; | |
142 | fDiamondCovXY[1]=0.; | |
1aa76f71 | 143 | for (Int_t m=0; m<kNPHOSMatrix; m++) fPHOSMatrix[m]=NULL; |
144 | for (Int_t sm=0; sm<kNEMCALMatrix; sm++) fEMCALMatrix[sm]=NULL; | |
5e14e698 | 145 | for (Int_t j=0; j<64; ++j) fVZEROEqFactors[j]=-1; |
949be341 | 146 | for (Int_t i=0; i<kT0SpreadSize;i++) fT0spread[i]=0; |
df9db588 | 147 | } |
148 | ||
149 | //______________________________________________________________________________ | |
31fd97b2 | 150 | AliAODHeader::AliAODHeader(Int_t nRun, |
151 | UShort_t nBunchX, | |
152 | UInt_t nOrbit, | |
89cf15db | 153 | UInt_t nPeriod, |
df9db588 | 154 | Int_t refMult, |
155 | Int_t refMultPos, | |
156 | Int_t refMultNeg, | |
e9f4e33d | 157 | Int_t refMultComb05, |
158 | Int_t refMultComb08, | |
df9db588 | 159 | Double_t magField, |
6b6f8d32 | 160 | Double_t muonMagFieldScale, |
df9db588 | 161 | Double_t cent, |
ce7adfe9 | 162 | Double_t eventplane, |
6b6f8d32 | 163 | Double_t n1Energy, |
164 | Double_t p1Energy, | |
165 | Double_t n2Energy, | |
166 | Double_t p2Energy, | |
a85132e7 | 167 | Double_t *emEnergy, |
6b6f8d32 | 168 | ULong64_t trigMask, |
df9db588 | 169 | UChar_t trigClus, |
170 | UInt_t evttype, | |
5e14e698 | 171 | const Float_t *vzeroEqFactors, |
fa8b0e56 | 172 | const Char_t *title, |
173 | Int_t nMuons, | |
174 | Int_t nDimuons) : | |
9ae2e5e6 | 175 | AliVHeader(), |
df9db588 | 176 | fMagneticField(magField), |
6b6f8d32 | 177 | fMuonMagFieldScale(muonMagFieldScale), |
df9db588 | 178 | fCentrality(cent), |
ce7adfe9 | 179 | fEventplane(eventplane), |
0fd709fa | 180 | fEventplaneMag(0), |
6b6f8d32 | 181 | fZDCN1Energy(n1Energy), |
182 | fZDCP1Energy(p1Energy), | |
183 | fZDCN2Energy(n2Energy), | |
184 | fZDCP2Energy(p2Energy), | |
ff254193 | 185 | fNQTheta(0), |
186 | fQTheta(0x0), | |
df9db588 | 187 | fTriggerMask(trigMask), |
27346f69 | 188 | fFiredTriggers(), |
df9db588 | 189 | fRunNumber(nRun), |
190 | fRefMult(refMult), | |
191 | fRefMultPos(refMultPos), | |
192 | fRefMultNeg(refMultNeg), | |
dba4ebde | 193 | fNMuons(nMuons), |
194 | fNDimuons(nDimuons), | |
9333290e | 195 | fEventType(evttype), |
196 | fOrbitNumber(nOrbit), | |
197 | fPeriodNumber(nPeriod), | |
198 | fBunchCrossNumber(nBunchX), | |
e9f4e33d | 199 | fRefMultComb05(refMultComb05), |
200 | fRefMultComb08(refMultComb08), | |
0c6c629b | 201 | fTriggerCluster(trigClus), |
65b25288 | 202 | fDiamondZ(0.), |
0c6c629b | 203 | fDiamondSig2Z(0.), |
a5f7aba4 | 204 | fOfflineTrigger(0), |
205 | fESDFileName(""), | |
206 | fEventNumberESDFile(-1), | |
207 | fL0TriggerInputs(0), | |
208 | fL1TriggerInputs(0), | |
1d7d8ba7 | 209 | fL2TriggerInputs(0), |
f7ce7a37 | 210 | fTPConlyRefMult(-1), |
ce7adfe9 | 211 | fCentralityP(0), |
4ccebdba | 212 | fEventplaneP(0), |
213 | fIRInt2InteractionsMap(0), | |
214 | fIRInt1InteractionsMap(0) | |
df9db588 | 215 | { |
216 | // constructor | |
9ae2e5e6 | 217 | |
218 | SetName("header"); | |
219 | SetTitle(title); | |
a85132e7 | 220 | for(int j=0; j<2; j++) fZDCEMEnergy[j] = emEnergy[j]; |
613fc341 | 221 | for(Int_t i=0; i<2; i++) fDiamondXY[i]=0.; |
222 | fDiamondCovXY[0]=fDiamondCovXY[2]=3.*3.; | |
223 | fDiamondCovXY[1]=0.; | |
1aa76f71 | 224 | for (Int_t m=0; m<kNPHOSMatrix; m++) fPHOSMatrix[m]=NULL; |
225 | for (Int_t sm=0; sm<kNEMCALMatrix; sm++) fEMCALMatrix[sm]=NULL; | |
f7ce7a37 | 226 | for (Int_t i = 0; i < 6; i++) fITSClusters[i] = 0; |
5e14e698 | 227 | if (vzeroEqFactors) for (Int_t j=0; j<64; ++j) fVZEROEqFactors[j] = vzeroEqFactors[j]; |
949be341 | 228 | for (Int_t i=0; i<kT0SpreadSize;i++) fT0spread[i]=0; |
df9db588 | 229 | } |
230 | ||
231 | //______________________________________________________________________________ | |
232 | AliAODHeader::~AliAODHeader() | |
233 | { | |
234 | // destructor | |
1d7d8ba7 | 235 | delete fCentralityP; |
ce7adfe9 | 236 | delete fEventplaneP; |
ff254193 | 237 | RemoveQTheta(); |
df9db588 | 238 | } |
239 | ||
240 | //______________________________________________________________________________ | |
241 | AliAODHeader::AliAODHeader(const AliAODHeader& hdr) : | |
9ae2e5e6 | 242 | AliVHeader(hdr), |
df9db588 | 243 | fMagneticField(hdr.fMagneticField), |
6b6f8d32 | 244 | fMuonMagFieldScale(hdr.fMuonMagFieldScale), |
df9db588 | 245 | fCentrality(hdr.fCentrality), |
ce7adfe9 | 246 | fEventplane(hdr.fEventplane), |
c7d82ff7 | 247 | fEventplaneMag(hdr.fEventplaneMag), |
6b6f8d32 | 248 | fZDCN1Energy(hdr.fZDCN1Energy), |
249 | fZDCP1Energy(hdr.fZDCP1Energy), | |
250 | fZDCN2Energy(hdr.fZDCN2Energy), | |
251 | fZDCP2Energy(hdr.fZDCP2Energy), | |
ff254193 | 252 | fNQTheta(0), |
253 | fQTheta(0x0), | |
df9db588 | 254 | fTriggerMask(hdr.fTriggerMask), |
27346f69 | 255 | fFiredTriggers(hdr.fFiredTriggers), |
df9db588 | 256 | fRunNumber(hdr.fRunNumber), |
257 | fRefMult(hdr.fRefMult), | |
258 | fRefMultPos(hdr.fRefMultPos), | |
259 | fRefMultNeg(hdr.fRefMultNeg), | |
dba4ebde | 260 | fNMuons(hdr.fNMuons), |
261 | fNDimuons(hdr.fNDimuons), | |
9333290e | 262 | fEventType(hdr.fEventType), |
263 | fOrbitNumber(hdr.fOrbitNumber), | |
264 | fPeriodNumber(hdr.fPeriodNumber), | |
265 | fBunchCrossNumber(hdr.fBunchCrossNumber), | |
e9f4e33d | 266 | fRefMultComb05(hdr.fRefMultComb05), |
267 | fRefMultComb08(hdr.fRefMultComb08), | |
80a3f83f | 268 | fTriggerCluster(hdr.fTriggerCluster), |
269 | fDiamondZ(hdr.fDiamondZ), | |
0c6c629b | 270 | fDiamondSig2Z(hdr.fDiamondSig2Z), |
a5f7aba4 | 271 | fOfflineTrigger(hdr.fOfflineTrigger), |
272 | fESDFileName(hdr.fESDFileName), | |
273 | fEventNumberESDFile(hdr.fEventNumberESDFile), | |
274 | fL0TriggerInputs(hdr.fL0TriggerInputs), | |
275 | fL1TriggerInputs(hdr.fL1TriggerInputs), | |
1d7d8ba7 | 276 | fL2TriggerInputs(hdr.fL2TriggerInputs), |
f7ce7a37 | 277 | fTPConlyRefMult(hdr.fTPConlyRefMult), |
ce7adfe9 | 278 | fCentralityP(new AliCentrality(*hdr.fCentralityP)), |
4ccebdba | 279 | fEventplaneP(new AliEventplane(*hdr.fEventplaneP)), |
280 | fIRInt2InteractionsMap(hdr.fIRInt2InteractionsMap), | |
281 | fIRInt1InteractionsMap(hdr.fIRInt1InteractionsMap) | |
df9db588 | 282 | { |
283 | // Copy constructor. | |
9ae2e5e6 | 284 | |
285 | SetName(hdr.fName); | |
286 | SetTitle(hdr.fTitle); | |
ff254193 | 287 | SetQTheta(hdr.fQTheta, hdr.fNQTheta); |
a85132e7 | 288 | SetZDCEMEnergy(hdr.fZDCEMEnergy[0], hdr.fZDCEMEnergy[1]); |
613fc341 | 289 | for(Int_t i=0; i<2; i++) fDiamondXY[i]=hdr.fDiamondXY[i]; |
290 | for(Int_t i=0; i<3; i++) fDiamondCovXY[i]=hdr.fDiamondCovXY[i]; | |
1aa76f71 | 291 | |
292 | ||
293 | for(Int_t m=0; m<kNPHOSMatrix; m++){ | |
294 | if(hdr.fPHOSMatrix[m]) | |
295 | fPHOSMatrix[m]=new TGeoHMatrix(*(hdr.fPHOSMatrix[m])) ; | |
296 | else | |
297 | fPHOSMatrix[m]=0; | |
298 | } | |
299 | ||
300 | for(Int_t sm=0; sm<kNEMCALMatrix; sm++){ | |
301 | if(hdr.fEMCALMatrix[sm]) | |
302 | fEMCALMatrix[sm]=new TGeoHMatrix(*(hdr.fEMCALMatrix[sm])) ; | |
303 | else | |
304 | fEMCALMatrix[sm]=0; | |
305 | } | |
f7ce7a37 | 306 | for (Int_t i = 0; i < 6; i++) fITSClusters[i] = hdr.fITSClusters[i]; |
5e14e698 | 307 | for (Int_t j=0; j<64; ++j) fVZEROEqFactors[j]=hdr.fVZEROEqFactors[j]; |
949be341 | 308 | for (Int_t i=0; i<kT0SpreadSize;i++) fT0spread[i]=hdr.fT0spread[i]; |
309 | ||
df9db588 | 310 | } |
311 | ||
312 | //______________________________________________________________________________ | |
313 | AliAODHeader& AliAODHeader::operator=(const AliAODHeader& hdr) | |
314 | { | |
315 | // Assignment operator | |
316 | if(this!=&hdr) { | |
6b6f8d32 | 317 | |
9ae2e5e6 | 318 | AliVHeader::operator=(hdr); |
df9db588 | 319 | |
31fd97b2 | 320 | fMagneticField = hdr.fMagneticField; |
6b6f8d32 | 321 | fMuonMagFieldScale= hdr.fMuonMagFieldScale; |
31fd97b2 | 322 | fCentrality = hdr.fCentrality; |
ce7adfe9 | 323 | fEventplane = hdr.fEventplane; |
c7d82ff7 | 324 | fEventplaneMag = hdr.fEventplaneMag; |
6b6f8d32 | 325 | fZDCN1Energy = hdr.fZDCN1Energy; |
326 | fZDCP1Energy = hdr.fZDCP1Energy; | |
327 | fZDCN2Energy = hdr.fZDCN2Energy; | |
328 | fZDCP2Energy = hdr.fZDCP2Energy; | |
31fd97b2 | 329 | fTriggerMask = hdr.fTriggerMask; |
27346f69 | 330 | fFiredTriggers = hdr.fFiredTriggers; |
31fd97b2 | 331 | fRunNumber = hdr.fRunNumber; |
332 | fRefMult = hdr.fRefMult; | |
333 | fRefMultPos = hdr.fRefMultPos; | |
334 | fRefMultNeg = hdr.fRefMultNeg; | |
9333290e | 335 | fEventType = hdr.fEventType; |
336 | fOrbitNumber = hdr.fOrbitNumber; | |
337 | fPeriodNumber = hdr.fPeriodNumber; | |
338 | fBunchCrossNumber = hdr.fBunchCrossNumber; | |
e9f4e33d | 339 | fRefMultComb05 = hdr.fRefMultComb05; |
340 | fRefMultComb08 = hdr.fRefMultComb08; | |
341 | ||
31fd97b2 | 342 | fTriggerCluster = hdr.fTriggerCluster; |
fa8b0e56 | 343 | fNMuons = hdr.fNMuons; |
344 | fNDimuons = hdr.fNDimuons; | |
0c6c629b | 345 | fDiamondZ = hdr.fDiamondZ; |
346 | fDiamondSig2Z = hdr.fDiamondSig2Z; | |
347 | fOfflineTrigger = hdr.fOfflineTrigger; | |
a5f7aba4 | 348 | fESDFileName = hdr.fESDFileName; |
349 | fEventNumberESDFile = hdr.fEventNumberESDFile; | |
350 | fL0TriggerInputs = hdr.fL0TriggerInputs; | |
351 | fL1TriggerInputs = hdr.fL1TriggerInputs; | |
352 | fL2TriggerInputs = hdr.fL2TriggerInputs; | |
f7ce7a37 | 353 | fTPConlyRefMult = hdr.fTPConlyRefMult; |
72d97d56 | 354 | |
4ccebdba | 355 | fIRInt2InteractionsMap = hdr.fIRInt2InteractionsMap; |
356 | fIRInt1InteractionsMap = hdr.fIRInt1InteractionsMap; | |
357 | ||
72d97d56 | 358 | if(hdr.fEventplaneP){ |
359 | if(fEventplaneP)*fEventplaneP = *hdr.fEventplaneP; | |
360 | else fEventplaneP = new AliEventplane(*hdr.fEventplaneP); | |
361 | } | |
ff254193 | 362 | |
2a77025d | 363 | if(hdr.fCentralityP){ |
364 | if(fCentralityP)*fCentralityP = *hdr.fCentralityP; | |
365 | else fCentralityP = new AliCentrality(*hdr.fCentralityP); | |
366 | } | |
367 | ||
ff254193 | 368 | SetName(hdr.fName); |
369 | SetTitle(hdr.fTitle); | |
370 | SetQTheta(hdr.fQTheta, hdr.fNQTheta); | |
a85132e7 | 371 | SetZDCEMEnergy(hdr.fZDCEMEnergy[0], hdr.fZDCEMEnergy[1]); |
613fc341 | 372 | for(Int_t i=0; i<2; i++) fDiamondXY[i]=hdr.fDiamondXY[i]; |
373 | for(Int_t i=0; i<3; i++) fDiamondCovXY[i]=hdr.fDiamondCovXY[i]; | |
1aa76f71 | 374 | |
375 | for(Int_t m=0; m<kNPHOSMatrix; m++){ | |
2a77025d | 376 | if(hdr.fPHOSMatrix[m]){ |
377 | if(fPHOSMatrix[m])delete fPHOSMatrix[m]; | |
378 | fPHOSMatrix[m]=new TGeoHMatrix(*(hdr.fPHOSMatrix[m])) ; | |
379 | } | |
380 | else | |
381 | fPHOSMatrix[m]=0; | |
1aa76f71 | 382 | } |
383 | ||
384 | for(Int_t sm=0; sm<kNEMCALMatrix; sm++){ | |
2a77025d | 385 | if(hdr.fEMCALMatrix[sm]){ |
386 | if(fEMCALMatrix[sm])delete fEMCALMatrix[sm]; | |
387 | fEMCALMatrix[sm]=new TGeoHMatrix(*(hdr.fEMCALMatrix[sm])) ; | |
388 | } | |
389 | else | |
390 | fEMCALMatrix[sm]=0; | |
391 | } | |
392 | ||
df9db588 | 393 | } |
394 | ||
f7ce7a37 | 395 | for (Int_t i = 0; i < 6; i++) fITSClusters[i] = hdr.fITSClusters[i]; |
5e14e698 | 396 | for (Int_t j=0; j<64; ++j) fVZEROEqFactors[j] = hdr.fVZEROEqFactors[j]; |
949be341 | 397 | for (Int_t i=0; i<kT0SpreadSize;i++) fT0spread[i]=hdr.fT0spread[i]; |
398 | ||
df9db588 | 399 | return *this; |
400 | } | |
401 | ||
ff254193 | 402 | //______________________________________________________________________________ |
403 | void AliAODHeader::SetQTheta(Double_t *QTheta, UInt_t size) | |
404 | { | |
405 | if (QTheta && size>0) { | |
406 | if (size != (UInt_t)fNQTheta) { | |
407 | RemoveQTheta(); | |
408 | fNQTheta = size; | |
409 | fQTheta = new Double_t[fNQTheta]; | |
410 | } | |
411 | ||
412 | for (Int_t i = 0; i < fNQTheta; i++) { | |
413 | fQTheta[i] = QTheta[i]; | |
414 | } | |
415 | } else { | |
416 | RemoveQTheta(); | |
417 | } | |
418 | ||
419 | return; | |
420 | } | |
421 | ||
422 | //______________________________________________________________________________ | |
423 | Double_t AliAODHeader::GetQTheta(UInt_t i) const | |
424 | { | |
425 | if (fQTheta && i < (UInt_t)fNQTheta) { | |
426 | return fQTheta[i]; | |
427 | } else { | |
428 | return -999.; | |
429 | } | |
430 | } | |
431 | ||
432 | //______________________________________________________________________________ | |
433 | void AliAODHeader::RemoveQTheta() | |
434 | { | |
435 | delete[] fQTheta; | |
436 | fQTheta = 0x0; | |
437 | fNQTheta = 0; | |
438 | ||
439 | return; | |
440 | } | |
441 | ||
99dbf027 | 442 | void AliAODHeader::Clear(Option_t* /*opt*/) |
443 | { | |
5e6a3170 | 444 | // Clear memory |
99dbf027 | 445 | RemoveQTheta(); |
75a996ab | 446 | if (fCentralityP){ |
447 | delete fCentralityP; | |
448 | fCentralityP = 0; | |
449 | fCentrality = -999; | |
450 | } | |
ce7adfe9 | 451 | if (fEventplaneP){ |
452 | delete fEventplaneP; | |
453 | fEventplaneP = 0; | |
454 | fEventplane = -999; | |
c7d82ff7 | 455 | fEventplaneMag = -999.; |
ce7adfe9 | 456 | } |
99dbf027 | 457 | return; |
458 | } | |
459 | ||
df9db588 | 460 | //______________________________________________________________________________ |
461 | void AliAODHeader::Print(Option_t* /*option*/) const | |
462 | { | |
463 | // prints event information | |
464 | ||
df9db588 | 465 | printf("Run # : %d\n", fRunNumber); |
31fd97b2 | 466 | printf("Bunch Crossing # : %d\n", fBunchCrossNumber); |
467 | printf("Orbit Number # : %d\n", fOrbitNumber); | |
89cf15db | 468 | printf("Period Number # : %d\n", fPeriodNumber); |
df9db588 | 469 | printf("Trigger mask : %lld\n", fTriggerMask); |
470 | printf("Trigger cluster : %d\n", fTriggerCluster); | |
471 | printf("Event Type : %d\n", fEventType); | |
472 | printf("Magnetic field : %f\n", fMagneticField); | |
6b6f8d32 | 473 | printf("Muon mag. field scale : %f\n", fMuonMagFieldScale); |
df9db588 | 474 | |
475 | printf("Centrality : %f\n", fCentrality); | |
ce7adfe9 | 476 | printf("Event plane : %f\n", fEventplane); |
c7d82ff7 | 477 | printf("Event plane : %f\n", fEventplaneMag); |
6b6f8d32 | 478 | printf("ZDC N1 Energy : %f\n", fZDCN1Energy); |
479 | printf("ZDC P1 Energy : %f\n", fZDCP1Energy); | |
480 | printf("ZDC N2 Energy : %f\n", fZDCN2Energy); | |
481 | printf("ZDC P2 Energy : %f\n", fZDCP2Energy); | |
a85132e7 | 482 | printf("ZDC EM1 Energy : %f\n", fZDCEMEnergy[0]); |
483 | printf("ZDC EM2 Energy : %f\n", fZDCEMEnergy[1]); | |
df9db588 | 484 | printf("ref. Multiplicity : %d\n", fRefMult); |
485 | printf("ref. Multiplicity (pos) : %d\n", fRefMultPos); | |
486 | printf("ref. Multiplicity (neg) : %d\n", fRefMultNeg); | |
e9f4e33d | 487 | printf("ref. Mult.Comb |eta|<.5 : %d\n", fRefMultComb05); |
488 | printf("ref. Mult.Comb |eta|<.8 : %d\n", fRefMultComb08); | |
fa8b0e56 | 489 | printf("number of muons : %d\n", fNMuons); |
490 | printf("number of dimuons : %d\n", fNDimuons); | |
0c6c629b | 491 | printf("offline trigger : %u\n", fOfflineTrigger); |
df9db588 | 492 | |
ff254193 | 493 | if (fQTheta) { |
494 | for (UInt_t i = 0; i<(UInt_t)fNQTheta; i++) { | |
d067f357 | 495 | printf("QTheta[%d] : %13.3e\n", i, GetQTheta(i)); |
ff254193 | 496 | } |
497 | } | |
5e14e698 | 498 | printf("V0 Eq factors: "); |
499 | for (Int_t j=0; j<64; ++j) printf(" %.3f",fVZEROEqFactors[j]); | |
500 | printf("\n"); | |
ff254193 | 501 | |
502 | return; | |
df9db588 | 503 | } |
4ccebdba | 504 | |
505 | //__________________________________________________________________________ | |
506 | Int_t AliAODHeader::FindIRIntInteractionsBXMap(Int_t difference) | |
507 | { | |
508 | // | |
509 | // The mapping is of 181 bits, from -90 to +90 | |
510 | // | |
511 | Int_t bin=-1; | |
512 | ||
513 | if(difference<-90 || difference>90) return bin; | |
514 | else { bin = 90 + difference; } | |
515 | ||
516 | return bin; | |
517 | } | |
518 | ||
519 | //__________________________________________________________________________ | |
520 | Int_t AliAODHeader::GetIRInt2ClosestInteractionMap() | |
521 | { | |
522 | // | |
523 | // Calculation of the closest interaction | |
524 | // | |
525 | Int_t firstNegative=100; | |
526 | for(Int_t item=-1; item>=-90; item--) { | |
527 | Int_t bin = FindIRIntInteractionsBXMap(item); | |
528 | Bool_t isFired = fIRInt2InteractionsMap.TestBitNumber(bin); | |
529 | if(isFired) { | |
530 | firstNegative = item; | |
531 | break; | |
532 | } | |
533 | } | |
534 | Int_t firstPositive=100; | |
535 | for(Int_t item=1; item<=90; item++) { | |
536 | Int_t bin = FindIRIntInteractionsBXMap(item); | |
537 | Bool_t isFired = fIRInt2InteractionsMap.TestBitNumber(bin); | |
538 | if(isFired) { | |
539 | firstPositive = item; | |
540 | break; | |
541 | } | |
542 | } | |
543 | ||
544 | Int_t closest = firstPositive < TMath::Abs(firstNegative) ? firstPositive : TMath::Abs(firstNegative); | |
545 | if(firstPositive==100 && firstNegative==100) closest=0; | |
546 | return closest; | |
547 | } | |
548 | ||
549 | //__________________________________________________________________________ | |
550 | Int_t AliAODHeader::GetIRInt2LastInteractionMap() | |
551 | { | |
552 | // | |
553 | // Calculation of the last interaction | |
554 | // | |
555 | Int_t lastNegative=0; | |
556 | for(Int_t item=-90; item<=-1; item++) { | |
557 | Int_t bin = FindIRIntInteractionsBXMap(item); | |
558 | Bool_t isFired = fIRInt2InteractionsMap.TestBitNumber(bin); | |
559 | if(isFired) { | |
560 | lastNegative = item; | |
561 | break; | |
562 | } | |
563 | } | |
564 | Int_t lastPositive=0; | |
565 | for(Int_t item=90; item>=1; item--) { | |
566 | Int_t bin = FindIRIntInteractionsBXMap(item); | |
567 | Bool_t isFired = fIRInt2InteractionsMap.TestBitNumber(bin); | |
568 | if(isFired) { | |
569 | lastPositive = item; | |
570 | break; | |
571 | } | |
572 | } | |
573 | ||
574 | Int_t last = lastPositive > TMath::Abs(lastNegative) ? lastPositive : TMath::Abs(lastNegative); | |
575 | return last; | |
576 | } |