]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/READMEgeometry.txt
bugfix: corrected defines to use right default algorithms
[u/mrichter/AliRoot.git] / MUON / READMEgeometry.txt
1 // $Id$
2
3 /*! 
4
5 \page README_geometry README geometry
6
7
8 \section geometry_s1 General Information about MUON Geometry
9
10 Our geometry is described in the geometry builder classes.
11 Main geometrical constants are set in the class AliMUONConstants.
12 The code can then generate the geometry data files
13 transform.dat and svmap.dat (see description below) via the macro  
14 MUONGenerateGeometryData.C (more info below).
15
16 The geometry data files have to be recreated each time the code 
17 of the geometry is modified. The info (well updated) in this files 
18 (svmap) is need during the simulation.
19 We can also decide to use the transform.dat file as input of our 
20 geometry. This allows for changing the position of our detection elements
21 and/or half-planes (half-chambers in code jargon) without modifying 
22 and recompiling the code. 
23
24 First step in the official aliroot simulation process is to create 
25 the geometry.root file from the builders to build the MUON geometry 
26 within the geometrical modeler framework of root. 
27 Then  aliroot takes the geometry.root file as a unique geometrical 
28 info of our apparatus during the generation and the reconstruction
29 and analysis (if needed)
30
31 Misalignments are in the official AliRoot code applied to the geometry.root
32 file.
33
34
35 \section geometry_s2 How to check the Geometry with the new Geometrical modeler
36
37 \see ftp://root.cern.ch/root/doc/chapter16.pdf
38 \see http://agenda.cern.ch/fullAgenda.php?ida=a05212
39
40 <pre>
41 gAlice->Init("$ALICE_ROOT/MUON/Config.C");
42 gGeoManager->GetMasterVolume()->Draw();
43 </pre>
44
45
46 \section geometry_s3  How to check the overlap with the new Geometrical modeler
47
48 \see  ftp://root.cern.ch/root/doc/chapter16.pdf
49 \see  http://agenda.cern.ch/fullAgenda.php?ida=a05212
50
51 <pre>
52 gAlice->Init("$ALICE_ROOT/MUON/Config.C");
53 gGeoManager->CheckOverlaps();
54 gGeoManager->PrintOverlaps();
55 </pre>
56
57
58 \section geometry_s4 Macro  MUONGenerateGeometryData.C
59                                                 
60 Macro for generating the geometry data files
61
62 Geometry data files:
63 - MUON/data/transform.dat file contains the transformations
64 data (translation and rotation) for all alignable objects
65 (modules & detection elements)
66 - MUON/data/svmap.dat file contains all the information to link 
67 each geant volume (it can be extended to other virtual MC) with
68 a detection element. The point here is that a given detection
69 element, i.e. a slat chamber can consist of more geant volumes.
70 the correspondence is then defined in an input file.
71 Each time there is a change in the definition of MC geometry, these
72 input files must be re-generated via the macro  
73 MUONGenerateGeometryData.C
74
75 To be run from aliroot:
76 <pre>
77 .x MUONGenerateGeometryData.C
78 </pre>
79
80 The generated files do not replace the existing ones
81 but have different names (with extension ".out").
82 Replacement with new files has to be done manually.
83
84
85 \section geometry_s5 Macros to generate Mis-alignment data
86                                                 
87 Macros for generating the geometry mis-alignment data: 
88 - MakeMUONFullMisAlignment.C
89 - MakeMUONResMisAlignment.C
90 - MakeMUONZeroMisAlignment.C
91
92 To be run from aliroot:
93 <pre>
94 .x MakeMUONFullMisAlignment.C etc.
95 </pre>
96
97 If the environment variable TOCDB is not set to "kTRUE",
98 the misalignment data are generated in a local file:
99 (MUONFullMisalignment.root, etc.)
100
101 If the data are stored in CDB, the storage can be specified in 
102 the environment variable STORAGE. The misalignment data are then
103 generated in the CDB folder (defaults are ResMisAlignCDB and FullMisAlignCDB
104 in the working directory). Inside the local CDB the path for the
105 alignment data is (and must be) "MUON/Align/Data/".
106 Residual misalignment: Default is our current estimate of
107 misalignment after all our alignment procedure has been applied.
108 Full misalignment: Default is our current estimate of initial
109 misalignment.
110
111
112 \section geometry_s6 How to check the alignment software
113
114 The script AlirootRun_MUONtestAlign.sh  allows you to check the software for
115 the 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
121 To run you need to type:
122 <pre>
123 $ALICE_ROOT/MUON/AlirootRun_MUONtestAlign.sh
124 </pre>
125
126 The results of the test are saved in test_align/ directory. The file measShifts.root
127 contains useful graphs for studying the alignment performances. A local CDB
128 containing the realigned geometry is also created (default is ReAlignCDB). The
129 file $ALICE_ROOT/MUON/data/transform2ReAlign.dat contains the
130 transformations describing the realigned geometry to be compared with the
131 used misaligned geometry $ALICE_ROOT/MUON/data/transform2.dat.
132
133 IMPORTANT NOTE: For a useful test of the alignment performances, the
134 order of 100 000 tracks is needed, it is then advisable to generate and
135 reconstruct enough events separately and run MUONAlignment.C providing a file list
136 afterwards.
137
138 \section geometry_s7 Geometry data files description
139  
140 \subsection geometry_s2_sub1 transform.dat
141  
142  List of transformations for chambers geometry modules and detection
143  elements; in format:
144 <pre> 
145  KEY   ID  [nofDE]  pos: posX posY posZ  rot: theX phiX theY phiY theZ phiZ
146   
147  where  KEY  = CH or DE
148         ID   = chamberId or detElemId
149         pos: posX posY posZ  = position in cm
150         rot: theX phiX theY phiY theZ phiZ = rotation angles as in Geant3 in deg
151 </pre>
152
153 \subsection geometry_s2_sub2  svmap.dat
154
155  Map of sensitive volumes to detction element Ids;
156  in format:
157
158 <pre> 
159  KEY  volpath  detElemId
160   
161  where  KEY  = SV
162         volpath   = volume path in format /volname1_copyNo1/volname2_copyNo2/...
163         detElemId = detection element Id
164  </pre>
165
166
167 */