]>
Commit | Line | Data |
---|---|---|
552957f3 | 1 | \section{EMCAL geometry software} |
2 | (Marco Bregant, Alexandre Shabetai, Gustavo Conesa Balbastre)\\ | |
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} |
552957f3 | 11 | \item AliEMCALGeometry: Steering geometry class. No dependencies on STEER or EMCAL non geometry classes. Can be called during the analysis without loading all AliRoot classes. |
02582a78 | 12 | \item AliEMCALEMCGeometry: Does the geometry initialization. Does all the definitions of the geometry (towers composition, size, Super Modules number ...) |
13 | \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. | |
14 | \item AliEMCALShishKebabTrd1Module: Here the modules are defined and the position of the modules in the local super module reference system is calculated | |
15 | \end{itemize} | |
16 | ||
f5c540cb | 17 | \subsection{Accessing the geometry} |
552957f3 | 18 | One can get the geometry pointer in the following way: |
19 | ||
20 | %\begin{DDbox}{\linewidth} | |
21 | \begin{lstlisting} | |
22 | AliEMCALGeometry * geom = AliEMCALGeometry::GetInstance(GeoName) ; | |
23 | \end{lstlisting} | |
24 | %\end{DDbox} | |
25 | ||
26 | where "GeoName" is a string, the different options are specified in the next section. If you have a already generated simulation file and want to access the geometry used there, if the file {\it galice.root} is available: | |
f5c540cb | 27 | |
28 | \begin{DDbox}{\linewidth} | |
29 | \begin{lstlisting} | |
30 | AliRunLoader *rl = AliRunLoader::Open("galice.root",AliConfig::GetDefaultEventFolderName(),"read"); | |
31 | rl->LoadgAlice();//Needed to get geometry | |
552957f3 | 32 | AliEMCALLoader *emcalLoader = dynamic_cast<AliEMCALLoader*>(rl->GetDetectorLoader("EMCAL")); |
f5c540cb | 33 | AliRun * alirun = rl->GetAliRun(); |
34 | AliEMCAL * emcal = (AliEMCAL*)alirun->GetDetector("EMCAL"); AliEMCALGeometry * geom = emcal->GetGeometry(); | |
f5c540cb | 35 | \end{lstlisting} |
36 | \end{DDbox} | |
552957f3 | 37 | |
38 | In this case you might need the file {\it 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. | |
02582a78 | 39 | |
f5c540cb | 40 | The way to load this file is: |
41 | %\begin{DDbox}{\linewidth} | |
42 | \begin{lstlisting} | |
43 | TGeoManager::Import("geometry.root"); | |
44 | \end{lstlisting} | |
45 | %\end{DDbox} | |
02582a78 | 46 | |
552957f3 | 47 | 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. They are also stored in the OADB. |
02582a78 | 48 | |
552957f3 | 49 | 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 {\it PrintGeometry()}. |
02582a78 | 50 | |
02582a78 | 51 | \subsection{Geometry configuration options} |
f5c540cb | 52 | Right now the following geometry options are implemented: |
02582a78 | 53 | \begin{itemize} |
eaccbd9e | 54 | \item EMCAL\_FIRSTYEARV1: 4 Super Modules, geometry configuration for year 2010. |
55 | \item EMCAL\_COMPLETEV1: 10 Super Modules, geometry configuration for year 2011. | |
56 | \item EMCAL\_COMPLETE12SMV1: 12 Super Modules (10+2$\times$1/3) full EMCal. Configuration for year 2012, although the 1/3 super-modules where not active. | |
486ebd44 | 57 | \item EMCAL\_COMPLETE12SMV1\_DCAL: Full EMCal plus 6 DCal super-modules. |
eaccbd9e | 58 | \item EMCAL\_COMPLETE12SMV1\_DCAL\_8SM: Full EMCal plus 6 DCal super-modules plus 2$\times$1/3 EMCal, geometry configuration for Run2 (years 2015-18). |
486ebd44 | 59 | \item EMCAL\_COMPLETE12SMV1\_DCAL\_DEV: Full EMCal plus 10 DCal super-modules (possible future configuration). |
02582a78 | 60 | \end{itemize} |
61 | ||
552957f3 | 62 | Other options exists but need to be removed as they {\bf should not be used} or that should be avoided: |
02582a78 | 63 | \begin{itemize} |
f5c540cb | 64 | \item EMCAL\_PDC06: Old geometry, for reading old data (which do not exist anymore). |
02582a78 | 65 | \item EMCAL\_WSU: Prototype geometry. |
eaccbd9e | 66 | \item EMCAL\_COMPLETE: 12 Super Modules (2 half Super Modules). Not correct geometry, use "V1" in name |
67 | \item EMCAL\_FIRSTYEAR: 4 Super Modules (year 2010). Not correct geometry, use "V1" in name. | |
02582a78 | 68 | \end{itemize} |
69 | ||
486ebd44 | 70 | By default, the geometry is loaded with the EMCAL\_COMPLETE12SMV1 configuration. For details on the implementation of the DCal geometry have a look here~\cite{DCalGeoOff} |
02582a78 | 71 | |
552957f3 | 72 | \subsection{Setting the geometry in simulations} |
73 | ||
74 | When configuring a simulation, a typical file {\it Config.C} is used. Inside this file, the detectors to be used in the generation are specified, and particularly EMCal is initialized in this way: | |
75 | ||
76 | \begin{lstlisting} | |
77 | AliEMCAL *EMCAL = = new AliEMCALv2("EMCAL", TString GeoName, Bool_t checkGeoRun); | |
78 | \end{lstlisting} | |
79 | ||
80 | Where: | |
81 | \begin{itemize} | |
82 | \item {\it AliEMCAL} is the main steering class for the simulation. The derived classes {\t AliEMCALvX}: | |
83 | \begin{itemize} | |
84 | \item {\it AliEMCALv0} does the geometry initialization, materials creation etc. | |
85 | \item {\it AliEMCALv1} derives from {\it v0}, DO NOT USE for simulation, originally it was meant for fast simulations, it does not generate hits. | |
86 | \item {\it AliEMCALv2} derives from {\it v1}, USE for simulation. It does all the particle propagation in the EMCal material | |
87 | \end{itemize} | |
88 | \item {\it TString GeoName}: Geometry names listed in the previous section | |
89 | \item {\it Bool\_t checkGeoRun}: Bool that activates the geometry initialization depending on the run number. Since EMCal geometry changed over time, to avoid mistakes in the configuration files of simulations anchored to particular run numbers, by default this is set to TRUE and the name set in the initialization of AliEMCAL is not taken into account but the one corresponding to this run. | |
90 | \end{itemize} | |
91 | ||
92 | ||
02582a78 | 93 | \subsection{Mapping} |
f5c540cb | 94 | 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 | 95 | |
96 | \begin{figure}[ht] | |
97 | \begin{center} | |
3ae81835 | 98 | \includegraphics[width=1.0\textwidth]{figures/EMCALMap0_0.pdf} |
02582a78 | 99 | \end{center} |
6ebd8b1a | 100 | \caption{\label{fig:Map1}Position of the super modules} |
02582a78 | 101 | \end{figure} |
102 | ||
103 | \begin{figure}[ht] | |
104 | \begin{center} | |
3ae81835 | 105 | \includegraphics[width=1.0\textwidth]{figures/EMCALMap1.pdf} |
02582a78 | 106 | \end{center} |
6ebd8b1a | 107 | \caption{\label{fig:Map0}EMCal seen from the magnet side with 4 SMs.} |
02582a78 | 108 | \end{figure} |
109 | ||
110 | ||
111 | \begin{figure}[ht] | |
112 | \begin{center} | |
3ae81835 | 113 | \includegraphics[width=1.0\textwidth]{figures/EMCALMap2.pdf} |
02582a78 | 114 | \end{center} |
6ebd8b1a | 115 | \caption{\label{fig:Map2}EMCal geometrical numbering.} |
02582a78 | 116 | \end{figure} |
117 | ||
118 | ||
119 | \subsection{Tower index transformation methods} | |
120 | \subsubsection{Absolute tower ID to Row/Column index} | |
02582a78 | 121 | |
f5c540cb | 122 | 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 | 123 | |
f5c540cb | 124 | \begin{itemize} |
125 | \item From absId to col-row: | |
02582a78 | 126 | |
f5c540cb | 127 | \begin{DDbox}{\linewidth} |
128 | \begin{lstlisting} | |
552957f3 | 129 | Int_t nSupMod, nModule, nIphi, nIeta, iphi, ieta; |
f5c540cb | 130 | //Check if this absId exists |
02582a78 | 131 | if(!CheckAbsCellId(absId)) return kFALSE; |
02582a78 | 132 | // Get from the absId the super module number, the module number and the eta-phi index (0 or 1) in the module |
02582a78 | 133 | GetCellIndex(absId, nSupMod, nModule, nIphi, nIeta); |
02582a78 | 134 | // 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) |
135 | GetCellPhiEtaIndexInSModule(nSupMod,nModule,nIphi,nIeta, iphi, ieta); | |
f5c540cb | 136 | \end{lstlisting} |
137 | \end{DDbox} | |
02582a78 | 138 | |
f5c540cb | 139 | \item From col-row to absId, following the same notation as above: |
140 | ||
141 | \begin{DDbox}{\linewidth} | |
142 | \begin{lstlisting} | |
02582a78 | 143 | |
144 | absid = GetAbsCellIdFromCellIndexes(nSupMode, iphi, ieta); | |
f5c540cb | 145 | \end{lstlisting} |
146 | \end{DDbox} | |
02582a78 | 147 | |
148 | or | |
149 | ||
f5c540cb | 150 | \begin{DDbox}{\linewidth} |
151 | \begin{lstlisting} | |
152 | ||
02582a78 | 153 | absid = GetAbsCellId(nSupMod, nModule, nIphi, nIeta); |
f5c540cb | 154 | \end{lstlisting} |
155 | \end{DDbox} | |
02582a78 | 156 | |
f5c540cb | 157 | \item Other interesting method is |
02582a78 | 158 | |
f5c540cb | 159 | \begin{DDbox}{\linewidth} |
160 | \begin{lstlisting} | |
02582a78 | 161 | |
552957f3 | 162 | Int_t GetSuperModuleNumber(Int_t absId) |
f5c540cb | 163 | \end{lstlisting} |
164 | \end{DDbox} | |
165 | \end{itemize} | |
02582a78 | 166 | |
167 | \subsection{Tower index to local / global reference system position} | |
168 | \subsubsection{Local coordinates} | |
02582a78 | 169 | |
f5c540cb | 170 | To correlate the tower index and its position in local coordinates, the following methods are available: |
171 | ||
172 | \begin{DDbox}{\linewidth} | |
173 | \begin{lstlisting} | |
552957f3 | 174 | Bool_t AliEMCALGeoUtils::RelPosCellInSModule(Int_t absId, Double_t &xr, Double_t &yr, Double_t &zr) const; |
02582a78 | 175 | |
552957f3 | 176 | Bool_t AliEMCALGeoUtils::RelPosCellInSModule(Int_t absId, Double_t loc[3]) const; |
02582a78 | 177 | |
552957f3 | 178 | Bool_t AliEMCALGeoUtils::RelPosCellInSModule(Int_t absId, TVector3 &vloc) const; |
f5c540cb | 179 | \end{lstlisting} |
180 | \end{DDbox} | |
181 | ||
182 | 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 | 183 | |
f5c540cb | 184 | \begin{DDbox}{\linewidth} |
185 | \begin{lstlisting} | |
02582a78 | 186 | |
187 | AliEMCALGeoUtils::CreateListOfTrd1Modules() | |
f5c540cb | 188 | \end{lstlisting} |
189 | \end{DDbox} | |
02582a78 | 190 | |
f5c540cb | 191 | {\color{red}<<<<<Someone else should explain how it works>>>>>} |
02582a78 | 192 | |
193 | ||
194 | ||
195 | In case we calculate the cluster position, things are a bit different. | |
196 | ||
197 | ||
198 | ||
f5c540cb | 199 | {\color{red}<<<<< This explanation should go to the clusterization section>>>>} |
02582a78 | 200 | |
201 | ||
202 | ||
203 | This is done in | |
204 | ||
f5c540cb | 205 | \begin{DDbox}{\linewidth} |
206 | \begin{lstlisting} | |
02582a78 | 207 | void AliEMCALRecPoint::EvalLocalPosition() |
f5c540cb | 208 | \end{lstlisting} |
209 | \end{DDbox} | |
02582a78 | 210 | |
211 | First we calculate the cell position with the method | |
212 | ||
f5c540cb | 213 | \begin{DDbox}{\linewidth} |
214 | \begin{lstlisting} | |
552957f3 | 215 | AliEMCALGeometry::RelPosCellInSModule(Int_t absId, Int_t maxAbsId, Double_t tmax, Double_t &xr, Double_t &yr, Double_t &zr) |
f5c540cb | 216 | \end{lstlisting} |
217 | \end{DDbox} | |
02582a78 | 218 | |
219 | The calculation of the cell position done here is different in the "x-z" but the same in "y". | |
220 | ||
221 | ||
222 | ||
f5c540cb | 223 | {\color{red}<<<<< <<<<<Someone else should explain how it works>>>>>} |
02582a78 | 224 | |
225 | ||
226 | ||
227 | ||
228 | 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 | |
229 | ||
f5c540cb | 230 | \begin{DDbox}{\linewidth} |
231 | \begin{lstlisting} | |
552957f3 | 232 | Double\t AliEMCALRecPoint::TmaxInCm(const Double_t e){ |
02582a78 | 233 | |
234 | //e: energy sum of cells | |
235 | ||
552957f3 | 236 | static Double_t ca = 4.82;// shower max parameter - first guess; ca=TMath::Log(1000./8.07) |
02582a78 | 237 | |
552957f3 | 238 | static Double_t x0 = 1.23; // radiation lenght (cm) |
02582a78 | 239 | |
552957f3 | 240 | static Double_t tmax = 0.; // position of electromagnetic shower max in cm |
02582a78 | 241 | |
242 | tmax = TMath::Log(e) + ca+0.5; | |
243 | ||
244 | tmax *= x0; // convert to cm | |
245 | ||
246 | } | |
f5c540cb | 247 | \end{lstlisting} |
248 | \end{DDbox} | |
02582a78 | 249 | |
f5c540cb | 250 | 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 | 251 | |
f5c540cb | 252 | \begin{DDbox}{\linewidth} |
253 | \begin{lstlisting} | |
552957f3 | 254 | w(cell i) = TMath::Max( 0., logWeight + TMath::Log( energy[cell i] / summed_cluster_cell_energy )); |
f5c540cb | 255 | \end{lstlisting} |
256 | \end{DDbox} | |
02582a78 | 257 | |
258 | where the logWeight was chosen to be 4.5 (this value was taken from PHOS, never optimized as far as I know) | |
259 | ||
260 | So in the end the position, is | |
261 | ||
f5c540cb | 262 | \begin{DDbox}{\linewidth} |
263 | \begin{lstlisting} | |
02582a78 | 264 | f = Sum(f(i) * w(i))/Sum(w(i)) |
f5c540cb | 265 | \end{lstlisting} |
266 | \end{DDbox} | |
02582a78 | 267 | |
268 | where f=x,y,z. | |
269 | ||
270 | ||
271 | ||
272 | \subsubsection{Global coordinates} | |
273 | ||
274 | ||
275 | To transform from local to global we have the methods | |
276 | ||
f5c540cb | 277 | \begin{DDbox}{\linewidth} |
278 | \begin{lstlisting} | |
279 | ||
552957f3 | 280 | void GetGlobal(const Double_t *loc, Double_t *glob, int ind) const; |
02582a78 | 281 | |
552957f3 | 282 | void GetGlobal(const TVector3 &vloc, TVector3 &vglob, int ind) const; |
02582a78 | 283 | |
552957f3 | 284 | void GetGlobal(Int_t absId, Double_t glob[3]) const; |
02582a78 | 285 | |
552957f3 | 286 | void GetGlobal(Int_t absId, TVector3 &vglob) const; |
f5c540cb | 287 | \end{lstlisting} |
288 | \end{DDbox} | |
02582a78 | 289 | |
290 | ||
291 | ||
292 | These methods take the local coordinates and transform them into global coordinates using the transformation matrix of the Super Module. | |
293 | ||
f5c540cb | 294 | \begin{DDbox}{\linewidth} |
295 | \begin{lstlisting} | |
02582a78 | 296 | |
297 | ||
298 | TGeoHMatrix* m = GetMatrixForSuperModule(nSupMod); | |
299 | ||
300 | if(m) m->LocalToMaster(loc, glob); | |
301 | ||
f5c540cb | 302 | \end{lstlisting} |
303 | \end{DDbox} | |
02582a78 | 304 | |
305 | ||
306 | GetGlobal is called in the following useful methods in the geometry class: | |
307 | ||
308 | ||
f5c540cb | 309 | \begin{itemize} |
310 | \item Return the eta and phi angular position of the cell from the AbsId | |
02582a78 | 311 | |
f5c540cb | 312 | \begin{DDbox}{\linewidth} |
313 | \begin{lstlisting} | |
552957f3 | 314 | void EtaPhiFromIndex(Int_t absId, Double_t &eta, Double_t &phi) const; |
315 | void EtaPhiFromIndex(Int_t absId, Float_t &eta, Float_t &phi) const; | |
f5c540cb | 316 | \end{lstlisting} |
317 | \end{DDbox} | |
318 | \item Print information of the cells. For "pri>0" returns more information. "tit" has not much use, this value is printed. | |
319 | ||
320 | \begin{DDbox}{\linewidth} | |
321 | \begin{lstlisting} | |
552957f3 | 322 | void PrintCellIndexes(Int_t absId, int pri, const char *tit) |
f5c540cb | 323 | \end{lstlisting} |
324 | \end{DDbox} | |
325 | \end{itemize} | |
02582a78 | 326 | |
327 | \subsection{Geometry Alignment} | |
f5c540cb | 328 | 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: |
329 | ||
330 | \begin{DDbox}{\linewidth} | |
331 | \begin{lstlisting} | |
332 | AliAlignObj | |
333 | AliAlignObjMatrix | |
334 | AliAlignObjParams | |
335 | AliAlignmentTracks | |
336 | \end{lstlisting} | |
337 | \end{DDbox} | |
338 | ||
339 | 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. |