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