]>
Commit | Line | Data |
---|---|---|
0f786b96 | 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 | ||
cdf48647 | 36 | using std::cout; |
37 | using std::endl; | |
0f786b96 | 38 | ClassImp(AliT0RecoParam) |
39 | ||
40 | ||
41 | ||
42 | ||
43 | //_____________________________________________________________________________ | |
44 | AliT0RecoParam::AliT0RecoParam(): | |
45 | AliDetectorRecoParam(), | |
46 | fRefAmp(7), | |
2b0a42ea | 47 | fRefPoint(0), |
48 | fLatencyL1(0), | |
e9626e76 | 49 | fLatencyL1A(0), |
50 | fLatencyL1C(0), | |
2b0a42ea | 51 | fLatencyHPTDC(0), |
e5835843 | 52 | fVertexShift(0), |
53 | fEqualised(0) | |
0f786b96 | 54 | { |
55 | // | |
56 | // constructor | |
0f786b96 | 57 | SetName("T0"); |
58 | SetTitle("T0"); | |
e5835843 | 59 | |
60 | fSatelliteThresholds[0] = -15; | |
61 | fSatelliteThresholds[1] = -1.5; | |
57b90263 | 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 | ||
0f786b96 | 68 | } |
69 | ||
70 | //_____________________________________________________________________________ | |
71 | AliT0RecoParam::~AliT0RecoParam() | |
72 | { | |
73 | // | |
74 | // destructor | |
75 | // | |
76 | } | |
77 | ||
78 | //_____________________________________________________________________________ | |
79 | ||
80 | AliT0RecoParam::AliT0RecoParam(const AliT0RecoParam &p): | |
81 | AliDetectorRecoParam(p), | |
2b0a42ea | 82 | fRefAmp(p.fRefAmp), |
83 | fRefPoint(p.fRefPoint), | |
84 | fLatencyL1(p.fLatencyL1), | |
e9626e76 | 85 | fLatencyL1A(p.fLatencyL1A), |
86 | fLatencyL1C(p.fLatencyL1C), | |
e5835843 | 87 | fLatencyHPTDC(p.fLatencyHPTDC), |
88 | fVertexShift(p.fVertexShift), | |
89 | fEqualised( p.fEqualised) | |
90 | { | |
0f786b96 | 91 | //copy constructor |
e5835843 | 92 | fSatelliteThresholds[0] = (p.fSatelliteThresholds[0]); |
93 | fSatelliteThresholds[1] = (p.fSatelliteThresholds[1]); | |
57b90263 | 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 | ||
0f786b96 | 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; | |
2b0a42ea | 116 | fLatencyL1 = p.fLatencyL1; |
e9626e76 | 117 | fLatencyL1A = p.fLatencyL1A; |
118 | fLatencyL1C = p.fLatencyL1C; | |
119 | ||
2b0a42ea | 120 | fLatencyHPTDC = p.fLatencyHPTDC; |
121 | fVertexShift = p.fVertexShift; | |
e5835843 | 122 | |
123 | fSatelliteThresholds[0] = (p.fSatelliteThresholds[0]); | |
124 | fSatelliteThresholds[1] = (p.fSatelliteThresholds[1]); | |
125 | fEqualised = p.fEqualised; | |
57b90263 | 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; | |
784e2251 | 133 | |
0f786b96 | 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; | |
e9626e76 | 145 | param->fLatencyL1 = 7782.05; |
146 | param->fLatencyL1A = 7781.90; | |
147 | param->fLatencyL1C = 7782.19; | |
2b0a42ea | 148 | param->fLatencyHPTDC = 22000; |
b5a9f753 | 149 | param->fVertexShift = 0; |
a46b18e9 | 150 | for (Int_t i=0; i<500; i++) |
151 | { | |
152 | param-> fLow[i]=0.; | |
153 | param-> fHigh[i]=10000.; | |
154 | } | |
0f786b96 | 155 | param->SetName("Low Flux"); |
156 | param->SetTitle("Low Flux"); | |
e5835843 | 157 | param->SetSatelliteThresholds(-15, -1.5); |
158 | param->SetEq(0); | |
0f786b96 | 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(); | |
e9626e76 | 171 | param->fRefAmp = 10; |
0f786b96 | 172 | param->fRefPoint = 0; |
e9626e76 | 173 | param->fLatencyL1 = 7782.05; |
174 | param->fLatencyL1A = 7781.90; | |
175 | param->fLatencyL1C = 7782.19; | |
b5a9f753 | 176 | param->fVertexShift = 0; |
2b0a42ea | 177 | param->fLatencyHPTDC = 22000; |
a46b18e9 | 178 | for (Int_t i=0; i<500; i++) |
179 | { | |
2b0a42ea | 180 | param-> fLow[i]=0.; |
181 | param-> fHigh[i]=20000.; | |
a46b18e9 | 182 | } |
0f786b96 | 183 | // |
e5835843 | 184 | param->SetSatelliteThresholds(-15, -1.5); |
185 | param->SetEq(0); | |
186 | ||
187 | param->SetName("High Flux"); | |
0f786b96 | 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; | |
e9626e76 | 203 | param->fLatencyL1 = 7782.05; |
204 | param->fLatencyL1A = 7781.90; | |
205 | param->fLatencyL1C = 7782.19; | |
2b0a42ea | 206 | param->fLatencyHPTDC = 22000; |
207 | param->fVertexShift = 0; | |
e5835843 | 208 | param->SetSatelliteThresholds(-15, -1.5); |
209 | param->SetEq(0); | |
210 | ||
a46b18e9 | 211 | for (Int_t i=0; i<500; i++) |
212 | { | |
213 | param-> fLow[i]=0.; | |
214 | param-> fHigh[i]=12000.; | |
215 | } | |
0f786b96 | 216 | // |
217 | param->SetName("Laser Flux"); | |
218 | param->SetTitle("Laser Flux"); | |
219 | return param; | |
220 | } | |
221 | //_____________________________________________________________________________ | |
a46b18e9 | 222 | |
0f786b96 | 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)); | |
e5835843 | 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; | |
0f786b96 | 232 | } |