]>
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" | |
25 | ||
26 | ||
27 | ClassImp(AliESDTZERO) | |
28 | ||
29 | //______________________________________________________________________________ | |
30 | AliESDTZERO::AliESDTZERO() : | |
31 | TObject(), | |
0f0c06de | 32 | fT0clock(0), |
d5ebf00e | 33 | fT0zVertex(0), |
adf36b9d | 34 | fT0timeStart(0), |
35 | fT0trig(0) | |
d5ebf00e | 36 | { |
37 | for(int i = 0;i<24;i++)fT0time[i] = fT0amplitude[i] = 0; | |
adf36b9d | 38 | for(int i = 0;i<3;i++) fT0TOF[i]=0; |
d5ebf00e | 39 | } |
40 | ||
41 | AliESDTZERO::AliESDTZERO(const AliESDTZERO &tzero ) : | |
42 | TObject(tzero), | |
adf36b9d | 43 | fT0clock(tzero.fT0clock), |
d5ebf00e | 44 | fT0zVertex(tzero.fT0zVertex), |
d999f2e6 | 45 | fT0timeStart(tzero.fT0timeStart), |
46 | fT0trig(tzero.fT0trig) | |
d5ebf00e | 47 | { |
48 | // copy constuctor | |
adf36b9d | 49 | for(int i = 0;i<3;i++) fT0TOF[i] = tzero.fT0TOF[i]; |
50 | ||
d5ebf00e | 51 | for(int i = 0;i<24;i++){ |
52 | fT0time[i] = tzero.fT0time[i]; | |
53 | fT0amplitude[i] = tzero.fT0amplitude[i]; | |
54 | } | |
55 | } | |
56 | ||
57 | AliESDTZERO& AliESDTZERO::operator=(const AliESDTZERO& tzero){ | |
58 | // assigmnent operator | |
59 | if(this!=&tzero) { | |
60 | TObject::operator=(tzero); | |
adf36b9d | 61 | fT0clock = tzero.fT0clock; |
d5ebf00e | 62 | fT0zVertex = tzero.fT0zVertex; |
63 | fT0timeStart = tzero.fT0timeStart; | |
adf36b9d | 64 | for(int i = 0;i<3;i++) fT0TOF[i] = tzero.fT0TOF[i]; |
d5ebf00e | 65 | for(int i = 0;i<24;i++){ |
66 | fT0time[i] = tzero.fT0time[i]; | |
67 | fT0amplitude[i] = tzero.fT0amplitude[i]; | |
68 | } | |
69 | } | |
70 | return *this; | |
71 | } | |
72 | ||
732a24fe | 73 | void AliESDTZERO::Copy(TObject &obj) const { |
74 | ||
75 | // this overwrites the virtual TOBject::Copy() | |
76 | // to allow run time copying without casting | |
77 | // in AliESDEvent | |
78 | ||
79 | if(this==&obj)return; | |
80 | AliESDTZERO *robj = dynamic_cast<AliESDTZERO*>(&obj); | |
81 | if(!robj)return; // not an AliESDTZERO | |
82 | *robj = *this; | |
83 | ||
84 | } | |
85 | ||
86 | ||
d5ebf00e | 87 | //______________________________________________________________________________ |
88 | void AliESDTZERO::Reset() | |
89 | { | |
90 | // reset contents | |
adf36b9d | 91 | fT0clock=0; |
d5ebf00e | 92 | fT0zVertex = 0; |
93 | fT0timeStart = 0; | |
94 | for(int i = 0;i<24;i++)fT0time[i] = fT0amplitude[i] = 0; | |
adf36b9d | 95 | for(int i = 0;i<3;i++) fT0TOF[i] = 0; |
d5ebf00e | 96 | } |
97 | ||
98 | //______________________________________________________________________________ | |
99 | void AliESDTZERO::Print(const Option_t *) const | |
100 | { | |
101 | // does noting fornow | |
adf36b9d | 102 | printf(" Vertex %f (T0A+T0C)/2 %f #channels T0signal %f ns OrA %f ns OrC %f \n",fT0zVertex, fT0timeStart, fT0TOF[0],fT0TOF[1],fT0TOF[2]); |
103 | ||
104 | Bool_t tr[5]; | |
105 | for (Int_t i=0; i<5; i++) tr[i]=false; | |
106 | ||
107 | for (Int_t i=0; i<5; i++) { | |
108 | tr[i] = fT0trig & (1<<i); | |
109 | printf(" AliT0ESD ::: T0 trigers %i ",tr[i]); | |
110 | } | |
111 | printf(" \n "); | |
112 | ||
d5ebf00e | 113 | } |