]> git.uio.no Git - u/mrichter/AliRoot.git/blob - T0/AliT0RecoParam.cxx
OCDB settings modified
[u/mrichter/AliRoot.git] / T0 / AliT0RecoParam.cxx
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 ///////////////////////////////////////////////////////////////////////////////
18 //                                                                           //
19 // Class with T0 reconstruction parameters                                  //
20 //    fMeanAmplitude -
21 //           for low flux time-amplitude correction equalize time to amplitude 1 MIP; 
22 //           for high flux - to 15MIP   
23 //    To have nice time spectra after reconstruction we need to know 
24 //    reference point to write t(i) - RefPoint. 
25 //    It can be apparatus RefPoint or one of PMT                       //  
26 //    fRefPoint - number of channel with RF
27 //
28 //       Alla.Maevskaya@cern.ch
29 /////////////////////////////////////////////////////////////////////////
30
31 #include "AliLog.h"
32  
33 #include "AliT0RecoParam.h"
34 #include "Riostream.h"
35
36 ClassImp(AliT0RecoParam)
37
38
39
40
41 //_____________________________________________________________________________
42 AliT0RecoParam::AliT0RecoParam():
43   AliDetectorRecoParam(),
44    fRefAmp(7),
45    fRefPoint(0),
46    fLatencyL1(0),  
47    fLatencyL1A(0),  
48    fLatencyL1C(0),  
49    fLatencyHPTDC(0),      
50   fVertexShift(0),
51   fEqualised(0)
52 {
53   //
54   // constructor
55   SetName("T0");
56   SetTitle("T0");
57
58   fSatelliteThresholds[0] =  -15;
59   fSatelliteThresholds[1] =  -1.5;
60   for (Int_t i=0; i<500; i++)  {
61     fLow[i] = 0.;
62     fHigh[i] = 10000.;
63     if( i<24) fBadChannels[i]=-1;
64   }
65  
66 }
67
68 //_____________________________________________________________________________
69 AliT0RecoParam::~AliT0RecoParam() 
70 {
71   //
72   // destructor
73   //  
74 }
75
76 //_____________________________________________________________________________
77
78 AliT0RecoParam::AliT0RecoParam(const AliT0RecoParam &p):
79   AliDetectorRecoParam(p),       
80   fRefAmp(p.fRefAmp),
81   fRefPoint(p.fRefPoint),
82   fLatencyL1(p.fLatencyL1),  
83   fLatencyL1A(p.fLatencyL1A),  
84   fLatencyL1C(p.fLatencyL1C),  
85   fLatencyHPTDC(p.fLatencyHPTDC),      
86   fVertexShift(p.fVertexShift), 
87   fEqualised( p.fEqualised)
88
89  //copy constructor
90   fSatelliteThresholds[0] = (p.fSatelliteThresholds[0]);
91   fSatelliteThresholds[1] = (p.fSatelliteThresholds[1]);
92   for (Int_t i=0; i<500; i++)  {
93     fLow[i] = p.fLow[i];
94     fHigh[i] = p.fHigh[i];
95     if( i<24) fBadChannels[i] = p.fBadChannels[i];
96   }
97  
98
99 }
100 //_____________________________________________________________________________
101
102 AliT0RecoParam& AliT0RecoParam:: operator=(const AliT0RecoParam &p)
103 {
104   //
105   // assign. operator
106   //
107
108   if (this == &p)
109     return *this;
110   
111   AliDetectorRecoParam::operator=(p);
112   fRefAmp = p.fRefAmp;
113   fRefPoint = p.fRefPoint;
114   fLatencyL1 = p.fLatencyL1;
115   fLatencyL1A = p.fLatencyL1A;
116   fLatencyL1C = p.fLatencyL1C;
117
118   fLatencyHPTDC = p.fLatencyHPTDC;
119   fVertexShift = p.fVertexShift;
120
121   fSatelliteThresholds[0] = (p.fSatelliteThresholds[0]);
122   fSatelliteThresholds[1] = (p.fSatelliteThresholds[1]);
123   fEqualised = p.fEqualised;
124   for (Int_t i=0; i<500; i++)  {
125     fLow[i] = p.fLow[i];
126     fHigh[i] = p.fHigh[i];
127     if( i<24) fBadChannels[i] = p.fBadChannels[i];
128   }
129  
130  return *this;
131
132 }
133 //_____________________________________________________________________________
134  
135 AliT0RecoParam *AliT0RecoParam::GetLowFluxParam()
136 {
137   //
138   // make default reconstruction  parameters for low  flux env.
139   //
140   AliT0RecoParam *param = new AliT0RecoParam();
141   param->fRefAmp = 1;
142   param->fRefPoint = 0;
143   param->fLatencyL1 = 7782.05;
144   param->fLatencyL1A = 7781.90;
145   param->fLatencyL1C =  7782.19;
146   param->fLatencyHPTDC = 22000;
147   param->fVertexShift = 0;
148   for (Int_t i=0; i<500; i++)
149     {
150      param-> fLow[i]=0.;
151      param-> fHigh[i]=10000.;
152     }
153   param->SetName("Low Flux");
154   param->SetTitle("Low Flux");
155   param->SetSatelliteThresholds(-15, -1.5);
156   param->SetEq(0);
157   return param;
158 }
159
160 //_____________________________________________________________________________
161
162 AliT0RecoParam *AliT0RecoParam::GetHighFluxParam()
163 {
164   //
165   // make reco parameters for high flux env.
166   //
167
168   AliT0RecoParam *param = new AliT0RecoParam();
169   param->fRefAmp = 10;
170   param->fRefPoint = 0;
171   param->fLatencyL1 = 7782.05;
172   param->fLatencyL1A = 7781.90;
173   param->fLatencyL1C =  7782.19;
174   param->fVertexShift = 0;
175   param->fLatencyHPTDC = 22000;
176   for (Int_t i=0; i<500; i++)
177     {
178       param-> fLow[i]=0.;
179       param-> fHigh[i]=20000.;
180     }
181   //
182   param->SetSatelliteThresholds(-15, -1.5);
183   param->SetEq(0);
184
185    param->SetName("High Flux");
186   param->SetTitle("High Flux");
187   return param;
188 }
189
190
191 //_____________________________________________________________________________
192
193 AliT0RecoParam *AliT0RecoParam::GetLaserTestParam()
194 {
195   //
196   // special setting for laser
197   //
198   AliT0RecoParam *param = new AliT0RecoParam();
199   param->fRefAmp = 1;
200   param->fRefPoint = 1;
201   param->fLatencyL1 = 7782.05;
202   param->fLatencyL1A = 7781.90;
203   param->fLatencyL1C =  7782.19;
204   param->fLatencyHPTDC = 22000;
205   param->fVertexShift = 0;
206   param->SetSatelliteThresholds(-15, -1.5);
207   param->SetEq(0);
208   
209   for (Int_t i=0; i<500; i++)
210     {
211      param-> fLow[i]=0.;
212      param-> fHigh[i]=12000.;
213     }
214   //
215   param->SetName("Laser Flux");
216   param->SetTitle("Laser Flux");
217   return param;
218 }
219 //_____________________________________________________________________________
220
221 void AliT0RecoParam::PrintParameters() const
222 {
223   //
224   // Printing of the used T0 reconstruction parameters
225   //
226   AliInfo(Form(" Reference amplitude for walk corerection : %f", fRefAmp));
227   AliInfo(Form(" Bad channel in channel  : %i", fRefPoint));
228   cout<<" AliT0RecoParam::PrintParameters() "<<endl;
229   for (Int_t i=0; i<105; i++) cout<<i<<" "<<fLow[i]<<" "<<fHigh[i]<<endl; 
230 }