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