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