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