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