]>
Commit | Line | Data |
---|---|---|
3a8be91c | 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 | /* $Id$ */ | |
17 | // --- AliRoot header files --- | |
feedcab9 | 18 | #include "TObjArray.h" |
19 | #include "AliCDBManager.h" | |
20 | #include "AliCDBEntry.h" | |
3a8be91c | 21 | #include "AliEMCALRecParam.h" |
22 | #include "AliLog.h" | |
23 | ||
24 | ClassImp(AliEMCALRecParam) | |
25 | ||
feedcab9 | 26 | TObjArray* AliEMCALRecParam::fgkMaps =0; //ALTRO mappings |
27 | ||
3a8be91c | 28 | //----------------------------------------------------------------------------- |
29 | // Container of EMCAL reconstruction parameters | |
30 | // The purpose of this object is to store it to OCDB | |
31 | // and retrieve it in AliEMCALClusterizerv1 | |
32 | // Author: Yuri Kharlov | |
33 | //----------------------------------------------------------------------------- | |
34 | ||
413e6b81 | 35 | AliEMCALRecParam::AliEMCALRecParam() : |
36 | AliDetectorRecoParam(), | |
37 | fClusteringThreshold(0.5), | |
38 | fW0(4.5), | |
39 | fMinECut(0.45), | |
40 | fUnfold(kFALSE), | |
41 | fLocMaxCut(0.03), //clustering | |
42 | fTrkCutX(6.0), | |
43 | fTrkCutY(6.0), | |
44 | fTrkCutZ(6.0), | |
45 | fTrkCutR(10.0), | |
46 | fTrkCutAlphaMin(-50.0), | |
47 | fTrkCutAlphaMax(50.0), | |
48 | fTrkCutAngle(10000.0), //track matching | |
49 | fHighLowGainFactor(16.0), | |
50 | fOrderParameter(2), | |
51 | fTau(2.35), | |
52 | fNoiseThreshold(3), | |
53 | fNPedSamples(5) //raw signal | |
c47157cd | 54 | { |
55 | // default reco values | |
8ba062b1 | 56 | |
57 | //PID parameters (Guenole) | |
58 | ||
59 | // as a first step, all array elements are initialized to 0.0 | |
60 | Int_t i, j; | |
61 | for (i = 0; i < 6; i++) { | |
62 | for (j = 0; j < 6; j++) { | |
63 | fGamma[i][j] = fHadron[i][j] = fPiZero5to10[i][j] = fPiZero10to60[i][j] = 0.; | |
64 | } | |
65 | } | |
66 | ||
67 | // then, only the ones which must be not zero are initialized | |
68 | // while the others will remain to the value 0.0 | |
69 | ||
70 | fGamma[0][0] = 0.038022; | |
71 | fGamma[0][1] = -0.0001883; | |
72 | fGamma[0][2] = 5.449e-06; | |
73 | ||
74 | fGamma[1][0] = 0.207313; | |
75 | fGamma[1][1] = -0.000978; | |
76 | fGamma[1][2] = 0.00001634; | |
77 | ||
78 | fGamma[2][0] = 0.043364; | |
79 | fGamma[2][1] = -0.0002048; | |
80 | fGamma[2][2] = 8.661e-06; | |
81 | fGamma[2][3] = -1.353e-07; | |
82 | ||
83 | fGamma[3][0] = 0.265004; | |
84 | fGamma[3][1] = 0.061298; | |
85 | fGamma[3][2] = -0.003203; | |
86 | fGamma[3][3] = 4.73e-05; | |
87 | ||
88 | fGamma[4][0] = 0.243579; | |
89 | fGamma[4][1] = -1.614e-05; | |
90 | ||
91 | fGamma[5][0] = 0.002942; | |
92 | fGamma[5][1] = -3.976e-05; | |
93 | ||
94 | fHadron[0][0] = 0.011945 / 3.; | |
95 | fHadron[0][1] = 0.000386 / 3.; | |
96 | fHadron[0][2] = -0.000014 / 3.; | |
97 | fHadron[0][3] = 1.336e-07 / 3.; | |
98 | ||
99 | fHadron[1][0] = 0.496544; | |
100 | fHadron[1][1] = -0.003226; | |
101 | fHadron[1][2] = 0.00001678; | |
102 | ||
103 | fHadron[2][0] = 0.144838; | |
104 | fHadron[2][1] = -0.002954; | |
105 | fHadron[2][2] = 0.00008754; | |
106 | fHadron[2][3] = -7.587e-07; | |
107 | ||
108 | fHadron[3][0] = 1.264461 / 7.; | |
109 | fHadron[3][1] = 0.002097 / 7.; | |
110 | ||
111 | fHadron[4][0] = 0.261950; | |
112 | fHadron[4][1] = -0.001078; | |
113 | fHadron[4][2] = 0.00003237; | |
114 | fHadron[4][3] = -3.241e-07; | |
115 | fHadron[4][4] = 0.; | |
116 | fHadron[4][5] = 0.; | |
117 | fHadron[5][0] = 0.010317; | |
118 | fHadron[5][1] = 0.; | |
119 | fHadron[5][2] = 0.; | |
120 | fHadron[5][3] = 0.; | |
121 | fHadron[5][4] = 0.; | |
122 | fHadron[5][5] = 0.; | |
123 | ||
124 | fPiZero5to10[0][0] = 0.009138; | |
125 | fPiZero5to10[0][1] = 0.0006377; | |
126 | ||
127 | fPiZero5to10[1][0] = 0.08; | |
128 | ||
129 | fPiZero5to10[2][0] = -0.061119; | |
130 | fPiZero5to10[2][1] = 0.019013; | |
131 | ||
132 | fPiZero5to10[3][0] = 0.2; | |
133 | ||
134 | fPiZero5to10[4][0] = 0.252044; | |
135 | fPiZero5to10[4][1] = -0.002315; | |
136 | ||
137 | fPiZero5to10[5][0] = 0.002942; | |
138 | fPiZero5to10[5][1] = -3.976e-05; | |
139 | ||
140 | fPiZero10to60[0][0] = 0.009138; | |
141 | fPiZero10to60[0][1] = 0.0006377; | |
142 | ||
143 | fPiZero10to60[1][0] = 1.272837; | |
144 | fPiZero10to60[1][1] = -0.069708; | |
145 | fPiZero10to60[1][2] = 0.001568; | |
146 | fPiZero10to60[1][3] = -1.162e-05; | |
147 | ||
148 | fPiZero10to60[2][0] = 0.139703; | |
149 | fPiZero10to60[2][1] = 0.003687; | |
150 | fPiZero10to60[2][2] = -0.000568; | |
151 | fPiZero10to60[2][3] = 1.498e-05; | |
152 | fPiZero10to60[2][4] = -1.174e-07; | |
153 | ||
154 | fPiZero10to60[3][0] = -0.826367; | |
155 | fPiZero10to60[3][1] = 0.096951; | |
156 | fPiZero10to60[3][2] = -0.002215; | |
157 | fPiZero10to60[3][3] = 2.523e-05; | |
158 | ||
159 | fPiZero10to60[4][0] = 0.249890; | |
160 | fPiZero10to60[4][1] = -0.000063; | |
161 | ||
162 | fPiZero10to60[5][0] = 0.002942; | |
163 | fPiZero10to60[5][1] = -3.976e-05; | |
164 | ||
c47157cd | 165 | } |
3a8be91c | 166 | |
413e6b81 | 167 | //----------------------------------------------------------------------------- |
168 | AliEMCALRecParam::AliEMCALRecParam(const AliEMCALRecParam& rp) : | |
169 | AliDetectorRecoParam(), | |
170 | fClusteringThreshold(rp.fClusteringThreshold), | |
171 | fW0(rp.fW0), | |
172 | fMinECut(rp.fMinECut), | |
173 | fUnfold(rp.fUnfold), | |
174 | fLocMaxCut(rp.fLocMaxCut), //clustering | |
175 | fTrkCutX(rp.fTrkCutX), | |
176 | fTrkCutY(rp.fTrkCutY), | |
177 | fTrkCutZ(rp.fTrkCutZ), | |
178 | fTrkCutR(rp.fTrkCutR), | |
179 | fTrkCutAlphaMin(rp.fTrkCutAlphaMin), | |
180 | fTrkCutAlphaMax(rp.fTrkCutAlphaMax), | |
181 | fTrkCutAngle(rp.fTrkCutAngle), //track matching | |
182 | fHighLowGainFactor(rp.fHighLowGainFactor), | |
183 | fOrderParameter(rp.fOrderParameter), | |
184 | fTau(rp.fTau), | |
185 | fNoiseThreshold(rp.fNoiseThreshold), | |
186 | fNPedSamples(rp.fNPedSamples) //raw signal | |
187 | { | |
188 | //copy constructor | |
189 | ||
190 | //PID values | |
191 | Int_t i, j; | |
192 | for (i = 0; i < 6; i++) { | |
193 | for (j = 0; j < 6; j++) { | |
194 | fGamma[i][j] = rp.fGamma[i][j]; | |
195 | fHadron[i][j] = rp.fHadron[i][j]; | |
196 | fPiZero5to10[i][j] = rp.fPiZero5to10[i][j]; | |
197 | fPiZero10to60[i][j] = rp.fPiZero10to60[i][j]; | |
198 | } | |
199 | } | |
200 | ||
201 | } | |
202 | ||
203 | //----------------------------------------------------------------------------- | |
204 | AliEMCALRecParam& AliEMCALRecParam::operator = (const AliEMCALRecParam& rp) | |
205 | { | |
206 | //assignment operator | |
207 | ||
208 | if(this != &rp) { | |
209 | fClusteringThreshold = rp.fClusteringThreshold; | |
210 | fW0 = rp.fW0; | |
211 | fMinECut = rp.fMinECut; | |
212 | fUnfold = rp.fUnfold; | |
213 | fLocMaxCut = rp.fLocMaxCut; //clustering | |
214 | fTrkCutX = rp.fTrkCutX; | |
215 | fTrkCutY = rp.fTrkCutY; | |
216 | fTrkCutZ = rp.fTrkCutZ; | |
217 | fTrkCutR = rp.fTrkCutR; | |
218 | fTrkCutAlphaMin = rp.fTrkCutAlphaMin; | |
219 | fTrkCutAlphaMax = rp.fTrkCutAlphaMax; | |
220 | fTrkCutAngle = rp.fTrkCutAngle; //track matching | |
221 | fHighLowGainFactor = rp.fHighLowGainFactor; | |
222 | fOrderParameter = rp.fOrderParameter; | |
223 | fTau = rp.fTau; | |
224 | fNoiseThreshold = rp.fNoiseThreshold; | |
225 | fNPedSamples = rp.fNPedSamples; //raw signal | |
226 | ||
227 | //PID values | |
228 | Int_t i, j; | |
229 | for (i = 0; i < 6; i++) { | |
230 | for (j = 0; j < 6; j++) { | |
231 | fGamma[i][j] = rp.fGamma[i][j]; | |
232 | fHadron[i][j] = rp.fHadron[i][j]; | |
233 | fPiZero5to10[i][j] = rp.fPiZero5to10[i][j]; | |
234 | fPiZero10to60[i][j] = rp.fPiZero10to60[i][j]; | |
235 | } | |
236 | } | |
237 | ||
238 | } | |
239 | ||
240 | return *this; | |
241 | ||
242 | } | |
243 | ||
244 | //----------------------------------------------------------------------------- | |
245 | AliEMCALRecParam* AliEMCALRecParam::GetDefaultParameters() | |
246 | { | |
247 | //default parameters for the reconstruction | |
248 | AliEMCALRecParam* params = new AliEMCALRecParam(); | |
249 | return params; | |
250 | ||
251 | } | |
252 | ||
3a8be91c | 253 | //----------------------------------------------------------------------------- |
254 | void AliEMCALRecParam::Print(Option_t *) const | |
255 | { | |
3a8be91c | 256 | // Print reconstruction parameters to stdout |
225cd96d | 257 | AliInfo(Form("Clusterization parameters :\n fClusteringThreshold=%.3f,\n fW0=%.3f,\n fMinECut=%.3f,\n fUnfold=%d,\n fLocMaxCut=%.3f \n", |
258 | fClusteringThreshold,fW0,fMinECut,fUnfold,fLocMaxCut)); | |
3a8be91c | 259 | |
8ba062b1 | 260 | AliInfo(Form("Track-matching cuts :\n x %f, y %f, z %f, R %f \n alphaMin %f, alphaMax %f, Angle %f\n", fTrkCutX, fTrkCutY, fTrkCutZ, fTrkCutR,fTrkCutAlphaMin,fTrkCutAlphaMax, fTrkCutAngle)); |
261 | ||
262 | AliInfo(Form("PID parameters, Gamma :\n")); | |
263 | for(Int_t i = 0; i < 6; i++){ | |
264 | for(Int_t j = 0; j < 6; j++){ | |
265 | printf(" %f, ", fGamma[i][j]); | |
266 | } | |
267 | printf("\n"); | |
268 | } | |
269 | ||
270 | printf("\n"); | |
271 | ||
272 | AliInfo(Form("PID parameters, Hadron :\n")); | |
273 | for(Int_t i = 0; i < 6; i++){ | |
274 | for(Int_t j = 0; j < 6; j++){ | |
275 | printf(" %f, ", fHadron[i][j]); | |
276 | } | |
277 | printf("\n"); | |
278 | } | |
279 | ||
280 | printf("\n"); | |
281 | ||
282 | AliInfo(Form("PID parameters, Pi0zero5to10 :\n")); | |
283 | for(Int_t i = 0; i < 6; i++){ | |
284 | for(Int_t j = 0; j < 6; j++){ | |
285 | printf(" %f, ", fPiZero5to10[i][j]); | |
286 | } | |
287 | printf("\n"); | |
288 | } | |
289 | ||
290 | printf("\n"); | |
291 | ||
292 | AliInfo(Form("PID parameters, Pi0zero10to60 :\n")); | |
293 | for(Int_t i = 0; i < 6; i++){ | |
294 | for(Int_t j = 0; j < 6; j++){ | |
295 | printf(" %f, ", fPiZero10to60[i][j]); | |
296 | } | |
297 | printf("\n"); | |
298 | } | |
299 | ||
300 | printf("\n"); | |
301 | ||
b4133f05 | 302 | AliInfo(Form("Raw signal parameters: \n gain factor=%f, order=%d, tau=%f, noise threshold=%d, nped samples=%d \n", |
303 | fHighLowGainFactor,fOrderParameter,fTau,fNoiseThreshold,fNPedSamples)); | |
304 | ||
3a8be91c | 305 | } |
8ba062b1 | 306 | |
413e6b81 | 307 | //----------------------------------------------------------------------------- |
feedcab9 | 308 | const TObjArray* AliEMCALRecParam::GetMappings() |
309 | { | |
413e6b81 | 310 | //Returns array of AliAltroMappings for RCU0..RCUX. |
311 | //If not found, read it from OCDB. | |
312 | ||
313 | //Quick check as follows: | |
314 | // root [0] AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT" | |
315 | // root [1] AliCDBManager::Instance()->SetRun(1); | |
316 | // root [2] TObjArray* maps = AliEMCALRecParam::GetMappings(); | |
317 | // root [3] maps->Print(); | |
feedcab9 | 318 | |
319 | if(fgkMaps) return fgkMaps; | |
320 | ||
321 | AliCDBEntry* entry = AliCDBManager::Instance()->Get("EMCAL/Calib/Mapping"); | |
322 | if(entry) | |
323 | fgkMaps = (TObjArray*)entry->GetObject(); | |
324 | ||
325 | return fgkMaps; | |
326 | ||
327 | } | |
328 |