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