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