]>
Commit | Line | Data |
---|---|---|
518eb852 | 1 | // $Id$ |
b453c965 | 2 | |
518eb852 | 3 | /*! |
b453c965 | 4 | |
91509ec6 | 5 | \page README_geometry Geometry |
518eb852 | 6 | |
7 | ||
8 | \section geometry_s1 General Information about MUON Geometry | |
1ecf5e57 | 9 | |
10 | Our geometry is described in the geometry builder classes. | |
91509ec6 | 11 | The main geometrical constants are set in the class AliMUONConstants. |
12 | The geometry is built from the code during running simulation | |
13 | and it is automatically exported in a geometry.root file | |
14 | via the framework. Then aliroot takes this geometry.root file as | |
15 | a unique geometrical info of our apparatus during the generation | |
16 | and the reconstruction and analysis (if needed) | |
17 | ||
9f9989b1 | 18 | The macros MakeMUONZeroMisAlignment.C, MakeMUONResMisAlignment.C |
19 | and MakeMUONFullMisAlignment.C generate the mis-alignment | |
20 | data (see more in the chapter \ref geometry_s4 below). | |
21 | ||
91509ec6 | 22 | The code can also generate the special geometry |
23 | data files, transform.dat and svmap.dat, via the macro | |
9f9989b1 | 24 | MUONGenerateGeometryData.C (see more in the chapter \ref geometry_s5 below). |
91509ec6 | 25 | The svmap.dat data file have to be recreated each time the code |
26 | of the geometry is modified. The info (well updated) in this file | |
27 | is needed during the simulation. | |
1ecf5e57 | 28 | We can also decide to use the transform.dat file as input of our |
29 | geometry. This allows for changing the position of our detection elements | |
30 | and/or half-planes (half-chambers in code jargon) without modifying | |
31 | and recompiling the code. | |
32 | ||
1ecf5e57 | 33 | Misalignments are in the official AliRoot code applied to the geometry.root |
34 | file. | |
35 | ||
b453c965 | 36 | |
91509ec6 | 37 | \section geometry_s2 How to check the geometry with the Root geometrical modeler |
1ecf5e57 | 38 | |
518eb852 | 39 | \see ftp://root.cern.ch/root/doc/chapter16.pdf |
40 | \see http://agenda.cern.ch/fullAgenda.php?ida=a05212 | |
1ecf5e57 | 41 | |
518eb852 | 42 | <pre> |
9f9989b1 | 43 | AliMpCDB::LoadMpSegmentation2(); |
1ecf5e57 | 44 | gAlice->Init("$ALICE_ROOT/MUON/Config.C"); |
45 | gGeoManager->GetMasterVolume()->Draw(); | |
518eb852 | 46 | </pre> |
47 | ||
91509ec6 | 48 | \section geometry_s3 How to check the overlaps with the Root geometrical modeler |
1ecf5e57 | 49 | |
518eb852 | 50 | \see ftp://root.cern.ch/root/doc/chapter16.pdf |
51 | \see http://agenda.cern.ch/fullAgenda.php?ida=a05212 | |
1ecf5e57 | 52 | |
518eb852 | 53 | <pre> |
9f9989b1 | 54 | AliMpCDB::LoadMpSegmentation2(); |
1ecf5e57 | 55 | gAlice->Init("$ALICE_ROOT/MUON/Config.C"); |
56 | gGeoManager->CheckOverlaps(); | |
57 | gGeoManager->PrintOverlaps(); | |
518eb852 | 58 | </pre> |
1ecf5e57 | 59 | |
9f9989b1 | 60 | More extensive, but also more time consuming checking, |
61 | can be performed in this way: | |
62 | <pre> | |
63 | gGeoManager->CheckGeometryFull(); | |
64 | </pre> | |
65 | ||
1ecf5e57 | 66 | |
518eb852 | 67 | \section geometry_s4 Macro MUONGenerateGeometryData.C |
1ecf5e57 | 68 | |
91509ec6 | 69 | Macro for generating the geometry data files: |
1ecf5e57 | 70 | - MUON/data/svmap.dat file contains all the information to link |
71 | each geant volume (it can be extended to other virtual MC) with | |
72 | a detection element. The point here is that a given detection | |
73 | element, i.e. a slat chamber can consist of more geant volumes. | |
74 | the correspondence is then defined in an input file. | |
75 | Each time there is a change in the definition of MC geometry, these | |
76 | input files must be re-generated via the macro | |
77 | MUONGenerateGeometryData.C | |
91509ec6 | 78 | - MUON/data/transform.dat file contains the transformations |
79 | data (translation and rotation) for all alignable objects | |
80 | (modules & detection elements) | |
1ecf5e57 | 81 | |
82 | To be run from aliroot: | |
518eb852 | 83 | <pre> |
1ecf5e57 | 84 | .x MUONGenerateGeometryData.C |
518eb852 | 85 | </pre> |
1ecf5e57 | 86 | |
87 | The generated files do not replace the existing ones | |
88 | but have different names (with extension ".out"). | |
89 | Replacement with new files has to be done manually. | |
90 | ||
91 | ||
518eb852 | 92 | \section geometry_s5 Macros to generate Mis-alignment data |
1ecf5e57 | 93 | |
518eb852 | 94 | Macros for generating the geometry mis-alignment data: |
95 | - MakeMUONFullMisAlignment.C | |
96 | - MakeMUONResMisAlignment.C | |
97 | - MakeMUONZeroMisAlignment.C | |
1ecf5e57 | 98 | |
99 | To be run from aliroot: | |
518eb852 | 100 | <pre> |
91509ec6 | 101 | .x MakeMUONFullMisAlignment.C |
518eb852 | 102 | </pre> |
1ecf5e57 | 103 | |
91509ec6 | 104 | etc. |
105 | ||
1ecf5e57 | 106 | If the environment variable TOCDB is not set to "kTRUE", |
107 | the misalignment data are generated in a local file: | |
9f9989b1 | 108 | MUONfullMisalignment.root, etc. |
1ecf5e57 | 109 | |
110 | If the data are stored in CDB, the storage can be specified in | |
111 | the environment variable STORAGE. The misalignment data are then | |
112 | generated in the CDB folder (defaults are ResMisAlignCDB and FullMisAlignCDB | |
113 | in the working directory). Inside the local CDB the path for the | |
114 | alignment data is (and must be) "MUON/Align/Data/". | |
115 | Residual misalignment: Default is our current estimate of | |
116 | misalignment after all our alignment procedure has been applied. | |
117 | Full misalignment: Default is our current estimate of initial | |
118 | misalignment. | |
119 | ||
9f9989b1 | 120 | The mis-alignment data can be then retrieved from a file |
121 | and applied to ideal geometry in this way. | |
122 | ||
123 | <pre> | |
124 | TGeoManager::Import("geometry.root"); | |
125 | TFile f("MUONfullMisalignment.root"); | |
126 | TClonesArray* misAlignObjsArray = (TClonesArray*)f.Get("MUONAlignObjs"); | |
127 | AliGeomManager::ApplyAlignObjsToGeom(*misAlignObjsArray); | |
128 | </pre> | |
129 | ||
130 | Mis-aligned geometry can be then inspected in the same | |
131 | way as described in the chapters \ref geometry_s2 and \ref geometry_s3. | |
518eb852 | 132 | |
133 | \section geometry_s6 How to check the alignment software | |
1ecf5e57 | 134 | |
135 | The script AlirootRun_MUONtestAlign.sh allows you to check the software for | |
136 | the alignment with physics tracks. The script will: | |
137 | - Generate a misaligned geometry in a local CDB (default FullMisAlignCDB) | |
138 | - Simulate 1000 events using previously misaligned geometry | |
139 | - Reconstruct the events using perfect geometry | |
140 | - Run the alignment code over the above events using MUONAlignment.C | |
141 | ||
142 | To run you need to type: | |
518eb852 | 143 | <pre> |
1ecf5e57 | 144 | $ALICE_ROOT/MUON/AlirootRun_MUONtestAlign.sh |
518eb852 | 145 | </pre> |
1ecf5e57 | 146 | |
147 | The results of the test are saved in test_align/ directory. The file measShifts.root | |
148 | contains useful graphs for studying the alignment performances. A local CDB | |
149 | containing the realigned geometry is also created (default is ReAlignCDB). The | |
150 | file $ALICE_ROOT/MUON/data/transform2ReAlign.dat contains the | |
151 | transformations describing the realigned geometry to be compared with the | |
152 | used misaligned geometry $ALICE_ROOT/MUON/data/transform2.dat. | |
153 | ||
154 | IMPORTANT NOTE: For a useful test of the alignment performances, the | |
155 | order of 100 000 tracks is needed, it is then advisable to generate and | |
156 | reconstruct enough events separately and run MUONAlignment.C providing a file list | |
157 | afterwards. | |
518eb852 | 158 | |
701d0777 | 159 | \section geometry_s7 Macro MUONCheckMisAligner.C |
160 | ||
161 | The macro MUONCheckMisAligner.C performs the misalignment on an existing muon | |
162 | arm geometry based on the standard definition of the detector elements. | |
163 | ||
1ba08db3 | 164 | To be run from aliroot: |
165 | <pre> | |
166 | AliMpCDB::LoadMpSegmentation2(); | |
167 | .x MUONCheckMisAligner.C | |
168 | </pre> | |
169 | ||
701d0777 | 170 | It uses AliMUONGeometryAligner : |
91509ec6 | 171 | - Creates a new AliMUONGeometryTransformer and AliMUONGeometryAligner |
1ba08db3 | 172 | - Loads the geometry from the specified geometry file (default is geometry.root) |
91509ec6 | 173 | - Creates a second AliMUONGeometryTransformer by misaligning the existing |
701d0777 | 174 | one using AliMUONAligner::MisAlign |
175 | ||
176 | User has to specify the magnitude of the alignments, in the Cartesian | |
177 | co-ordiantes (which are used to apply translation misalignments) and in the | |
178 | spherical co-ordinates (which are used to apply angular displacements) | |
179 | ||
180 | User can also set misalignment ranges by hand using the methods : | |
181 | SetMaxCartMisAlig, SetMaxAngMisAlig, SetXYAngMisAligFactor | |
182 | (last method takes account of the fact that the misalingment is greatest in | |
183 | the XY plane, since the detection elements are fixed to a support structure | |
184 | in this plane. Misalignments in the XZ and YZ plane will be very small | |
185 | compared to those in the XY plane, which are small already - of the order | |
186 | of microns) | |
187 | ||
188 | Default behavior generates a "residual" misalignment using gaussian | |
189 | distributions. Uniform distributions can still be used, see | |
190 | AliMUONGeometryAligner. | |
191 | ||
192 | User can also generate module misalignments using SetModuleCartMisAlig | |
193 | and SetModuleAngMisAlig | |
194 | Note : If the detection elements are allowed to be misaligned in all | |
195 | directions, this has consequences for the alignment algorithm, which | |
196 | needs to know the number of free parameters. Eric only allowed 3 : | |
197 | x,y,theta_xy, but in principle z and the other two angles are alignable | |
198 | as well. | |
199 | ||
200 | ||
91509ec6 | 201 | \section geometry_s8 Geometry data files format |
518eb852 | 202 | |
701d0777 | 203 | \subsection geometry_s8_sub1 transform.dat |
518eb852 | 204 | |
205 | List of transformations for chambers geometry modules and detection | |
206 | elements; in format: | |
207 | <pre> | |
208 | KEY ID [nofDE] pos: posX posY posZ rot: theX phiX theY phiY theZ phiZ | |
209 | ||
210 | where KEY = CH or DE | |
211 | ID = chamberId or detElemId | |
212 | pos: posX posY posZ = position in cm | |
213 | rot: theX phiX theY phiY theZ phiZ = rotation angles as in Geant3 in deg | |
214 | </pre> | |
215 | ||
701d0777 | 216 | \subsection geometry_s8_sub2 svmap.dat |
518eb852 | 217 | |
218 | Map of sensitive volumes to detction element Ids; | |
219 | in format: | |
220 | ||
221 | <pre> | |
222 | KEY volpath detElemId | |
223 | ||
224 | where KEY = SV | |
225 | volpath = volume path in format /volname1_copyNo1/volname2_copyNo2/... | |
226 | detElemId = detection element Id | |
227 | </pre> | |
228 | ||
229 | ||
91509ec6 | 230 | This chapter is defined in the READMEgeometry.txt file. |
231 | ||
518eb852 | 232 | */ |