]>
Commit | Line | Data |
---|---|---|
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 | ||
28 | ClassImp(AliESDTZERO) | |
29 | ||
30 | //______________________________________________________________________________ | |
31 | AliESDTZERO::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++) { | |
d43f1c80 | 47 | fTimeFull[i][iHit] = -9999; |
48 | if (i==0) fOrA[iHit] = -9999; | |
49 | if (i==0)fOrC[iHit] = -9999; | |
50 | if (i==0) fTVDC[iHit] = -9999; | |
b0e13b29 | 51 | } |
52 | } | |
d43f1c80 | 53 | for(Int_t iHit=0; iHit<6; iHit++) fPileupTime[iHit]= -9999; |
ce50812a | 54 | for(int i = 0;i<3;i++) { |
55 | fT0TOF[i] = -9999; | |
56 | fT0TOFbest[i] = -9999; | |
57 | } | |
d5ebf00e | 58 | } |
b0e13b29 | 59 | //______________________________________________________________________________ |
d5ebf00e | 60 | AliESDTZERO::AliESDTZERO(const AliESDTZERO &tzero ) : |
61 | TObject(tzero), | |
adf36b9d | 62 | fT0clock(tzero.fT0clock), |
d5ebf00e | 63 | fT0zVertex(tzero.fT0zVertex), |
d999f2e6 | 64 | fT0timeStart(tzero.fT0timeStart), |
b0e13b29 | 65 | fT0trig(tzero.fT0trig), |
f6ee5d2d | 66 | fPileup(tzero.fPileup), |
67 | fSattelite(tzero.fSattelite), | |
68 | fMultC(tzero.fMultC), | |
ea1a8005 | 69 | fMultA(tzero.fMultA), |
70 | fBackground(tzero.fBackground) | |
d5ebf00e | 71 | { |
72 | // copy constuctor | |
ce50812a | 73 | for(int i = 0;i<3;i++) { |
74 | fT0TOF[i] = tzero.fT0TOF[i]; | |
75 | fT0TOFbest[i] = tzero.fT0TOFbest[i]; | |
76 | } | |
d43f1c80 | 77 | for(int iHit=0; iHit<6; iHit++) fPileupTime[iHit] = tzero.fPileupTime[iHit]; |
d5ebf00e | 78 | for(int i = 0;i<24;i++){ |
79 | fT0time[i] = tzero.fT0time[i]; | |
80 | fT0amplitude[i] = tzero.fT0amplitude[i]; | |
b0e13b29 | 81 | for(Int_t iHit=0; iHit<5; iHit++) { |
82 | fTimeFull[i][iHit] = tzero.fTimeFull[i][iHit]; | |
d43f1c80 | 83 | if (i==0) fOrA[iHit] = tzero.fOrA[iHit]; |
84 | if (i==0) fOrC[iHit] = tzero.fOrC[iHit]; | |
85 | if (i==0) fTVDC[iHit] = tzero.fTVDC[iHit]; | |
b0e13b29 | 86 | } |
d5ebf00e | 87 | } |
88 | } | |
b0e13b29 | 89 | //______________________________________________________________________________ |
d5ebf00e | 90 | AliESDTZERO& AliESDTZERO::operator=(const AliESDTZERO& tzero){ |
91 | // assigmnent operator | |
92 | if(this!=&tzero) { | |
93 | TObject::operator=(tzero); | |
adf36b9d | 94 | fT0clock = tzero.fT0clock; |
d5ebf00e | 95 | fT0zVertex = tzero.fT0zVertex; |
b0e13b29 | 96 | fT0timeStart = tzero.fT0timeStart; |
8b176004 | 97 | fPileup = tzero.fPileup; |
98 | fSattelite = tzero.fSattelite; | |
ea1a8005 | 99 | fBackground = tzero.fBackground; |
b0e13b29 | 100 | fMultC = tzero.fMultC; |
f6ee5d2d | 101 | fMultA = tzero.fMultA; |
b0e13b29 | 102 | fT0trig = tzero.fT0trig; |
ce50812a | 103 | for(int i = 0;i<3;i++) { |
104 | fT0TOF[i] = tzero.fT0TOF[i]; | |
105 | fT0TOFbest[i] = tzero.fT0TOFbest[i]; | |
106 | } | |
107 | ||
d43f1c80 | 108 | for(int iHit=0; iHit<6; iHit++) fPileupTime[iHit] = tzero.fPileupTime[iHit]; |
d5ebf00e | 109 | for(int i = 0;i<24;i++){ |
110 | fT0time[i] = tzero.fT0time[i]; | |
111 | fT0amplitude[i] = tzero.fT0amplitude[i]; | |
b0e13b29 | 112 | for(Int_t iHit=0; iHit<5; iHit++) { |
113 | fTimeFull[i][iHit] = tzero.fTimeFull[i][iHit]; | |
d43f1c80 | 114 | if (i==0) fOrA[iHit] = tzero.fOrA[iHit]; |
115 | if (i==0) fOrC[iHit] = tzero.fOrC[iHit]; | |
116 | if (i==0) fTVDC[iHit] = tzero.fTVDC[iHit]; | |
117 | } | |
b0e13b29 | 118 | } |
d5ebf00e | 119 | } |
120 | return *this; | |
121 | } | |
b0e13b29 | 122 | //______________________________________________________________________________ |
732a24fe | 123 | void AliESDTZERO::Copy(TObject &obj) const { |
124 | ||
125 | // this overwrites the virtual TOBject::Copy() | |
126 | // to allow run time copying without casting | |
127 | // in AliESDEvent | |
128 | ||
129 | if(this==&obj)return; | |
130 | AliESDTZERO *robj = dynamic_cast<AliESDTZERO*>(&obj); | |
131 | if(!robj)return; // not an AliESDTZERO | |
132 | *robj = *this; | |
133 | ||
134 | } | |
135 | ||
136 | ||
d5ebf00e | 137 | //______________________________________________________________________________ |
138 | void AliESDTZERO::Reset() | |
139 | { | |
140 | // reset contents | |
adf36b9d | 141 | fT0clock=0; |
d43f1c80 | 142 | fT0zVertex = -9999; |
d5ebf00e | 143 | fT0timeStart = 0; |
b0e13b29 | 144 | for(int i = 0;i<24;i++) { |
145 | fT0time[i] = fT0amplitude[i] = 0; | |
d43f1c80 | 146 | for(Int_t iHit=0; iHit<5; iHit++) fTimeFull[i][iHit] = -9999; |
b0e13b29 | 147 | } |
d43f1c80 | 148 | for(Int_t iHit=0; iHit<5; iHit++) fOrA[iHit] = fOrC[iHit] = fTVDC[iHit] = -9999; |
149 | for(Int_t iHit=0; iHit<6; iHit++) fPileupTime[iHit]= -9999; | |
ce50812a | 150 | for(int i = 0;i<3;i++) { |
151 | fT0TOF[i] = -9999; | |
152 | fT0TOFbest[i] = -9999; | |
153 | } | |
d5ebf00e | 154 | } |
155 | ||
156 | //______________________________________________________________________________ | |
157 | void AliESDTZERO::Print(const Option_t *) const | |
158 | { | |
159 | // does noting fornow | |
8f8d0732 | 160 | 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 | 161 | |
8f8d0732 | 162 | Bool_t tr[5]; |
163 | for (Int_t i=0; i<5; i++) tr[i] = fT0trig & (1<<i); | |
164 | AliInfo(Form("T0 triggers %d %d %d %d %d",tr[0],tr[1],tr[2],tr[3],tr[4])); | |
adf36b9d | 165 | |
d5ebf00e | 166 | } |