5 \page README_geometry Geometry
8 \section geometry_s1 General Information about MUON Geometry
10 Our geometry is described in the geometry builder classes.
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)
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).
22 The code can also generate the special geometry
23 data files, transform.dat and svmap.dat, via the macro
24 MUONGenerateGeometryData.C (see more in the chapter \ref geometry_s5 below).
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.
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.
33 Misalignments are in the official AliRoot code applied to the geometry.root
37 \section geometry_s2 How to check the geometry with the Root geometrical modeler
39 \see ftp://root.cern.ch/root/doc/chapter16.pdf
40 \see http://agenda.cern.ch/fullAgenda.php?ida=a05212
43 AliMpCDB::LoadMpSegmentation2();
44 gAlice->Init("$ALICE_ROOT/MUON/Config.C");
45 gGeoManager->GetMasterVolume()->Draw();
48 \section geometry_s3 How to check the overlaps with the Root geometrical modeler
50 \see ftp://root.cern.ch/root/doc/chapter16.pdf
51 \see http://agenda.cern.ch/fullAgenda.php?ida=a05212
54 AliMpCDB::LoadMpSegmentation2();
55 gAlice->Init("$ALICE_ROOT/MUON/Config.C");
56 gGeoManager->CheckOverlaps();
57 gGeoManager->PrintOverlaps();
60 More extensive, but also more time consuming checking,
61 can be performed in this way:
63 gGeoManager->CheckGeometryFull();
67 \section geometry_s4 Macro MUONGenerateGeometryData.C
69 Macro for generating the geometry data files:
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
78 - MUON/data/transform.dat file contains the transformations
79 data (translation and rotation) for all alignable objects
80 (modules & detection elements)
82 To be run from aliroot:
84 .x MUONGenerateGeometryData.C
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.
92 \section geometry_s5 Macros to generate Mis-alignment data
94 Macros for generating the geometry mis-alignment data:
95 - MakeMUONFullMisAlignment.C
96 - MakeMUONResMisAlignment.C
97 - MakeMUONZeroMisAlignment.C
99 To be run from aliroot:
101 .x MakeMUONFullMisAlignment.C
106 If the environment variable TOCDB is not set to "kTRUE",
107 the misalignment data are generated in a local file:
108 MUONfullMisalignment.root, etc.
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
120 The mis-alignment data can be then retrieved from a file
121 and applied to ideal geometry in this way.
124 TGeoManager::Import("geometry.root");
125 TFile f("MUONfullMisalignment.root");
126 TClonesArray* misAlignObjsArray = (TClonesArray*)f.Get("MUONAlignObjs");
127 AliGeomManager::ApplyAlignObjsToGeom(*misAlignObjsArray);
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.
133 \section geometry_s6 How to check the alignment software
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
142 To run you need to type:
144 $ALICE_ROOT/MUON/AlirootRun_MUONtestAlign.sh
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.
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
159 \section geometry_s7 Macro MUONCheckMisAligner.C
161 The macro MUONCheckMisAligner.C performs the misalignment on an existing muon
162 arm geometry based on the standard definition of the detector elements.
164 It uses AliMUONGeometryAligner :
165 - Creates a new AliMUONGeometryTransformer and AliMUONGeometryAligner
166 - Reads the transformations in from the transform.dat file (make sure that
167 this file is the _standard_ one by comparing it to the one in CVS)
168 - Creates a second AliMUONGeometryTransformer by misaligning the existing
169 one using AliMUONAligner::MisAlign
171 User has to specify the magnitude of the alignments, in the Cartesian
172 co-ordiantes (which are used to apply translation misalignments) and in the
173 spherical co-ordinates (which are used to apply angular displacements)
175 User can also set misalignment ranges by hand using the methods :
176 SetMaxCartMisAlig, SetMaxAngMisAlig, SetXYAngMisAligFactor
177 (last method takes account of the fact that the misalingment is greatest in
178 the XY plane, since the detection elements are fixed to a support structure
179 in this plane. Misalignments in the XZ and YZ plane will be very small
180 compared to those in the XY plane, which are small already - of the order
183 Default behavior generates a "residual" misalignment using gaussian
184 distributions. Uniform distributions can still be used, see
185 AliMUONGeometryAligner.
187 User can also generate module misalignments using SetModuleCartMisAlig
188 and SetModuleAngMisAlig
189 Note : If the detection elements are allowed to be misaligned in all
190 directions, this has consequences for the alignment algorithm, which
191 needs to know the number of free parameters. Eric only allowed 3 :
192 x,y,theta_xy, but in principle z and the other two angles are alignable
196 \section geometry_s8 Geometry data files format
198 \subsection geometry_s8_sub1 transform.dat
200 List of transformations for chambers geometry modules and detection
203 KEY ID [nofDE] pos: posX posY posZ rot: theX phiX theY phiY theZ phiZ
206 ID = chamberId or detElemId
207 pos: posX posY posZ = position in cm
208 rot: theX phiX theY phiY theZ phiZ = rotation angles as in Geant3 in deg
211 \subsection geometry_s8_sub2 svmap.dat
213 Map of sensitive volumes to detction element Ids;
217 KEY volpath detElemId
220 volpath = volume path in format /volname1_copyNo1/volname2_copyNo2/...
221 detElemId = detection element Id
225 This chapter is defined in the READMEgeometry.txt file.