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