1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
17 // --- AliRoot header files ---
18 #include "TObjArray.h"
19 #include "AliCDBManager.h"
20 #include "AliCDBEntry.h"
21 #include "AliEMCALRecParam.h"
24 ClassImp(AliEMCALRecParam)
26 TObjArray* AliEMCALRecParam::fgkMaps =0; //ALTRO mappings
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 //-----------------------------------------------------------------------------
35 AliEMCALRecParam::AliEMCALRecParam() :
36 AliDetectorRecoParam(),
37 fClusteringThreshold(0.5),
41 fLocMaxCut(0.03), //clustering
46 fTrkCutAlphaMin(-50.0),
47 fTrkCutAlphaMax(50.0),
48 fTrkCutAngle(10000.0),
50 fTrkCutNTPC(20.0), //track matching
51 fHighLowGainFactor(16.0),
55 fNPedSamples(5) //raw signal
57 // default reco values
59 //PID parameters (Guenole)
61 // as a first step, all array elements are initialized to 0.0
63 for (i = 0; i < 6; i++) {
64 for (j = 0; j < 6; j++) {
65 fGamma[i][j] = fHadron[i][j] = fPiZero5to10[i][j] = fPiZero10to60[i][j] = 0.;
69 // then, only the ones which must be not zero are initialized
70 // while the others will remain to the value 0.0
72 fGamma[0][0] = 0.038022;
73 fGamma[0][1] = -0.0001883;
74 fGamma[0][2] = 5.449e-06;
76 fGamma[1][0] = 0.207313;
77 fGamma[1][1] = -0.000978;
78 fGamma[1][2] = 0.00001634;
80 fGamma[2][0] = 0.043364;
81 fGamma[2][1] = -0.0002048;
82 fGamma[2][2] = 8.661e-06;
83 fGamma[2][3] = -1.353e-07;
85 fGamma[3][0] = 0.265004;
86 fGamma[3][1] = 0.061298;
87 fGamma[3][2] = -0.003203;
88 fGamma[3][3] = 4.73e-05;
90 fGamma[4][0] = 0.243579;
91 fGamma[4][1] = -1.614e-05;
93 fGamma[5][0] = 0.002942;
94 fGamma[5][1] = -3.976e-05;
96 fHadron[0][0] = 0.011945 / 3.;
97 fHadron[0][1] = 0.000386 / 3.;
98 fHadron[0][2] = -0.000014 / 3.;
99 fHadron[0][3] = 1.336e-07 / 3.;
101 fHadron[1][0] = 0.496544;
102 fHadron[1][1] = -0.003226;
103 fHadron[1][2] = 0.00001678;
105 fHadron[2][0] = 0.144838;
106 fHadron[2][1] = -0.002954;
107 fHadron[2][2] = 0.00008754;
108 fHadron[2][3] = -7.587e-07;
110 fHadron[3][0] = 1.264461 / 7.;
111 fHadron[3][1] = 0.002097 / 7.;
113 fHadron[4][0] = 0.261950;
114 fHadron[4][1] = -0.001078;
115 fHadron[4][2] = 0.00003237;
116 fHadron[4][3] = -3.241e-07;
119 fHadron[5][0] = 0.010317;
126 fPiZero5to10[0][0] = 0.009138;
127 fPiZero5to10[0][1] = 0.0006377;
129 fPiZero5to10[1][0] = 0.08;
131 fPiZero5to10[2][0] = -0.061119;
132 fPiZero5to10[2][1] = 0.019013;
134 fPiZero5to10[3][0] = 0.2;
136 fPiZero5to10[4][0] = 0.252044;
137 fPiZero5to10[4][1] = -0.002315;
139 fPiZero5to10[5][0] = 0.002942;
140 fPiZero5to10[5][1] = -3.976e-05;
142 fPiZero10to60[0][0] = 0.009138;
143 fPiZero10to60[0][1] = 0.0006377;
145 fPiZero10to60[1][0] = 1.272837;
146 fPiZero10to60[1][1] = -0.069708;
147 fPiZero10to60[1][2] = 0.001568;
148 fPiZero10to60[1][3] = -1.162e-05;
150 fPiZero10to60[2][0] = 0.139703;
151 fPiZero10to60[2][1] = 0.003687;
152 fPiZero10to60[2][2] = -0.000568;
153 fPiZero10to60[2][3] = 1.498e-05;
154 fPiZero10to60[2][4] = -1.174e-07;
156 fPiZero10to60[3][0] = -0.826367;
157 fPiZero10to60[3][1] = 0.096951;
158 fPiZero10to60[3][2] = -0.002215;
159 fPiZero10to60[3][3] = 2.523e-05;
161 fPiZero10to60[4][0] = 0.249890;
162 fPiZero10to60[4][1] = -0.000063;
164 fPiZero10to60[5][0] = 0.002942;
165 fPiZero10to60[5][1] = -3.976e-05;
169 //-----------------------------------------------------------------------------
170 AliEMCALRecParam::AliEMCALRecParam(const AliEMCALRecParam& rp) :
171 AliDetectorRecoParam(),
172 fClusteringThreshold(rp.fClusteringThreshold),
174 fMinECut(rp.fMinECut),
176 fLocMaxCut(rp.fLocMaxCut), //clustering
177 fTrkCutX(rp.fTrkCutX),
178 fTrkCutY(rp.fTrkCutY),
179 fTrkCutZ(rp.fTrkCutZ),
180 fTrkCutR(rp.fTrkCutR),
181 fTrkCutAlphaMin(rp.fTrkCutAlphaMin),
182 fTrkCutAlphaMax(rp.fTrkCutAlphaMax),
183 fTrkCutAngle(rp.fTrkCutAngle),
184 fTrkCutNITS(rp.fTrkCutNITS),
185 fTrkCutNTPC(rp.fTrkCutNTPC), // track matching
186 fHighLowGainFactor(rp.fHighLowGainFactor),
187 fOrderParameter(rp.fOrderParameter),
189 fNoiseThreshold(rp.fNoiseThreshold),
190 fNPedSamples(rp.fNPedSamples) //raw signal
196 for (i = 0; i < 6; i++) {
197 for (j = 0; j < 6; j++) {
198 fGamma[i][j] = rp.fGamma[i][j];
199 fHadron[i][j] = rp.fHadron[i][j];
200 fPiZero5to10[i][j] = rp.fPiZero5to10[i][j];
201 fPiZero10to60[i][j] = rp.fPiZero10to60[i][j];
207 //-----------------------------------------------------------------------------
208 AliEMCALRecParam& AliEMCALRecParam::operator = (const AliEMCALRecParam& rp)
210 //assignment operator
213 fClusteringThreshold = rp.fClusteringThreshold;
215 fMinECut = rp.fMinECut;
216 fUnfold = rp.fUnfold;
217 fLocMaxCut = rp.fLocMaxCut; //clustering
218 fTrkCutX = rp.fTrkCutX;
219 fTrkCutY = rp.fTrkCutY;
220 fTrkCutZ = rp.fTrkCutZ;
221 fTrkCutR = rp.fTrkCutR;
222 fTrkCutAlphaMin = rp.fTrkCutAlphaMin;
223 fTrkCutAlphaMax = rp.fTrkCutAlphaMax;
224 fTrkCutAngle = rp.fTrkCutAngle;
225 fTrkCutNITS = rp.fTrkCutNITS;
226 fTrkCutNTPC = rp.fTrkCutNTPC; //track matching
227 fHighLowGainFactor = rp.fHighLowGainFactor;
228 fOrderParameter = rp.fOrderParameter;
230 fNoiseThreshold = rp.fNoiseThreshold;
231 fNPedSamples = rp.fNPedSamples; //raw signal
235 for (i = 0; i < 6; i++) {
236 for (j = 0; j < 6; j++) {
237 fGamma[i][j] = rp.fGamma[i][j];
238 fHadron[i][j] = rp.fHadron[i][j];
239 fPiZero5to10[i][j] = rp.fPiZero5to10[i][j];
240 fPiZero10to60[i][j] = rp.fPiZero10to60[i][j];
250 //-----------------------------------------------------------------------------
251 AliEMCALRecParam* AliEMCALRecParam::GetDefaultParameters()
253 //default parameters for the reconstruction
254 AliEMCALRecParam* params = new AliEMCALRecParam();
255 params->SetName("Default - Pb+Pb");
256 params->SetTitle("Default - Pb+Pb");
261 //-----------------------------------------------------------------------------
262 AliEMCALRecParam* AliEMCALRecParam::GetCalibParam()
264 //parameters for the reconstruction of calibration runs
265 AliEMCALRecParam* params = new AliEMCALRecParam();
266 params->SetClusteringThreshold(0.2); // 200 MeV
267 params->SetMinECut(0.01); //10 MeV
268 params->SetName("Calibration - LED");
269 params->SetTitle("Calibration - LED");
270 params->SetEventSpecie(AliRecoParam::kCalib);
276 //-----------------------------------------------------------------------------
277 AliEMCALRecParam* AliEMCALRecParam::GetCosmicParam()
279 //parameters for the reconstruction of cosmic runs
280 AliEMCALRecParam* params = new AliEMCALRecParam();
281 params->SetClusteringThreshold(0.2); // 200 MeV
282 params->SetMinECut(0.01); //10 MeV
283 params->SetName("Cosmic");
284 params->SetTitle("Cosmic");
285 params->SetEventSpecie(AliRecoParam::kCosmic);
291 //-----------------------------------------------------------------------------
292 AliEMCALRecParam* AliEMCALRecParam::GetLowFluxParam()
294 //low flux/multiplicity ("p+p") parameters for the reconstruction
295 AliEMCALRecParam* params = new AliEMCALRecParam();
296 params->SetClusteringThreshold(0.2); // 200 MeV
297 params->SetMinECut(0.01); //10 MeV
298 params->SetName("Low Flux - p+p");
299 params->SetTitle("Low Flux - p+p");
300 params->SetEventSpecie(AliRecoParam::kLowMult);
307 //-----------------------------------------------------------------------------
308 AliEMCALRecParam* AliEMCALRecParam::GetHighFluxParam()
310 //high flux/multiplicity ("Pb+Pb") parameters for the reconstruction
311 AliEMCALRecParam* params = new AliEMCALRecParam();
312 //For now, same as default
313 //if later these need to be modified, here's where it is done
314 params->SetName("High Flux - Pb+Pb");
315 params->SetTitle("High Flux - Pb+Pb");
316 params->SetEventSpecie(AliRecoParam::kHighMult);
322 //-----------------------------------------------------------------------------
323 void AliEMCALRecParam::Print(Option_t *) const
325 // Print reconstruction parameters to stdout
326 AliInfo(Form("Clusterization parameters :\n fClusteringThreshold=%.3f,\n fW0=%.3f,\n fMinECut=%.3f,\n fUnfold=%d,\n fLocMaxCut=%.3f \n",
327 fClusteringThreshold,fW0,fMinECut,fUnfold,fLocMaxCut));
329 AliInfo(Form("Track-matching cuts :\n x %f, y %f, z %f, R %f \n alphaMin %f, alphaMax %f, Angle %f, NITS %f, NTPC %f\n", fTrkCutX, fTrkCutY, fTrkCutZ, fTrkCutR,fTrkCutAlphaMin,fTrkCutAlphaMax, fTrkCutAngle,fTrkCutNITS,fTrkCutNTPC));
331 AliInfo(Form("PID parameters, Gamma :\n"));
332 for(Int_t i = 0; i < 6; i++){
333 for(Int_t j = 0; j < 6; j++){
334 printf(" %f, ", fGamma[i][j]);
341 AliInfo(Form("PID parameters, Hadron :\n"));
342 for(Int_t i = 0; i < 6; i++){
343 for(Int_t j = 0; j < 6; j++){
344 printf(" %f, ", fHadron[i][j]);
351 AliInfo(Form("PID parameters, Pi0zero5to10 :\n"));
352 for(Int_t i = 0; i < 6; i++){
353 for(Int_t j = 0; j < 6; j++){
354 printf(" %f, ", fPiZero5to10[i][j]);
361 AliInfo(Form("PID parameters, Pi0zero10to60 :\n"));
362 for(Int_t i = 0; i < 6; i++){
363 for(Int_t j = 0; j < 6; j++){
364 printf(" %f, ", fPiZero10to60[i][j]);
371 AliInfo(Form("Raw signal parameters: \n gain factor=%f, order=%d, tau=%f, noise threshold=%d, nped samples=%d \n",
372 fHighLowGainFactor,fOrderParameter,fTau,fNoiseThreshold,fNPedSamples));
376 //-----------------------------------------------------------------------------
377 const TObjArray* AliEMCALRecParam::GetMappings()
379 //Returns array of AliAltroMappings for RCU0..RCUX.
380 //If not found, read it from OCDB.
382 //Quick check as follows:
383 // root [0] AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT/OCDB"
384 // root [1] AliCDBManager::Instance()->SetRun(1);
385 // root [2] TObjArray* maps = AliEMCALRecParam::GetMappings();
386 // root [3] maps->Print();
388 if(fgkMaps) return fgkMaps;
390 AliCDBEntry* entry = AliCDBManager::Instance()->Get("EMCAL/Calib/Mapping");
392 fgkMaps = (TObjArray*)entry->GetObject();