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