AliRoot Core  3dc7879 (3dc7879)
AliESDTZERO.cxx
Go to the documentation of this file.
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 #include "AliLog.h"
26 #include <TBits.h>
27 
28 
29 ClassImp(AliESDTZERO)
30 
31 //______________________________________________________________________________
33  TObject(),
34  fT0clock(0),
35  fT0zVertex(0),
36  fT0timeStart(0),
37  fT0trig(0),
38  fPileup(kFALSE),
39  fSattelite(kFALSE),
40  fMultC(0),
41  fMultA(0),
42  fBackground(0),
43  fPileupBits(0)
44 {
45  for(int i = 0;i<24;i++) {
46  fT0time[i] = fT0amplitude[i] = fT0NewAmplitude[i] = 0;
47  for(Int_t iHit=0; iHit<5; iHit++) {
48  fTimeFull[i][iHit] = -9999;
49  if (i==0) fOrA[iHit] = -9999;
50  if (i==0)fOrC[iHit] = -9999;
51  if (i==0) fTVDC[iHit] = -9999;
52  }
53  }
54  for(Int_t iHit=0; iHit<6; iHit++) fPileupTime[iHit]= -9999;
55  for(int i = 0;i<3;i++) {
56  fT0TOF[i] = -9999;
57  fT0TOFbest[i] = -9999;
58  }
59 }
60 //______________________________________________________________________________
62  TObject(tzero),
63  fT0clock(tzero.fT0clock),
64  fT0zVertex(tzero.fT0zVertex),
65  fT0timeStart(tzero.fT0timeStart),
66  fT0trig(tzero.fT0trig),
67  fPileup(tzero.fPileup),
68  fSattelite(tzero.fSattelite),
69  fMultC(tzero.fMultC),
70  fMultA(tzero.fMultA),
71  fBackground(tzero.fBackground),
72  fPileupBits(tzero.fPileupBits)
73 {
74  // copy constuctor
75  for(int i = 0;i<3;i++) {
76  fT0TOF[i] = tzero.fT0TOF[i];
77  fT0TOFbest[i] = tzero.fT0TOFbest[i];
78  }
79  for(int iHit=0; iHit<6; iHit++) fPileupTime[iHit] = tzero.fPileupTime[iHit];
80  for(int i = 0;i<24;i++){
81  fT0time[i] = tzero.fT0time[i];
82  fT0amplitude[i] = tzero.fT0amplitude[i];
83  fT0NewAmplitude[i] = tzero.fT0NewAmplitude[i];
84  for(Int_t iHit=0; iHit<5; iHit++) {
85  fTimeFull[i][iHit] = tzero.fTimeFull[i][iHit];
86  if (i==0) fOrA[iHit] = tzero.fOrA[iHit];
87  if (i==0) fOrC[iHit] = tzero.fOrC[iHit];
88  if (i==0) fTVDC[iHit] = tzero.fTVDC[iHit];
89  }
90  }
91 }
92 //______________________________________________________________________________
94  // assigmnent operator
95  if(this!=&tzero) {
96  TObject::operator=(tzero);
97  fT0clock = tzero.fT0clock;
98  fT0zVertex = tzero.fT0zVertex;
99  fT0timeStart = tzero.fT0timeStart;
100  fPileup = tzero.fPileup;
101  fSattelite = tzero.fSattelite;
102  fBackground = tzero.fBackground;
103  fMultC = tzero.fMultC;
104  fMultA = tzero.fMultA;
105  fT0trig = tzero.fT0trig;
106  fPileupBits = tzero.fPileupBits;
107 
108  for(int i = 0;i<3;i++) {
109  fT0TOF[i] = tzero.fT0TOF[i];
110  fT0TOFbest[i] = tzero.fT0TOFbest[i];
111  }
112 
113  for(int iHit=0; iHit<6; iHit++) fPileupTime[iHit] = tzero.fPileupTime[iHit];
114  for(int i = 0;i<24;i++){
115  fT0time[i] = tzero.fT0time[i];
116  fT0amplitude[i] = tzero.fT0amplitude[i];
117  fT0NewAmplitude[i] = tzero.fT0NewAmplitude[i];
118  for(Int_t iHit=0; iHit<5; iHit++) {
119  fTimeFull[i][iHit] = tzero.fTimeFull[i][iHit];
120  if (i==0) fOrA[iHit] = tzero.fOrA[iHit];
121  if (i==0) fOrC[iHit] = tzero.fOrC[iHit];
122  if (i==0) fTVDC[iHit] = tzero.fTVDC[iHit];
123  }
124  }
125  }
126  return *this;
127 }
128 //______________________________________________________________________________
129 void AliESDTZERO::Copy(TObject &obj) const {
130 
131  // this overwrites the virtual TOBject::Copy()
132  // to allow run time copying without casting
133  // in AliESDEvent
134 
135  if(this==&obj)return;
136  AliESDTZERO *robj = dynamic_cast<AliESDTZERO*>(&obj);
137  if(!robj)return; // not an AliESDTZERO
138  *robj = *this;
139 
140 }
141 
142 
143 //______________________________________________________________________________
145 {
146  // reset contents
147  fT0clock=0;
148  fT0zVertex = -9999;
149  fT0timeStart = 0;
150  for(int i = 0;i<24;i++) {
151  fT0time[i] = fT0amplitude[i] = fT0NewAmplitude[i] = 0;
152  for(Int_t iHit=0; iHit<5; iHit++) fTimeFull[i][iHit] = -9999;
153  }
154  for(Int_t iHit=0; iHit<5; iHit++) fOrA[iHit] = fOrC[iHit] = fTVDC[iHit] = -9999;
155  for(Int_t iHit=0; iHit<6; iHit++) fPileupTime[iHit]= -9999;
156  for(int i = 0;i<3;i++) {
157  fT0TOF[i] = -9999;
158  fT0TOFbest[i] = -9999;
159  }
160 }
161 
162 //______________________________________________________________________________
163 void AliESDTZERO::Print(const Option_t *) const
164 {
165  // does noting fornow
166  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]);
167 
168  printf(" AliESDTZERO:::fPileupBits CountBits() \n");
169  // fPileupBits.CountBits());
170  fPileupBits.Print();
171 
172  Bool_t tr[5];
173  for (Int_t i=0; i<5; i++) tr[i] = fT0trig & (1<<i);
174  printf("T0 triggers %d %d %d %d %d",tr[0],tr[1],tr[2],tr[3],tr[4]);
175 
176  for (Int_t i=0; i<24; i++)
177  printf(" AliESDTZERO::: new amp %f old amp %f \n", fT0NewAmplitude[i], fT0amplitude[i]);
178 
179 
180 }
Float_t fOrA[5]
Definition: AliESDTZERO.h:102
printf("Chi2/npoints = %f\n", TMath::Sqrt(chi2/npoints))
Int_t fT0trig
Definition: AliESDTZERO.h:98
Double32_t fT0time[24]
Definition: AliESDTZERO.h:99
Double32_t fT0TOFbest[3]
Definition: AliESDTZERO.h:111
Float_t fTVDC[5]
Definition: AliESDTZERO.h:104
Double32_t fT0TOF[3]
Definition: AliESDTZERO.h:95
AliESDTZERO & operator=(const AliESDTZERO &tzero)
Definition: AliESDTZERO.cxx:93
void Print(const Option_t *opt=0) const
Bool_t fBackground
Definition: AliESDTZERO.h:109
Double32_t fT0NewAmplitude[24]
Definition: AliESDTZERO.h:112
Float_t fMultA
Definition: AliESDTZERO.h:108
Float_t fMultC
Definition: AliESDTZERO.h:107
Float_t fOrC[5]
Definition: AliESDTZERO.h:103
Float_t fT0clock
Definition: AliESDTZERO.h:94
Bool_t fSattelite
Definition: AliESDTZERO.h:106
Float_t fTimeFull[24][5]
Definition: AliESDTZERO.h:101
Float_t fPileupTime[6]
Definition: AliESDTZERO.h:110
Double32_t fT0zVertex
Definition: AliESDTZERO.h:96
virtual void Copy(TObject &obj) const
Bool_t fPileup
Definition: AliESDTZERO.h:105
TBits fPileupBits
Definition: AliESDTZERO.h:113
Double32_t fT0amplitude[24]
Definition: AliESDTZERO.h:100
Double32_t fT0timeStart
Definition: AliESDTZERO.h:97