]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EMCAL/doc/ocdb.tex
Update from satyajit: HM Analysis
[u/mrichter/AliRoot.git] / EMCAL / doc / ocdb.tex
1
2 \section{EMCal OCDB/OADB - Marcel}
3
4 OCDB is the Offline data base. It contains the different parameters used for simulation or reconstruction of the detectors or even the LHC machine parameters that might change for the different run conditions.
5
6 OADB is the Offline Analysis data base.
7
8 The EMCAL OCDB (and other detectors OCDB) is divided in 3 directories that can be found in 
9 \begin{lstlisting}
10 $ALICE_ROOT/OCDB/EMCAL
11 \end{lstlisting}
12 \begin{itemize}
13 \item Calib: Very different type of information, from hardware mapping to calibration parameters. 
14 \item Align: Survey misplacements in geometry.
15 \item Config: Detector configuration, temperatures
16 \end{itemize}
17
18 Inside these directories you will find other subdirectories with more specific types of parameters. Each of the directories contains a file named in this way:
19 \begin{lstlisting}
20 Run(FirstRun)_(LastRun)_v(version)_s(version).root
21 \end{lstlisting}
22 being the default and what you will find in the trunk
23 \begin{lstlisting}
24 Run0_999999999_v0_s0.root
25 \end{lstlisting}
26
27 What is actually used for the real data reconstruction can be found in alien here:
28 \begin{lstlisting}
29 /alice/data/20XX/OCDB/EMCAL
30 \end{lstlisting}
31 There are different repositories for different years (20XX). For the simulation productions, there is another repository on the grid:
32 \begin{lstlisting}
33 /alice/simulation/2008/v4-15-Release/XXX/EMCAL
34 \end{lstlisting}
35 which is divided into 3 other repositories: Ideal, Full and Residual. Each one is meant to reproduce the detector with different precision. For EMCAL, right now these 3 repositories contain the same parameters.
36
37 The following section explain the elements stored and how to read and fill OCDB parameters.
38
39 \subsection{Accessing a different OCDB}
40
41 In the simulation/reconstruction macro a default OCDB needs to be specified if different from 
42 \begin{lstlisting} 
43 $ALICE_ROOT/OCDB.
44 \end{lstlisting} 
45 When running on the grid, one needs to set for example in a reconstruction of simulated data:
46 \begin{lstlisting}
47  reco.SetDefaultStorage("alien://Folder=/alice/simulation/2008/v4-15-Release/Residual/");
48 \end{lstlisting}
49 If one or several OCDB files have been modified, the following line has to be added in the simulation or reconstruction macro:
50 \begin{lstlisting}
51  reco.SetSpecificStorage("EMCAL/Calib/Pedestals","local://your/modified/local/OCDB");
52 \end{lstlisting}
53
54 The file with the calibration coefficients needs to be stored in the directory :
55 \begin{lstlisting}
56  /your/modified/local/OCDB/EMCAL/Calib/Data 
57  \end{lstlisting}
58  
59 If more of the OCDB files are modified, add the following line :
60 \begin{lstlisting}
61  reco.SetSpecificStorage("EMCAL/Calib/","local:/your/modified/local/OCDB");
62  \end{lstlisting}
63 with all the directories inside \begin{lstlisting} EMCAL/Calib \end{lstlisting} and corresponding files put in 
64 \begin{lstlisting}
65 /your/modified/local/OCDB/EMCAL/Calib/
66 \end{lstlisting}
67
68 \subsection{Energy calibration}
69
70 Calibration Coefficients tower by towers are stored in the following directory :
71 \begin{lstlisting}
72 EMCAL/Calib/Data
73 \end{lstlisting}
74 What is stored is an object of the class AliEMCALCalibData which is a container of gains and pedestals per tower. These coefficients are used in:
75 \begin{itemize}
76 \item  Simulation:  during the digitization, in AliEMCALDigitizer::Digitizer(), when calling AliEMCALDigitizer::DigitizeEnergy(), to transform the deposited energy into ADC counts. 
77 \item  Reconstruction: in AliEMCALClusterizerv1::Calibrate() called in AliEMCALClusterizer::MakeClusters(), when forming the cluster, to get the final cluster energy.
78 \end{itemize}
79 The macro 
80 \begin{lstlisting}
81 $ALICE_ROOT/EMCAL/macros/CalibrationDB/AliEMCALSetCDB.C
82 \end{lstlisting}
83 is an example on how to set the calibration coefficients per channel, or how to read them from the OCDB file. This macro can set all channels with the same selected value or with random values given a uniform or gaussian smearing of a selected input value. A simple example that shows how to print the parameters is PrintEMCALCalibData.C
84
85 All channels in the simulation have the same value for the gains (0.0153 GeV/ADC counts) and pedestal (set to 0 since the calorimeter works with Zero Suppressed data).
86
87 \subsection{Bad channels}
88
89 Storage for the bad channels map found in hardware are here :
90 \begin{lstlisting}
91 EMCAL/Calib/Pedestals
92 \end{lstlisting}
93 The object stored is from the class AliCaloCalibPedestal used for monitoring the towers calibration and functionality. This class has the data member TObjArray *fDeadMap  which consists of an array of 12 TH2I (as many as Super Modules), and each TH2I has the dimension of 24x48 (number of towers in $\phi\times\eta$ direction), each bin corresponds to a tower. The content of each entry in the histogram is an integer which represents the possible status:
94 \begin{lstlisting}
95 enum kDeadMapEntry{kAlive = 0, kDead,  kHot, kWarning, kResurrected, kRecentlyDeceased, kNumDeadMapStates};
96 \end{lstlisting}
97 Right now only the status kAlive, kDead, kHot and soon kWarning (soon, not yet) are set but, the code is basically skipping all the channels that are  kDead and kHot. The bad channel map is used in the reconstruction code in 3 places:
98 \begin{itemize}
99 \item AliEMCALRawUtils::Raw2Digits() : Before the raw data time sample is fitted, the status of the tower is checked, and if bad (kHot or kDead), the fit is not done. This avoids trying to fit ill shaped samples. This step is optional though, right now default is to skip the bad channels here. With the RecParam OCDB we can select to use it or not.
100 \item AliEMCALClusterizerv1::Calibrate(): once the cluster is formed, to get the cluster energy from its cells.
101 \item AliEMCALRecPoint::EvalDistanceToBadChannels(): Evaluate the distance of a cluster to the closest bad channel. During the analysis we may want to skip clusters close to a bad channel. This time a bad channel is whatever is not kAlive.
102 \end{itemize}
103
104 The macro 
105 \begin{lstlisting}
106 $ALICE_ROOT/EMCAL/macros/PedestalDB/AliEMCALPedestalCDB.C
107 \end{lstlisting}
108 is an example on how to set the bad channel map and how to read it from a file. When executed, it displays a menu that allows to set randomly as bad a given \% of the towers. It also allows to set the map from an input txt file, with the format like\\ \$ALICE\_ROOT/EMCAL/macros/PedestalDB/map.txt (this map file is the one used in the last mapping in the raw OCDB). It can also read the OCDB file and display the 12 TH2I histograms on screen.
109
110 \subsection{Reconstruction parameters}
111
112 The storage of the parameters used in reconstruction is done in 
113 \begin{lstlisting}
114 EMCAL/Calib/RecoParam
115 \end{lstlisting}
116 What is stored is an object of the class AliEMCALRecParam which is a container for all the parameters used. There are different kind of parameters, we can distinguish them depending on which step of the reconstruction are used as explained below.
117
118 \paragraph*{Raw data fitting and mapping}
119 \begin{itemize}
120
121   \item Double\_t fHighLowGainFactor;  // gain factor to convert between high and low gain
122
123    \item  Int\_t    fOrderParameter;        // order parameter for raw signal fit
124
125   \item   Double\_t fTau;                       // decay constant for raw signal fit
126
127   \item   Int\_t    fNoiseThreshold;          // threshold to consider signal or noise
128
129    \item  Int\_t    fNPedSamples;            // number of time samples to use in pedestal calculation
130
131    \item  Bool\_t   fRemoveBadChannels; // select if bad channels are removed before fitting
132
133   \item   Int\_t    fFittingAlgorithm;         // select the fitting algorithm
134
135    \item  static TObjArray* fgkMaps;      // ALTRO mappings for RCU0..RCUX
136 \end{itemize}
137
138 \paragraph*{Clusterization }
139 \begin{itemize}
140
141    \item  Float\_t fClusteringThreshold ; // Minimum energy to seed a EC digit in a cluster
142
143    \item  Float\_t fW0 ;                       // Logarithmic weight for the cluster center of gravity calculation
144
145    \item  Float\_t fMinECut;                  // Minimum energy for a digit to be a member of a cluster
146
147    \item  Bool\_t  fUnfold;                   // Flag to perform cluster unfolding
148
149    \item  Float\_t fLocMaxCut;              // Minimum energy difference to consider local maxima in a cluster
150
151    \item  Float\_t fTimeCut ;                // Maximum difference time of digits in EMC cluster
152
153    \item  Float\_t fTimeMin ;                // Minimum time of digits
154
155    \item  Float\_t fTimeMax ;               // Maximum time of digits
156 \end{itemize}
157
158 \paragraph*{Track Matching}
159 \begin{itemize}
160
161    \item  Double\_t  fTrkCutX;              // X-difference cut for track matching
162
163    \item  Double\_t  fTrkCutY;              // Y-difference cut for track matching
164
165    \item  Double\_t  fTrkCutZ;              // Z-difference cut for track matching
166
167    \item  Double\_t  fTrkCutR;              // cut on allowed track-cluster distance
168
169    \item  Double\_t  fTrkCutAlphaMin;    // cut on 'alpha' parameter for track matching (min)
170
171    \item  Double\_t  fTrkCutAlphaMax;   // cut on 'alpha' parameter for track matching (min)
172
173    \item  Double\_t  fTrkCutAngle;        // cut on relative angle between different track points for track matching
174
175    \item  Double\_t  fTrkCutNITS;         // Number of ITS hits for track matching
176
177    \item  Double\_t  fTrkCutNTPC;         // Number of TPC hits for track matching
178 \end{itemize}
179
180  \paragraph*{PID}
181 \begin{itemize}
182
183   \item  Double\_t fGamma[6][6];              // Parameter to Compute PID for photons     
184
185    \item Double\_t fGamma1to10[6][6];      // Parameter to Compute PID not used
186
187   \item  Double\_t fHadron[6][6];               // Parameter to Compute PID for hadrons     
188
189    \item Double\_t fHadron1to10[6][6];       // Parameter to Compute PID for hadrons between 1 and 10 GeV    
190
191    \item Double\_t fHadronEnergyProb[6];   // Parameter to Compute PID for energy ponderation for hadrons          
192
193    \item Double\_t fPiZeroEnergyProb[6];    // Parameter to Compute PID for energy ponderation for Pi0      
194
195    \item Double\_t fGammaEnergyProb[6];  // Parameter to Compute PID for energy ponderation for gamma    
196
197    \item Double\_t fPiZero[6][6];                // Parameter to Compute PID for pi0     
198 \end{itemize}
199
200  
201
202 The macro 
203 \begin{lstlisting}
204 $ALICE_ROOT/EMCAL/macros/RecParamDB/AliEMCALSetRecParamCDB.C
205 \end{lstlisting} 
206 is an example on how to set the parameters. There are different event types that we might record, and each event type may require different reconstruction parameters. The event types that are now defined in STEER/AliRecoParam.h are:
207 \begin{lstlisting}
208   enum EventSpecie\_t {kDefault = 1, kLowMult = 2, kHighMult = 4, kCosmic = 8, kCalib = 16};
209 \end{lstlisting} 
210
211
212 The default event species that we have is kLowMult (low multiplicity). For AliRoot versions smaller than release 4.17 it was set to be kHighMult (high multiplicity). Today, the code is as follow :
213 \begin{lstlisting}
214  kDefault=kLowMult=kCosmic=kCalib.
215  \end{lstlisting} 
216  kHighMult differs only from the other two in 2 clusterization parameters, for low multiplicity they are fMinECut=10 MeV and fClusteringThreshold=100 MeV and for high multiplicity they are fMinECut=0.45 GeV and fClusteringThreshold=0.5 GeV.
217
218 A simple example that shows how to print the parameters for the different event species is PrintEMCALRecParam.C 
219
220
221 \subsection{Simulation parameters}
222
223
224 The parameters used in the simulation are stored in EMCAL/Calib/SimParam. What is stored is an object of the class AliEMCALSimParam which is a container of all the parameters used. There are different kind of parameters depending on the step of the simulation :
225
226 \paragraph*{SDigitization}
227 \begin{itemize}
228         \item Float\_t fA ;                      // Pedestal parameter
229
230         \item Float\_t fB ;                      // Slope Digitizition parameters
231
232         \item Float\_t fECPrimThreshold ; // To store primary if Shower Energy loss > threshold
233 \end{itemize} 
234
235 \paragraph*{Digitization}
236 \begin{itemize}
237        \item  Int\_t   fDigitThreshold  ;        // Threshold for storing digits in EMC = 3 ADC counts
238
239         \item Int\_t   fMeanPhotonElectron ; // number of photon electrons per GeV deposited energy = 4400 MeV/photon 
240
241          \item Float\_t fPinNoise ;                // Electronics noise in EMC = 12 MeV
242
243          \item Double\_t fTimeResolution ;    // Time resolution of FEE electronics = 600 ns
244
245          \item Int\_t   fNADCEC ;                 // number of channels in EC section ADC = 
246 \end{itemize}
247  
248
249 The macro \$ALICE\_ROOT/EMCAL/macros/SimParamDB/AliEMCALSetSimParamCDB.C, is an example on how to set the parameters. A simple example that shows how to print the parameters is PrintEMCALSimParam.C 
250
251 \subsection{Alignment}
252