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), //track matching
49 fHighLowGainFactor(16.0),
53 fNPedSamples(5) //raw signal
55 // default reco values
57 //PID parameters (Guenole)
59 // as a first step, all array elements are initialized to 0.0
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.;
67 // then, only the ones which must be not zero are initialized
68 // while the others will remain to the value 0.0
70 fGamma[0][0] = 0.038022;
71 fGamma[0][1] = -0.0001883;
72 fGamma[0][2] = 5.449e-06;
74 fGamma[1][0] = 0.207313;
75 fGamma[1][1] = -0.000978;
76 fGamma[1][2] = 0.00001634;
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;
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;
88 fGamma[4][0] = 0.243579;
89 fGamma[4][1] = -1.614e-05;
91 fGamma[5][0] = 0.002942;
92 fGamma[5][1] = -3.976e-05;
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.;
99 fHadron[1][0] = 0.496544;
100 fHadron[1][1] = -0.003226;
101 fHadron[1][2] = 0.00001678;
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;
108 fHadron[3][0] = 1.264461 / 7.;
109 fHadron[3][1] = 0.002097 / 7.;
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;
117 fHadron[5][0] = 0.010317;
124 fPiZero5to10[0][0] = 0.009138;
125 fPiZero5to10[0][1] = 0.0006377;
127 fPiZero5to10[1][0] = 0.08;
129 fPiZero5to10[2][0] = -0.061119;
130 fPiZero5to10[2][1] = 0.019013;
132 fPiZero5to10[3][0] = 0.2;
134 fPiZero5to10[4][0] = 0.252044;
135 fPiZero5to10[4][1] = -0.002315;
137 fPiZero5to10[5][0] = 0.002942;
138 fPiZero5to10[5][1] = -3.976e-05;
140 fPiZero10to60[0][0] = 0.009138;
141 fPiZero10to60[0][1] = 0.0006377;
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;
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;
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;
159 fPiZero10to60[4][0] = 0.249890;
160 fPiZero10to60[4][1] = -0.000063;
162 fPiZero10to60[5][0] = 0.002942;
163 fPiZero10to60[5][1] = -3.976e-05;
167 //-----------------------------------------------------------------------------
168 AliEMCALRecParam::AliEMCALRecParam(const AliEMCALRecParam& rp) :
169 AliDetectorRecoParam(),
170 fClusteringThreshold(rp.fClusteringThreshold),
172 fMinECut(rp.fMinECut),
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),
185 fNoiseThreshold(rp.fNoiseThreshold),
186 fNPedSamples(rp.fNPedSamples) //raw signal
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];
203 //-----------------------------------------------------------------------------
204 AliEMCALRecParam& AliEMCALRecParam::operator = (const AliEMCALRecParam& rp)
206 //assignment operator
209 fClusteringThreshold = rp.fClusteringThreshold;
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;
224 fNoiseThreshold = rp.fNoiseThreshold;
225 fNPedSamples = rp.fNPedSamples; //raw signal
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];
244 //-----------------------------------------------------------------------------
245 AliEMCALRecParam* AliEMCALRecParam::GetDefaultParameters()
247 //default parameters for the reconstruction
248 AliEMCALRecParam* params = new AliEMCALRecParam();
249 params->SetName("Default - Pb+Pb");
250 params->SetTitle("Default - Pb+Pb");
256 //-----------------------------------------------------------------------------
257 AliEMCALRecParam* AliEMCALRecParam::GetLowFluxParam()
259 //low flux/multiplicity ("p+p") parameters for the reconstruction
260 AliEMCALRecParam* params = new AliEMCALRecParam();
261 params->SetClusteringThreshold(0.2); // 200 MeV
262 params->SetMinECut(0.01); //10 MeV
263 params->SetName("Low Flux - p+p");
264 params->SetTitle("Low Flux - p+p");
265 params->SetEventSpecie(AliRecoParam::kLowMult);
272 //-----------------------------------------------------------------------------
273 AliEMCALRecParam* AliEMCALRecParam::GetHighFluxParam()
275 //high flux/multiplicity ("Pb+Pb") parameters for the reconstruction
276 AliEMCALRecParam* params = new AliEMCALRecParam();
277 //For now, same as default
278 //if later these need to be modified, here's where it is done
279 params->SetName("High Flux - Pb+Pb");
280 params->SetTitle("High Flux - Pb+Pb");
281 params->SetEventSpecie(AliRecoParam::kHighMult);
287 //-----------------------------------------------------------------------------
288 void AliEMCALRecParam::Print(Option_t *) const
290 // Print reconstruction parameters to stdout
291 AliInfo(Form("Clusterization parameters :\n fClusteringThreshold=%.3f,\n fW0=%.3f,\n fMinECut=%.3f,\n fUnfold=%d,\n fLocMaxCut=%.3f \n",
292 fClusteringThreshold,fW0,fMinECut,fUnfold,fLocMaxCut));
294 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));
296 AliInfo(Form("PID parameters, Gamma :\n"));
297 for(Int_t i = 0; i < 6; i++){
298 for(Int_t j = 0; j < 6; j++){
299 printf(" %f, ", fGamma[i][j]);
306 AliInfo(Form("PID parameters, Hadron :\n"));
307 for(Int_t i = 0; i < 6; i++){
308 for(Int_t j = 0; j < 6; j++){
309 printf(" %f, ", fHadron[i][j]);
316 AliInfo(Form("PID parameters, Pi0zero5to10 :\n"));
317 for(Int_t i = 0; i < 6; i++){
318 for(Int_t j = 0; j < 6; j++){
319 printf(" %f, ", fPiZero5to10[i][j]);
326 AliInfo(Form("PID parameters, Pi0zero10to60 :\n"));
327 for(Int_t i = 0; i < 6; i++){
328 for(Int_t j = 0; j < 6; j++){
329 printf(" %f, ", fPiZero10to60[i][j]);
336 AliInfo(Form("Raw signal parameters: \n gain factor=%f, order=%d, tau=%f, noise threshold=%d, nped samples=%d \n",
337 fHighLowGainFactor,fOrderParameter,fTau,fNoiseThreshold,fNPedSamples));
341 //-----------------------------------------------------------------------------
342 const TObjArray* AliEMCALRecParam::GetMappings()
344 //Returns array of AliAltroMappings for RCU0..RCUX.
345 //If not found, read it from OCDB.
347 //Quick check as follows:
348 // root [0] AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT"
349 // root [1] AliCDBManager::Instance()->SetRun(1);
350 // root [2] TObjArray* maps = AliEMCALRecParam::GetMappings();
351 // root [3] maps->Print();
353 if(fgkMaps) return fgkMaps;
355 AliCDBEntry* entry = AliCDBManager::Instance()->Get("EMCAL/Calib/Mapping");
357 fgkMaps = (TObjArray*)entry->GetObject();