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