]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/ESD/AliESDTZERO.cxx
Changes for #86407 commit in STEER and port to Release AliESDTZERO with pile-up analysis
[u/mrichter/AliRoot.git] / STEER / ESD / AliESDTZERO.cxx
CommitLineData
d5ebf00e 1/**************************************************************************
2 * Copyright(c) 1998-1999, 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//-------------------------------------------------------------------------
17// Implemenation Class AliESDTZERO
18// This is a class that summarizes the TZERO data for the ESD
19// Origin: Christian Klein-Boesing, CERN, Christian.Klein-Boesing@cern.ch
20//-------------------------------------------------------------------------
21
22
23
24#include "AliESDTZERO.h"
8f8d0732 25#include "AliLog.h"
d5ebf00e 26
27
28ClassImp(AliESDTZERO)
29
30//______________________________________________________________________________
31AliESDTZERO::AliESDTZERO() :
32 TObject(),
0f0c06de 33 fT0clock(0),
d5ebf00e 34 fT0zVertex(0),
adf36b9d 35 fT0timeStart(0),
b0e13b29 36 fT0trig(0),
37 fPileup(kFALSE),
f6ee5d2d 38 fSattelite(kFALSE),
39 fMultC(0),
ea1a8005 40 fMultA(0),
41 fBackground(0)
b0e13b29 42
d5ebf00e 43{
b0e13b29 44 for(int i = 0;i<24;i++) {
45 fT0time[i] = fT0amplitude[i] = 0;
46 for(Int_t iHit=0; iHit<5; iHit++) {
47 fTimeFull[i][iHit] = 0;
48 fOrA[iHit] = 0;
49 fOrC[iHit] = 0;
50 fTVDC[iHit] = 0;
51 }
52 }
adf36b9d 53 for(int i = 0;i<3;i++) fT0TOF[i]=0;
d5ebf00e 54}
b0e13b29 55//______________________________________________________________________________
d5ebf00e 56AliESDTZERO::AliESDTZERO(const AliESDTZERO &tzero ) :
57 TObject(tzero),
adf36b9d 58 fT0clock(tzero.fT0clock),
d5ebf00e 59 fT0zVertex(tzero.fT0zVertex),
d999f2e6 60 fT0timeStart(tzero.fT0timeStart),
b0e13b29 61 fT0trig(tzero.fT0trig),
f6ee5d2d 62 fPileup(tzero.fPileup),
63 fSattelite(tzero.fSattelite),
64 fMultC(tzero.fMultC),
ea1a8005 65 fMultA(tzero.fMultA),
66 fBackground(tzero.fBackground)
d5ebf00e 67{
68 // copy constuctor
adf36b9d 69 for(int i = 0;i<3;i++) fT0TOF[i] = tzero.fT0TOF[i];
70
d5ebf00e 71 for(int i = 0;i<24;i++){
72 fT0time[i] = tzero.fT0time[i];
73 fT0amplitude[i] = tzero.fT0amplitude[i];
b0e13b29 74 for(Int_t iHit=0; iHit<5; iHit++) {
75 fTimeFull[i][iHit] = tzero.fTimeFull[i][iHit];
76 fOrA[iHit] = tzero.fOrA[iHit];
77 fOrC[iHit] = tzero.fOrC[iHit];
78 fTVDC[iHit] = tzero.fTVDC[iHit];
79 }
d5ebf00e 80 }
81}
b0e13b29 82//______________________________________________________________________________
d5ebf00e 83AliESDTZERO& AliESDTZERO::operator=(const AliESDTZERO& tzero){
84 // assigmnent operator
85 if(this!=&tzero) {
86 TObject::operator=(tzero);
adf36b9d 87 fT0clock = tzero.fT0clock;
d5ebf00e 88 fT0zVertex = tzero.fT0zVertex;
b0e13b29 89 fT0timeStart = tzero.fT0timeStart;
8b176004 90 fPileup = tzero.fPileup;
91 fSattelite = tzero.fSattelite;
ea1a8005 92 fBackground = tzero.fBackground;
b0e13b29 93 fMultC = tzero.fMultC;
f6ee5d2d 94 fMultA = tzero.fMultA;
b0e13b29 95 fT0trig = tzero.fT0trig;
adf36b9d 96 for(int i = 0;i<3;i++) fT0TOF[i] = tzero.fT0TOF[i];
d5ebf00e 97 for(int i = 0;i<24;i++){
98 fT0time[i] = tzero.fT0time[i];
99 fT0amplitude[i] = tzero.fT0amplitude[i];
b0e13b29 100 for(Int_t iHit=0; iHit<5; iHit++) {
101 fTimeFull[i][iHit] = tzero.fTimeFull[i][iHit];
102 fOrA[iHit] = tzero.fOrA[iHit];
103 fOrC[iHit] = tzero.fOrC[iHit];
104 fTVDC[iHit] = tzero.fTVDC[iHit];
105 }
106 }
d5ebf00e 107 }
108 return *this;
109}
b0e13b29 110//______________________________________________________________________________
732a24fe 111void AliESDTZERO::Copy(TObject &obj) const {
112
113 // this overwrites the virtual TOBject::Copy()
114 // to allow run time copying without casting
115 // in AliESDEvent
116
117 if(this==&obj)return;
118 AliESDTZERO *robj = dynamic_cast<AliESDTZERO*>(&obj);
119 if(!robj)return; // not an AliESDTZERO
120 *robj = *this;
121
122}
123
124
d5ebf00e 125//______________________________________________________________________________
126void AliESDTZERO::Reset()
127{
128 // reset contents
adf36b9d 129 fT0clock=0;
d5ebf00e 130 fT0zVertex = 0;
131 fT0timeStart = 0;
b0e13b29 132 for(int i = 0;i<24;i++) {
133 fT0time[i] = fT0amplitude[i] = 0;
134 for(Int_t iHit=0; iHit<5; iHit++) fTimeFull[i][iHit] = -10000;
135 }
136 for(Int_t iHit=0; iHit<5; iHit++) fOrA[iHit] = fOrC[iHit] = fTVDC[iHit] = -10000;
137
adf36b9d 138 for(int i = 0;i<3;i++) fT0TOF[i] = 0;
d5ebf00e 139}
140
141//______________________________________________________________________________
142void AliESDTZERO::Print(const Option_t *) const
143{
144 // does noting fornow
8f8d0732 145 AliInfo(Form(" Vertex %f (T0A+T0C)/2 %f #channels T0signal %f ns OrA %f ns OrC %f \n",fT0zVertex, fT0timeStart, fT0TOF[0],fT0TOF[1],fT0TOF[2]));
adf36b9d 146
8f8d0732 147 Bool_t tr[5];
148 for (Int_t i=0; i<5; i++) tr[i] = fT0trig & (1<<i);
149 AliInfo(Form("T0 triggers %d %d %d %d %d",tr[0],tr[1],tr[2],tr[3],tr[4]));
adf36b9d 150
d5ebf00e 151}