]>
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), |
6b6f8d32 | 180 | fZDCN1Energy(n1Energy), |
181 | fZDCP1Energy(p1Energy), | |
182 | fZDCN2Energy(n2Energy), | |
183 | fZDCP2Energy(p2Energy), | |
ff254193 | 184 | fNQTheta(0), |
185 | fQTheta(0x0), | |
df9db588 | 186 | fTriggerMask(trigMask), |
27346f69 | 187 | fFiredTriggers(), |
df9db588 | 188 | fRunNumber(nRun), |
189 | fRefMult(refMult), | |
190 | fRefMultPos(refMultPos), | |
191 | fRefMultNeg(refMultNeg), | |
dba4ebde | 192 | fNMuons(nMuons), |
193 | fNDimuons(nDimuons), | |
9333290e | 194 | fEventType(evttype), |
195 | fOrbitNumber(nOrbit), | |
196 | fPeriodNumber(nPeriod), | |
197 | fBunchCrossNumber(nBunchX), | |
e9f4e33d | 198 | fRefMultComb05(refMultComb05), |
199 | fRefMultComb08(refMultComb08), | |
0c6c629b | 200 | fTriggerCluster(trigClus), |
65b25288 | 201 | fDiamondZ(0.), |
0c6c629b | 202 | fDiamondSig2Z(0.), |
a5f7aba4 | 203 | fOfflineTrigger(0), |
204 | fESDFileName(""), | |
205 | fEventNumberESDFile(-1), | |
206 | fL0TriggerInputs(0), | |
207 | fL1TriggerInputs(0), | |
1d7d8ba7 | 208 | fL2TriggerInputs(0), |
f7ce7a37 | 209 | fTPConlyRefMult(-1), |
ce7adfe9 | 210 | fCentralityP(0), |
4ccebdba | 211 | fEventplaneP(0), |
212 | fIRInt2InteractionsMap(0), | |
213 | fIRInt1InteractionsMap(0) | |
df9db588 | 214 | { |
215 | // constructor | |
9ae2e5e6 | 216 | |
217 | SetName("header"); | |
218 | SetTitle(title); | |
a85132e7 | 219 | for(int j=0; j<2; j++) fZDCEMEnergy[j] = emEnergy[j]; |
613fc341 | 220 | for(Int_t i=0; i<2; i++) fDiamondXY[i]=0.; |
221 | fDiamondCovXY[0]=fDiamondCovXY[2]=3.*3.; | |
222 | fDiamondCovXY[1]=0.; | |
1aa76f71 | 223 | for (Int_t m=0; m<kNPHOSMatrix; m++) fPHOSMatrix[m]=NULL; |
224 | for (Int_t sm=0; sm<kNEMCALMatrix; sm++) fEMCALMatrix[sm]=NULL; | |
f7ce7a37 | 225 | for (Int_t i = 0; i < 6; i++) fITSClusters[i] = 0; |
5e14e698 | 226 | if (vzeroEqFactors) for (Int_t j=0; j<64; ++j) fVZEROEqFactors[j] = vzeroEqFactors[j]; |
949be341 | 227 | for (Int_t i=0; i<kT0SpreadSize;i++) fT0spread[i]=0; |
df9db588 | 228 | } |
229 | ||
230 | //______________________________________________________________________________ | |
231 | AliAODHeader::~AliAODHeader() | |
232 | { | |
233 | // destructor | |
1d7d8ba7 | 234 | delete fCentralityP; |
ce7adfe9 | 235 | delete fEventplaneP; |
ff254193 | 236 | RemoveQTheta(); |
df9db588 | 237 | } |
238 | ||
239 | //______________________________________________________________________________ | |
240 | AliAODHeader::AliAODHeader(const AliAODHeader& hdr) : | |
9ae2e5e6 | 241 | AliVHeader(hdr), |
df9db588 | 242 | fMagneticField(hdr.fMagneticField), |
6b6f8d32 | 243 | fMuonMagFieldScale(hdr.fMuonMagFieldScale), |
df9db588 | 244 | fCentrality(hdr.fCentrality), |
ce7adfe9 | 245 | fEventplane(hdr.fEventplane), |
c7d82ff7 | 246 | fEventplaneMag(hdr.fEventplaneMag), |
6b6f8d32 | 247 | fZDCN1Energy(hdr.fZDCN1Energy), |
248 | fZDCP1Energy(hdr.fZDCP1Energy), | |
249 | fZDCN2Energy(hdr.fZDCN2Energy), | |
250 | fZDCP2Energy(hdr.fZDCP2Energy), | |
ff254193 | 251 | fNQTheta(0), |
252 | fQTheta(0x0), | |
df9db588 | 253 | fTriggerMask(hdr.fTriggerMask), |
27346f69 | 254 | fFiredTriggers(hdr.fFiredTriggers), |
df9db588 | 255 | fRunNumber(hdr.fRunNumber), |
256 | fRefMult(hdr.fRefMult), | |
257 | fRefMultPos(hdr.fRefMultPos), | |
258 | fRefMultNeg(hdr.fRefMultNeg), | |
dba4ebde | 259 | fNMuons(hdr.fNMuons), |
260 | fNDimuons(hdr.fNDimuons), | |
9333290e | 261 | fEventType(hdr.fEventType), |
262 | fOrbitNumber(hdr.fOrbitNumber), | |
263 | fPeriodNumber(hdr.fPeriodNumber), | |
264 | fBunchCrossNumber(hdr.fBunchCrossNumber), | |
e9f4e33d | 265 | fRefMultComb05(hdr.fRefMultComb05), |
266 | fRefMultComb08(hdr.fRefMultComb08), | |
80a3f83f | 267 | fTriggerCluster(hdr.fTriggerCluster), |
268 | fDiamondZ(hdr.fDiamondZ), | |
0c6c629b | 269 | fDiamondSig2Z(hdr.fDiamondSig2Z), |
a5f7aba4 | 270 | fOfflineTrigger(hdr.fOfflineTrigger), |
271 | fESDFileName(hdr.fESDFileName), | |
272 | fEventNumberESDFile(hdr.fEventNumberESDFile), | |
273 | fL0TriggerInputs(hdr.fL0TriggerInputs), | |
274 | fL1TriggerInputs(hdr.fL1TriggerInputs), | |
1d7d8ba7 | 275 | fL2TriggerInputs(hdr.fL2TriggerInputs), |
f7ce7a37 | 276 | fTPConlyRefMult(hdr.fTPConlyRefMult), |
ce7adfe9 | 277 | fCentralityP(new AliCentrality(*hdr.fCentralityP)), |
4ccebdba | 278 | fEventplaneP(new AliEventplane(*hdr.fEventplaneP)), |
279 | fIRInt2InteractionsMap(hdr.fIRInt2InteractionsMap), | |
280 | fIRInt1InteractionsMap(hdr.fIRInt1InteractionsMap) | |
df9db588 | 281 | { |
282 | // Copy constructor. | |
9ae2e5e6 | 283 | |
284 | SetName(hdr.fName); | |
285 | SetTitle(hdr.fTitle); | |
ff254193 | 286 | SetQTheta(hdr.fQTheta, hdr.fNQTheta); |
a85132e7 | 287 | SetZDCEMEnergy(hdr.fZDCEMEnergy[0], hdr.fZDCEMEnergy[1]); |
613fc341 | 288 | for(Int_t i=0; i<2; i++) fDiamondXY[i]=hdr.fDiamondXY[i]; |
289 | for(Int_t i=0; i<3; i++) fDiamondCovXY[i]=hdr.fDiamondCovXY[i]; | |
1aa76f71 | 290 | |
291 | ||
292 | for(Int_t m=0; m<kNPHOSMatrix; m++){ | |
293 | if(hdr.fPHOSMatrix[m]) | |
294 | fPHOSMatrix[m]=new TGeoHMatrix(*(hdr.fPHOSMatrix[m])) ; | |
295 | else | |
296 | fPHOSMatrix[m]=0; | |
297 | } | |
298 | ||
299 | for(Int_t sm=0; sm<kNEMCALMatrix; sm++){ | |
300 | if(hdr.fEMCALMatrix[sm]) | |
301 | fEMCALMatrix[sm]=new TGeoHMatrix(*(hdr.fEMCALMatrix[sm])) ; | |
302 | else | |
303 | fEMCALMatrix[sm]=0; | |
304 | } | |
f7ce7a37 | 305 | for (Int_t i = 0; i < 6; i++) fITSClusters[i] = hdr.fITSClusters[i]; |
5e14e698 | 306 | for (Int_t j=0; j<64; ++j) fVZEROEqFactors[j]=hdr.fVZEROEqFactors[j]; |
949be341 | 307 | for (Int_t i=0; i<kT0SpreadSize;i++) fT0spread[i]=hdr.fT0spread[i]; |
308 | ||
df9db588 | 309 | } |
310 | ||
311 | //______________________________________________________________________________ | |
312 | AliAODHeader& AliAODHeader::operator=(const AliAODHeader& hdr) | |
313 | { | |
314 | // Assignment operator | |
315 | if(this!=&hdr) { | |
6b6f8d32 | 316 | |
9ae2e5e6 | 317 | AliVHeader::operator=(hdr); |
df9db588 | 318 | |
31fd97b2 | 319 | fMagneticField = hdr.fMagneticField; |
6b6f8d32 | 320 | fMuonMagFieldScale= hdr.fMuonMagFieldScale; |
31fd97b2 | 321 | fCentrality = hdr.fCentrality; |
ce7adfe9 | 322 | fEventplane = hdr.fEventplane; |
c7d82ff7 | 323 | fEventplaneMag = hdr.fEventplaneMag; |
6b6f8d32 | 324 | fZDCN1Energy = hdr.fZDCN1Energy; |
325 | fZDCP1Energy = hdr.fZDCP1Energy; | |
326 | fZDCN2Energy = hdr.fZDCN2Energy; | |
327 | fZDCP2Energy = hdr.fZDCP2Energy; | |
31fd97b2 | 328 | fTriggerMask = hdr.fTriggerMask; |
27346f69 | 329 | fFiredTriggers = hdr.fFiredTriggers; |
31fd97b2 | 330 | fRunNumber = hdr.fRunNumber; |
331 | fRefMult = hdr.fRefMult; | |
332 | fRefMultPos = hdr.fRefMultPos; | |
333 | fRefMultNeg = hdr.fRefMultNeg; | |
9333290e | 334 | fEventType = hdr.fEventType; |
335 | fOrbitNumber = hdr.fOrbitNumber; | |
336 | fPeriodNumber = hdr.fPeriodNumber; | |
337 | fBunchCrossNumber = hdr.fBunchCrossNumber; | |
e9f4e33d | 338 | fRefMultComb05 = hdr.fRefMultComb05; |
339 | fRefMultComb08 = hdr.fRefMultComb08; | |
340 | ||
31fd97b2 | 341 | fTriggerCluster = hdr.fTriggerCluster; |
fa8b0e56 | 342 | fNMuons = hdr.fNMuons; |
343 | fNDimuons = hdr.fNDimuons; | |
0c6c629b | 344 | fDiamondZ = hdr.fDiamondZ; |
345 | fDiamondSig2Z = hdr.fDiamondSig2Z; | |
346 | fOfflineTrigger = hdr.fOfflineTrigger; | |
a5f7aba4 | 347 | fESDFileName = hdr.fESDFileName; |
348 | fEventNumberESDFile = hdr.fEventNumberESDFile; | |
349 | fL0TriggerInputs = hdr.fL0TriggerInputs; | |
350 | fL1TriggerInputs = hdr.fL1TriggerInputs; | |
351 | fL2TriggerInputs = hdr.fL2TriggerInputs; | |
f7ce7a37 | 352 | fTPConlyRefMult = hdr.fTPConlyRefMult; |
72d97d56 | 353 | |
4ccebdba | 354 | fIRInt2InteractionsMap = hdr.fIRInt2InteractionsMap; |
355 | fIRInt1InteractionsMap = hdr.fIRInt1InteractionsMap; | |
356 | ||
72d97d56 | 357 | if(hdr.fEventplaneP){ |
358 | if(fEventplaneP)*fEventplaneP = *hdr.fEventplaneP; | |
359 | else fEventplaneP = new AliEventplane(*hdr.fEventplaneP); | |
360 | } | |
ff254193 | 361 | |
2a77025d | 362 | if(hdr.fCentralityP){ |
363 | if(fCentralityP)*fCentralityP = *hdr.fCentralityP; | |
364 | else fCentralityP = new AliCentrality(*hdr.fCentralityP); | |
365 | } | |
366 | ||
ff254193 | 367 | SetName(hdr.fName); |
368 | SetTitle(hdr.fTitle); | |
369 | SetQTheta(hdr.fQTheta, hdr.fNQTheta); | |
a85132e7 | 370 | SetZDCEMEnergy(hdr.fZDCEMEnergy[0], hdr.fZDCEMEnergy[1]); |
613fc341 | 371 | for(Int_t i=0; i<2; i++) fDiamondXY[i]=hdr.fDiamondXY[i]; |
372 | for(Int_t i=0; i<3; i++) fDiamondCovXY[i]=hdr.fDiamondCovXY[i]; | |
1aa76f71 | 373 | |
374 | for(Int_t m=0; m<kNPHOSMatrix; m++){ | |
2a77025d | 375 | if(hdr.fPHOSMatrix[m]){ |
376 | if(fPHOSMatrix[m])delete fPHOSMatrix[m]; | |
377 | fPHOSMatrix[m]=new TGeoHMatrix(*(hdr.fPHOSMatrix[m])) ; | |
378 | } | |
379 | else | |
380 | fPHOSMatrix[m]=0; | |
1aa76f71 | 381 | } |
382 | ||
383 | for(Int_t sm=0; sm<kNEMCALMatrix; sm++){ | |
2a77025d | 384 | if(hdr.fEMCALMatrix[sm]){ |
385 | if(fEMCALMatrix[sm])delete fEMCALMatrix[sm]; | |
386 | fEMCALMatrix[sm]=new TGeoHMatrix(*(hdr.fEMCALMatrix[sm])) ; | |
387 | } | |
388 | else | |
389 | fEMCALMatrix[sm]=0; | |
390 | } | |
391 | ||
df9db588 | 392 | } |
393 | ||
f7ce7a37 | 394 | for (Int_t i = 0; i < 6; i++) fITSClusters[i] = hdr.fITSClusters[i]; |
5e14e698 | 395 | for (Int_t j=0; j<64; ++j) fVZEROEqFactors[j] = hdr.fVZEROEqFactors[j]; |
949be341 | 396 | for (Int_t i=0; i<kT0SpreadSize;i++) fT0spread[i]=hdr.fT0spread[i]; |
397 | ||
df9db588 | 398 | return *this; |
399 | } | |
400 | ||
ff254193 | 401 | //______________________________________________________________________________ |
402 | void AliAODHeader::SetQTheta(Double_t *QTheta, UInt_t size) | |
403 | { | |
404 | if (QTheta && size>0) { | |
405 | if (size != (UInt_t)fNQTheta) { | |
406 | RemoveQTheta(); | |
407 | fNQTheta = size; | |
408 | fQTheta = new Double_t[fNQTheta]; | |
409 | } | |
410 | ||
411 | for (Int_t i = 0; i < fNQTheta; i++) { | |
412 | fQTheta[i] = QTheta[i]; | |
413 | } | |
414 | } else { | |
415 | RemoveQTheta(); | |
416 | } | |
417 | ||
418 | return; | |
419 | } | |
420 | ||
421 | //______________________________________________________________________________ | |
422 | Double_t AliAODHeader::GetQTheta(UInt_t i) const | |
423 | { | |
424 | if (fQTheta && i < (UInt_t)fNQTheta) { | |
425 | return fQTheta[i]; | |
426 | } else { | |
427 | return -999.; | |
428 | } | |
429 | } | |
430 | ||
431 | //______________________________________________________________________________ | |
432 | void AliAODHeader::RemoveQTheta() | |
433 | { | |
434 | delete[] fQTheta; | |
435 | fQTheta = 0x0; | |
436 | fNQTheta = 0; | |
437 | ||
438 | return; | |
439 | } | |
440 | ||
99dbf027 | 441 | void AliAODHeader::Clear(Option_t* /*opt*/) |
442 | { | |
5e6a3170 | 443 | // Clear memory |
99dbf027 | 444 | RemoveQTheta(); |
75a996ab | 445 | if (fCentralityP){ |
446 | delete fCentralityP; | |
447 | fCentralityP = 0; | |
448 | fCentrality = -999; | |
449 | } | |
ce7adfe9 | 450 | if (fEventplaneP){ |
451 | delete fEventplaneP; | |
452 | fEventplaneP = 0; | |
453 | fEventplane = -999; | |
c7d82ff7 | 454 | fEventplaneMag = -999.; |
ce7adfe9 | 455 | } |
99dbf027 | 456 | return; |
457 | } | |
458 | ||
df9db588 | 459 | //______________________________________________________________________________ |
460 | void AliAODHeader::Print(Option_t* /*option*/) const | |
461 | { | |
462 | // prints event information | |
463 | ||
df9db588 | 464 | printf("Run # : %d\n", fRunNumber); |
31fd97b2 | 465 | printf("Bunch Crossing # : %d\n", fBunchCrossNumber); |
466 | printf("Orbit Number # : %d\n", fOrbitNumber); | |
89cf15db | 467 | printf("Period Number # : %d\n", fPeriodNumber); |
df9db588 | 468 | printf("Trigger mask : %lld\n", fTriggerMask); |
469 | printf("Trigger cluster : %d\n", fTriggerCluster); | |
470 | printf("Event Type : %d\n", fEventType); | |
471 | printf("Magnetic field : %f\n", fMagneticField); | |
6b6f8d32 | 472 | printf("Muon mag. field scale : %f\n", fMuonMagFieldScale); |
df9db588 | 473 | |
474 | printf("Centrality : %f\n", fCentrality); | |
ce7adfe9 | 475 | printf("Event plane : %f\n", fEventplane); |
c7d82ff7 | 476 | printf("Event plane : %f\n", fEventplaneMag); |
6b6f8d32 | 477 | printf("ZDC N1 Energy : %f\n", fZDCN1Energy); |
478 | printf("ZDC P1 Energy : %f\n", fZDCP1Energy); | |
479 | printf("ZDC N2 Energy : %f\n", fZDCN2Energy); | |
480 | printf("ZDC P2 Energy : %f\n", fZDCP2Energy); | |
a85132e7 | 481 | printf("ZDC EM1 Energy : %f\n", fZDCEMEnergy[0]); |
482 | printf("ZDC EM2 Energy : %f\n", fZDCEMEnergy[1]); | |
df9db588 | 483 | printf("ref. Multiplicity : %d\n", fRefMult); |
484 | printf("ref. Multiplicity (pos) : %d\n", fRefMultPos); | |
485 | printf("ref. Multiplicity (neg) : %d\n", fRefMultNeg); | |
e9f4e33d | 486 | printf("ref. Mult.Comb |eta|<.5 : %d\n", fRefMultComb05); |
487 | printf("ref. Mult.Comb |eta|<.8 : %d\n", fRefMultComb08); | |
fa8b0e56 | 488 | printf("number of muons : %d\n", fNMuons); |
489 | printf("number of dimuons : %d\n", fNDimuons); | |
0c6c629b | 490 | printf("offline trigger : %u\n", fOfflineTrigger); |
df9db588 | 491 | |
ff254193 | 492 | if (fQTheta) { |
493 | for (UInt_t i = 0; i<(UInt_t)fNQTheta; i++) { | |
d067f357 | 494 | printf("QTheta[%d] : %13.3e\n", i, GetQTheta(i)); |
ff254193 | 495 | } |
496 | } | |
5e14e698 | 497 | printf("V0 Eq factors: "); |
498 | for (Int_t j=0; j<64; ++j) printf(" %.3f",fVZEROEqFactors[j]); | |
499 | printf("\n"); | |
ff254193 | 500 | |
501 | return; | |
df9db588 | 502 | } |
4ccebdba | 503 | |
504 | //__________________________________________________________________________ | |
505 | Int_t AliAODHeader::FindIRIntInteractionsBXMap(Int_t difference) | |
506 | { | |
507 | // | |
508 | // The mapping is of 181 bits, from -90 to +90 | |
509 | // | |
510 | Int_t bin=-1; | |
511 | ||
512 | if(difference<-90 || difference>90) return bin; | |
513 | else { bin = 90 + difference; } | |
514 | ||
515 | return bin; | |
516 | } | |
517 | ||
518 | //__________________________________________________________________________ | |
519 | Int_t AliAODHeader::GetIRInt2ClosestInteractionMap() | |
520 | { | |
521 | // | |
522 | // Calculation of the closest interaction | |
523 | // | |
524 | Int_t firstNegative=100; | |
525 | for(Int_t item=-1; item>=-90; item--) { | |
526 | Int_t bin = FindIRIntInteractionsBXMap(item); | |
527 | Bool_t isFired = fIRInt2InteractionsMap.TestBitNumber(bin); | |
528 | if(isFired) { | |
529 | firstNegative = item; | |
530 | break; | |
531 | } | |
532 | } | |
533 | Int_t firstPositive=100; | |
534 | for(Int_t item=1; item<=90; item++) { | |
535 | Int_t bin = FindIRIntInteractionsBXMap(item); | |
536 | Bool_t isFired = fIRInt2InteractionsMap.TestBitNumber(bin); | |
537 | if(isFired) { | |
538 | firstPositive = item; | |
539 | break; | |
540 | } | |
541 | } | |
542 | ||
543 | Int_t closest = firstPositive < TMath::Abs(firstNegative) ? firstPositive : TMath::Abs(firstNegative); | |
544 | if(firstPositive==100 && firstNegative==100) closest=0; | |
545 | return closest; | |
546 | } | |
547 | ||
548 | //__________________________________________________________________________ | |
549 | Int_t AliAODHeader::GetIRInt2LastInteractionMap() | |
550 | { | |
551 | // | |
552 | // Calculation of the last interaction | |
553 | // | |
554 | Int_t lastNegative=0; | |
555 | for(Int_t item=-90; item<=-1; item++) { | |
556 | Int_t bin = FindIRIntInteractionsBXMap(item); | |
557 | Bool_t isFired = fIRInt2InteractionsMap.TestBitNumber(bin); | |
558 | if(isFired) { | |
559 | lastNegative = item; | |
560 | break; | |
561 | } | |
562 | } | |
563 | Int_t lastPositive=0; | |
564 | for(Int_t item=90; item>=1; item--) { | |
565 | Int_t bin = FindIRIntInteractionsBXMap(item); | |
566 | Bool_t isFired = fIRInt2InteractionsMap.TestBitNumber(bin); | |
567 | if(isFired) { | |
568 | lastPositive = item; | |
569 | break; | |
570 | } | |
571 | } | |
572 | ||
573 | Int_t last = lastPositive > TMath::Abs(lastNegative) ? lastPositive : TMath::Abs(lastNegative); | |
574 | return last; | |
575 | } |