]>
Commit | Line | Data |
---|---|---|
f5c540cb | 1 | \section{EMCAL geometry software - Marco +++} |
02582a78 | 2 | |
02582a78 | 3 | |
f5c540cb | 4 | This page is intended for a description of the EMCAL geometry and the methods to access it. |
5 | {\it This is a very preliminary version that needs work.} | |
02582a78 | 6 | |
f5c540cb | 7 | \subsection {Classes description} |
8 | ||
9 | The EMCAL geometry is implemented in several classes : {\color{red} (right now very brief description, it should be completed) } | |
02582a78 | 10 | \begin{itemize} |
f5c540cb | 11 | \item AliEMCALGeoUtils: Steering geometry class. No dependencies on STEER or EMCAL non geometry classes. Can be called during the analysis without loading all aliroot classes. |
12 | \item AliEMCALGeometry: Derives from AliEMCALGeoUtils, contains dependencies on other EMCAL classes (AliEMCALRecPoint). | |
02582a78 | 13 | \item AliEMCALEMCGeometry: Does the geometry initialization. Does all the definitions of the geometry (towers composition, size, Super Modules number ...) |
14 | \item AliEMCALGeoParams: Class container of some of the geometry parameters so that it can be accessed everywhere in the EMCAL code, to avoid "magic numbers". Its use has to be propagated to all the code. | |
15 | \item AliEMCALShishKebabTrd1Module: Here the modules are defined and the position of the modules in the local super module reference system is calculated | |
16 | \end{itemize} | |
17 | ||
f5c540cb | 18 | \subsection{Accessing the geometry} |
19 | One can get the geometry pointer in the following ways: | |
20 | \begin{itemize} | |
21 | \item If galice.root is available: | |
22 | ||
23 | \begin{DDbox}{\linewidth} | |
24 | \begin{lstlisting} | |
25 | AliRunLoader *rl = AliRunLoader::Open("galice.root",AliConfig::GetDefaultEventFolderName(),"read"); | |
26 | rl->LoadgAlice();//Needed to get geometry | |
27 | AliEMCALLoader *emcalLoader = dynamic\_cast<AliEMCALLoader*>(rl->GetDetectorLoader("EMCAL")); | |
28 | AliRun * alirun = rl->GetAliRun(); | |
29 | AliEMCAL * emcal = (AliEMCAL*)alirun->GetDetector("EMCAL"); AliEMCALGeometry * geom = emcal->GetGeometry(); | |
30 | else, if galice.root is not available: | |
31 | AliEMCALGeometry * geom = AliEMCALGeometry::GetInstance("EMCAL\_COMPLETE") ; | |
32 | ||
33 | \end{lstlisting} | |
34 | \end{DDbox} | |
35 | \end{itemize} | |
02582a78 | 36 | In this case you might need the file geometry.root if you want to access to certain methods that require local to global position transformations. This file can be generated doing a simple simulation, it just contains the transformation matrix to go from global to local. |
37 | ||
f5c540cb | 38 | The way to load this file is: |
39 | %\begin{DDbox}{\linewidth} | |
40 | \begin{lstlisting} | |
41 | TGeoManager::Import("geometry.root"); | |
42 | \end{lstlisting} | |
43 | %\end{DDbox} | |
02582a78 | 44 | |
45 | The transformation matrices are also stored in the ESDs so if you do not load this file, you can have to load these matrices from the ESDs. | |
46 | ||
f5c540cb | 47 | If you want to see different parameters used in the geometry printed (cells centers, distance to IP, etc), one just has to execute the method PrintGeometry(). |
02582a78 | 48 | |
49 | ||
50 | \subsection{Geometry configuration options} | |
f5c540cb | 51 | Right now the following geometry options are implemented: |
02582a78 | 52 | \begin{itemize} |
53 | \item EMCAL\_COMPLETE: 12 Super Modules (2 half Super Modules) | |
54 | \item EMCAL\_FIRSTYEAR: 4 Super Modules (year 2010) | |
55 | \item EMCAL\_FIRSTYEARV1: 4 Super Modules, corrected geometry (year 2010) | |
56 | \item EMCAL\_COMPLETEV1: 10 Super Modules, corrected geometry (year 2011) | |
57 | \item EMCAL\_COMPLETE12SMV1: 12 Super Modules (10+2/3), corrected geometry (year 2012) | |
58 | \end{itemize} | |
59 | ||
f5c540cb | 60 | Other options exists but need to be removed as they {\bf should not be used}: |
02582a78 | 61 | \begin{itemize} |
f5c540cb | 62 | \item EMCAL\_PDC06: Old geometry, for reading old data (which do not exist anymore). |
02582a78 | 63 | \item EMCAL\_WSU: Prototype geometry. |
64 | \end{itemize} | |
65 | ||
f5c540cb | 66 | By default, the geometry is loaded with the EMCAL\_COMPLETE12SMV1 configuration. |
02582a78 | 67 | |
68 | ||
69 | \subsection{Mapping} | |
f5c540cb | 70 | The tower row/column mapping online and offline follows the alice numbering convention. Figures~\ref{fig:Map1} to \ref{fig:Map2} display the position of the super modules from different points of view and the position of the tower index in them. |
02582a78 | 71 | |
72 | \begin{figure}[ht] | |
73 | \begin{center} | |
3ae81835 | 74 | \includegraphics[width=1.0\textwidth]{figures/EMCALMap0_0.pdf} |
02582a78 | 75 | \end{center} |
6ebd8b1a | 76 | \caption{\label{fig:Map1}Position of the super modules} |
02582a78 | 77 | \end{figure} |
78 | ||
79 | \begin{figure}[ht] | |
80 | \begin{center} | |
3ae81835 | 81 | \includegraphics[width=1.0\textwidth]{figures/EMCALMap1.pdf} |
02582a78 | 82 | \end{center} |
6ebd8b1a | 83 | \caption{\label{fig:Map0}EMCal seen from the magnet side with 4 SMs.} |
02582a78 | 84 | \end{figure} |
85 | ||
86 | ||
87 | \begin{figure}[ht] | |
88 | \begin{center} | |
3ae81835 | 89 | \includegraphics[width=1.0\textwidth]{figures/EMCALMap2.pdf} |
02582a78 | 90 | \end{center} |
6ebd8b1a | 91 | \caption{\label{fig:Map2}EMCal geometrical numbering.} |
02582a78 | 92 | \end{figure} |
93 | ||
94 | ||
95 | \subsection{Tower index transformation methods} | |
96 | \subsubsection{Absolute tower ID to Row/Column index} | |
02582a78 | 97 | |
f5c540cb | 98 | Each EMCAL supermodule is composed of 24x48 towers (phi,eta), grouped in 4x4 modules. Each tower (even each module) has a unique number assigned, called in the code "absolute ID" number (absId). This number can be transformed into a row (phi direction) or column (eta direction) index. The procedure to go from the absId to the (row, col) formulation or viceversa is as follow: |
02582a78 | 99 | |
f5c540cb | 100 | \begin{itemize} |
101 | \item From absId to col-row: | |
02582a78 | 102 | |
f5c540cb | 103 | \begin{DDbox}{\linewidth} |
104 | \begin{lstlisting} | |
105 | Int\_t nSupMod, nModule, nIphi, nIeta, iphi, ieta; | |
106 | //Check if this absId exists | |
02582a78 | 107 | if(!CheckAbsCellId(absId)) return kFALSE; |
02582a78 | 108 | // Get from the absId the super module number, the module number and the eta-phi index (0 or 1) in the module |
02582a78 | 109 | GetCellIndex(absId, nSupMod, nModule, nIphi, nIeta); |
02582a78 | 110 | // Get from the the super module number, the module number and the eta-phi index (0 or 1) in the module the tower row (iphi) and column (ieta) |
111 | GetCellPhiEtaIndexInSModule(nSupMod,nModule,nIphi,nIeta, iphi, ieta); | |
f5c540cb | 112 | \end{lstlisting} |
113 | \end{DDbox} | |
02582a78 | 114 | |
f5c540cb | 115 | \item From col-row to absId, following the same notation as above: |
116 | ||
117 | \begin{DDbox}{\linewidth} | |
118 | \begin{lstlisting} | |
02582a78 | 119 | |
120 | absid = GetAbsCellIdFromCellIndexes(nSupMode, iphi, ieta); | |
f5c540cb | 121 | \end{lstlisting} |
122 | \end{DDbox} | |
02582a78 | 123 | |
124 | or | |
125 | ||
f5c540cb | 126 | \begin{DDbox}{\linewidth} |
127 | \begin{lstlisting} | |
128 | ||
02582a78 | 129 | absid = GetAbsCellId(nSupMod, nModule, nIphi, nIeta); |
f5c540cb | 130 | \end{lstlisting} |
131 | \end{DDbox} | |
02582a78 | 132 | |
f5c540cb | 133 | \item Other interesting method is |
02582a78 | 134 | |
f5c540cb | 135 | \begin{DDbox}{\linewidth} |
136 | \begin{lstlisting} | |
02582a78 | 137 | |
f5c540cb | 138 | Int\_t GetSuperModuleNumber(Int\_t absId) |
139 | \end{lstlisting} | |
140 | \end{DDbox} | |
141 | \end{itemize} | |
02582a78 | 142 | |
143 | \subsection{Tower index to local / global reference system position} | |
144 | \subsubsection{Local coordinates} | |
02582a78 | 145 | |
f5c540cb | 146 | To correlate the tower index and its position in local coordinates, the following methods are available: |
147 | ||
148 | \begin{DDbox}{\linewidth} | |
149 | \begin{lstlisting} | |
02582a78 | 150 | Bool\_t AliEMCALGeoUtils::RelPosCellInSModule(Int\_t absId, Double\_t \&xr, Double\_t \&yr, Double\_t \&zr) const; |
151 | ||
152 | Bool\_t AliEMCALGeoUtils::RelPosCellInSModule(Int\_t absId, Double\_t loc[3]) const; | |
153 | ||
154 | Bool\_t AliEMCALGeoUtils::RelPosCellInSModule(Int\_t absId, TVector3 \&vloc) const; | |
f5c540cb | 155 | \end{lstlisting} |
156 | \end{DDbox} | |
157 | ||
158 | To which the input is the absId and the output are the coordinates of the center of towers in the local coordinates of the Super Module. This method gets the column and row index of the cell from the absId, independently of the Super Module (like above), and gets the center of the cell from 3 arrays (x,y,z) filled with such quantities. Such central positions are calculated during the initialization of the geometry, where the arrys are filled, in the method : | |
02582a78 | 159 | |
f5c540cb | 160 | \begin{DDbox}{\linewidth} |
161 | \begin{lstlisting} | |
02582a78 | 162 | |
163 | AliEMCALGeoUtils::CreateListOfTrd1Modules() | |
f5c540cb | 164 | \end{lstlisting} |
165 | \end{DDbox} | |
02582a78 | 166 | |
f5c540cb | 167 | {\color{red}<<<<<Someone else should explain how it works>>>>>} |
02582a78 | 168 | |
169 | ||
170 | ||
171 | In case we calculate the cluster position, things are a bit different. | |
172 | ||
173 | ||
174 | ||
f5c540cb | 175 | {\color{red}<<<<< This explanation should go to the clusterization section>>>>} |
02582a78 | 176 | |
177 | ||
178 | ||
179 | This is done in | |
180 | ||
f5c540cb | 181 | \begin{DDbox}{\linewidth} |
182 | \begin{lstlisting} | |
02582a78 | 183 | void AliEMCALRecPoint::EvalLocalPosition() |
f5c540cb | 184 | \end{lstlisting} |
185 | \end{DDbox} | |
02582a78 | 186 | |
187 | First we calculate the cell position with the method | |
188 | ||
f5c540cb | 189 | \begin{DDbox}{\linewidth} |
190 | \begin{lstlisting} | |
02582a78 | 191 | AliEMCALGeometry::RelPosCellInSModule(Int\_t absId, Int\_t maxAbsId, Double\_t tmax, Double\_t \&xr, Double\_t \&yr, Double\_t \&zr) |
f5c540cb | 192 | \end{lstlisting} |
193 | \end{DDbox} | |
02582a78 | 194 | |
195 | The calculation of the cell position done here is different in the "x-z" but the same in "y". | |
196 | ||
197 | ||
198 | ||
f5c540cb | 199 | {\color{red}<<<<< <<<<<Someone else should explain how it works>>>>>} |
02582a78 | 200 | |
201 | ||
202 | ||
203 | ||
204 | In this particular case the position calculation per tower depends on the position of the maximum cell, and the sum of the energy of the cells of the cluster. The maximum depth (tmax) is calculated with the method | |
205 | ||
f5c540cb | 206 | \begin{DDbox}{\linewidth} |
207 | \begin{lstlisting} | |
02582a78 | 208 | Double\_t AliEMCALRecPoint::TmaxInCm(const Double\_t e){ |
209 | ||
210 | //e: energy sum of cells | |
211 | ||
212 | static Double\_t ca = 4.82;// shower max parameter - first guess; ca=TMath::Log(1000./8.07) | |
213 | ||
214 | static Double\_t x0 = 1.23; // radiation lenght (cm) | |
215 | ||
216 | static Double\_t tmax = 0.; // position of electromagnetic shower max in cm | |
217 | ||
218 | tmax = TMath::Log(e) + ca+0.5; | |
219 | ||
220 | tmax *= x0; // convert to cm | |
221 | ||
222 | } | |
f5c540cb | 223 | \end{lstlisting} |
224 | \end{DDbox} | |
02582a78 | 225 | |
f5c540cb | 226 | After the cells position of the cluster is accessed, the position of the cluster is calculated averaging the cell positions with a logarithmic weight: |
02582a78 | 227 | |
f5c540cb | 228 | \begin{DDbox}{\linewidth} |
229 | \begin{lstlisting} | |
02582a78 | 230 | w(cell i) = TMath::Max( 0., logWeight + TMath::Log( energy[cell i] / summed\_cluster\_cell\_energy )); |
f5c540cb | 231 | \end{lstlisting} |
232 | \end{DDbox} | |
02582a78 | 233 | |
234 | where the logWeight was chosen to be 4.5 (this value was taken from PHOS, never optimized as far as I know) | |
235 | ||
236 | So in the end the position, is | |
237 | ||
f5c540cb | 238 | \begin{DDbox}{\linewidth} |
239 | \begin{lstlisting} | |
02582a78 | 240 | f = Sum(f(i) * w(i))/Sum(w(i)) |
f5c540cb | 241 | \end{lstlisting} |
242 | \end{DDbox} | |
02582a78 | 243 | |
244 | where f=x,y,z. | |
245 | ||
246 | ||
247 | ||
248 | \subsubsection{Global coordinates} | |
249 | ||
250 | ||
251 | To transform from local to global we have the methods | |
252 | ||
f5c540cb | 253 | \begin{DDbox}{\linewidth} |
254 | \begin{lstlisting} | |
255 | ||
02582a78 | 256 | void GetGlobal(const Double\_t *loc, Double\_t *glob, int ind) const; |
257 | ||
258 | void GetGlobal(const TVector3 \&vloc, TVector3 \&vglob, int ind) const; | |
259 | ||
260 | void GetGlobal(Int\_t absId, Double\_t glob[3]) const; | |
261 | ||
262 | void GetGlobal(Int\_t absId, TVector3 \&vglob) const; | |
f5c540cb | 263 | \end{lstlisting} |
264 | \end{DDbox} | |
02582a78 | 265 | |
266 | ||
267 | ||
268 | These methods take the local coordinates and transform them into global coordinates using the transformation matrix of the Super Module. | |
269 | ||
f5c540cb | 270 | \begin{DDbox}{\linewidth} |
271 | \begin{lstlisting} | |
02582a78 | 272 | |
273 | ||
274 | TGeoHMatrix* m = GetMatrixForSuperModule(nSupMod); | |
275 | ||
276 | if(m) m->LocalToMaster(loc, glob); | |
277 | ||
f5c540cb | 278 | \end{lstlisting} |
279 | \end{DDbox} | |
02582a78 | 280 | |
281 | ||
282 | GetGlobal is called in the following useful methods in the geometry class: | |
283 | ||
284 | ||
f5c540cb | 285 | \begin{itemize} |
286 | \item Return the eta and phi angular position of the cell from the AbsId | |
02582a78 | 287 | |
f5c540cb | 288 | \begin{DDbox}{\linewidth} |
289 | \begin{lstlisting} | |
02582a78 | 290 | void EtaPhiFromIndex(Int\_t absId, Double\_t \&eta, Double\_t \&phi) const; |
291 | void EtaPhiFromIndex(Int\_t absId, Float\_t \&eta, Float\_t \&phi) const; | |
f5c540cb | 292 | \end{lstlisting} |
293 | \end{DDbox} | |
294 | \item Print information of the cells. For "pri>0" returns more information. "tit" has not much use, this value is printed. | |
295 | ||
296 | \begin{DDbox}{\linewidth} | |
297 | \begin{lstlisting} | |
02582a78 | 298 | void PrintCellIndexes(Int\_t absId, int pri, const char *tit) |
f5c540cb | 299 | \end{lstlisting} |
300 | \end{DDbox} | |
301 | \end{itemize} | |
02582a78 | 302 | |
303 | \subsection{Geometry Alignment} | |
f5c540cb | 304 | AliRoot contains a frame for the correction of the misplacement of geometry objects with respect to the ideal positions which are kept in the STEER/ directory of the following classes: |
305 | ||
306 | \begin{DDbox}{\linewidth} | |
307 | \begin{lstlisting} | |
308 | AliAlignObj | |
309 | AliAlignObjMatrix | |
310 | AliAlignObjParams | |
311 | AliAlignmentTracks | |
312 | \end{lstlisting} | |
313 | \end{DDbox} | |
314 | ||
315 | The class AliEMCALSurvey creates the corrections to the alignable objects. The class AliEMCALSurvey was established to take the survey parameters from OCDB, calculate the shift in position of the center of the end faces of the supermodules from the nominal position, and convert this to a transformation matrix for each supermodule which is applied to correct the global position of the supermodules. All calculations of global positions would then use these corrected supermodule positions to determine their locations within the ALICE global coordinate system. |