]>
Commit | Line | Data |
---|---|---|
518eb852 | 1 | // $Id$ |
2 | ||
3 | /*! | |
4 | ||
91509ec6 | 5 | \page README_mapping Mapping |
518eb852 | 6 | |
7 | ||
91509ec6 | 8 | See the detailed description of the mapping package in ALICE-INT-2003-025. |
9 | Since that time the mapping has been extended for slat and trigger | |
10 | chamber segmentations an later on also to hold the description of the | |
11 | top level connections of detection elements, including information | |
12 | about DDLs, bus patches and also trigger configuration. | |
518eb852 | 13 | |
062f2b75 | 14 | \section mapping_s0 Mapping in OCDB |
15 | ||
16 | The mapping is everywhere in the MUON code loaded from | |
17 | OCDB. In case the mapping data files are changed, the mapping | |
18 | in OCDB has to be regenerated in this way: | |
19 | ||
20 | <pre> | |
21 | $> cd $ALICE_ROOT/MUON | |
228fd720 | 22 | $> rm Calib/MappingData/Run0_999999999_v0_s0.root |
062f2b75 | 23 | $> aliroot |
228fd720 | 24 | root [0] AliMpCDB::WriteMpData(); |
062f2b75 | 25 | </pre> |
26 | ||
27 | Note that mapping has to be loaded from OCDB almost each time | |
28 | when using MUON classes; the loading of mapping depends on | |
29 | the CBD manager state (the current run number, storage ...). | |
30 | The standard way of loading mapping expects the CDB manager | |
31 | in a state well defined beforehand; this way is used in | |
32 | the MUON code: | |
33 | ||
34 | <pre> | |
35 | if ( ! AliMpCDB::LoadDDLStore() ) { | |
36 | AliFatal("Could not access mapping from OCDB !"); | |
37 | } | |
38 | </pre> | |
39 | ||
40 | In the interactive Root session, in case the CDB manager state is | |
41 | not defined, you can load mapping from the local OCDB files in this | |
42 | way: | |
43 | <pre> | |
44 | root [0] AliMpCDB::LoadDDLStore2(); | |
45 | </pre> | |
46 | ||
47 | ||
518eb852 | 48 | \section mapping_s1 Graphical User Interface |
49 | ||
50 | To use the GUI to plot DE segmentation run: | |
51 | ||
062f2b75 | 52 | <pre> |
53 | AliMpCDB::LoadDDLStore2(); | |
518eb852 | 54 | new AliMpDEVisu(); |
55 | </pre> | |
56 | ||
57 | or | |
58 | ||
59 | <pre> | |
062f2b75 | 60 | AliMpCDB::LoadDDLStore2(); |
518eb852 | 61 | new AliMpDEVisu(w, h); |
62 | </pre> | |
63 | ||
64 | if you want to change the size of the GUI window. | |
65 | Typical value are: | |
66 | <pre> | |
67 | w = 1200, h = 600 for PC | |
68 | w = 1000, h = 550 for laptop | |
69 | </pre> | |
70 | ||
71 | The GUI allows: | |
72 | - drawing motif of a slat/quadrant | |
73 | - search of a given manu (motif) number | |
74 | - draw the channel number for a given manu number by clicking of the motif in canvas | |
75 | - write down in log message informations about the given detection element | |
76 | * DE Id, DE name, | |
77 | * number of buspatches, manus, manu serials | |
78 | - option to save log message onto disc | |
79 | ||
80 | \section mapping_s2 Test macros | |
81 | ||
91509ec6 | 82 | A set of tests macros have been written during the development |
83 | of the mapping classes. To run these macros: | |
84 | ||
518eb852 | 85 | <pre> |
86 | cd ../mapping/macro | |
87 | root | |
88 | root [0] .x testMacroName.C | |
518eb852 | 89 | </pre> |
90 | ||
518eb852 | 91 | |
92 | \section mapping_s3 Data files format | |
93 | ||
91509ec6 | 94 | \subsection mapping_s3_sub1 zones.dat |
518eb852 | 95 | |
96 | Describes layout of zones, rows, row segments, subzones, motifs | |
97 | ||
98 | <pre> | |
99 | SECTOR_DATA | |
100 | number of zones | |
101 | number of rows | |
102 | direction of constant pad size (X or Y) | |
103 | offset in X direction | |
104 | offset in Y direction | |
105 | ||
106 | ZONE | |
107 | number of zone | |
108 | half legth of pad size in x | |
109 | half legth of pad size in y | |
110 | ||
111 | SUBZONE | |
112 | motif id | |
113 | motif type_id | |
114 | ||
115 | ROW_SEGMENT | |
116 | x offset (in number of pads) | |
117 | y offset (in number of pads) | |
118 | row number | |
119 | nof motifs | |
120 | first motif position Id | |
121 | step to the next motif position Id (+1 or -1) | |
122 | </pre> | |
123 | ||
124 | ||
91509ec6 | 125 | \subsection mapping_s3_sub2 zones_special.dat |
518eb852 | 126 | |
127 | Describes layout of special row segments (with irregular motifs) | |
128 | ||
129 | <pre> | |
130 | SECTOR_SPECIAL_DATA | |
131 | ||
132 | MOTIF | |
133 | zone id | |
134 | motif id | |
135 | motif type_id | |
136 | ||
137 | ROW | |
138 | row number | |
139 | ||
140 | PAD_ROWS | |
141 | number of these pad rows in row | |
142 | ||
143 | PAD_ROW_SEGMENT | |
144 | mumber of pads in the rows segment | |
145 | motif id | |
146 | motif position id | |
147 | ||
148 | motifX.dat | |
149 | ---------- | |
150 | Describes characteristics of the motif type X | |
151 | ||
152 | In lines: | |
153 | Berg number | |
154 | Kapton number | |
155 | Pad number | |
156 | Gassi number | |
157 | </pre> | |
158 | ||
159 | ||
160 | \subsection mapping_s3_sub3 motifSpecialX.dat | |
161 | ||
162 | Describes characteristics of the special motif with motif Id X; | |
163 | the special motif caontains pads of different size | |
164 | ||
165 | <pre> | |
166 | In lines: | |
167 | pad index i (in x) | |
168 | pad index j (in y) | |
169 | half legth of pad size in x | |
170 | half legth of pad size in y | |
171 | </pre> | |
172 | ||
173 | \subsection mapping_s3_sub4 padPosX.dat | |
174 | ||
175 | Maps pad numbers used in the motifX.dat files to | |
176 | the local pad indices (i,j) | |
177 | ||
178 | <pre> | |
179 | In lines: | |
180 | Pad number | |
181 | pad index i (in x) | |
182 | pad index j (in y) | |
183 | </pre> | |
184 | ||
185 | ||
91509ec6 | 186 | \subsection mapping_s3_sub5 *.pcb files |
518eb852 | 187 | |
188 | Lines starting with # are comments. | |
189 | ||
190 | <pre> | |
191 | SIZES PadSizeX PadSizeY SizeX SizeY (cm) | |
192 | ||
193 | MOTIF motifType ix iy | |
194 | MOTIF motifType ix iy | |
195 | ... | |
196 | </pre> | |
197 | ||
198 | where ix, iy are the local coordinates (in pad unit) of the | |
199 | lower-left corner of the motif (0,0 is the lower-left corner | |
200 | of the PCB). | |
201 | ||
202 | PCB *MUST* be described in a rotating way, starting lower-left and | |
203 | then counter-clockwise, otherwise the manu-to-motif association | |
204 | (fixed in the slat definition files) will be wrong. | |
205 | ||
206 | Note that for "full" PCBs, the SizeX and SizeY are redundant as they could be | |
207 | computed from the motif alone (but that serves as a cross-check that the motif | |
208 | pattern given is ok). That's not the case for short or rounded PCB though. | |
209 | ||
210 | ||
91509ec6 | 211 | \subsection mapping_s3_sub6 *.slat files |
518eb852 | 212 | |
213 | A slat is defined by the list of its PCB, described starting | |
214 | from the beam and going outward. | |
215 | ||
216 | One PCB per line, preceded by the keyword PCB | |
217 | Other lines not matching this syntax are ignored. | |
218 | After the PCB is the list of manu ids for this PCB. | |
219 | ||
220 | Example : | |
221 | ||
222 | <pre> | |
223 | PCB X 1-3;24-20;42;44;53 | |
224 | PCB X 1-14 | |
225 | PCB Y 100-90 | |
226 | PCB Z 1;2;3;4;5;6;7;12;120 | |
227 | </pre> | |
228 | ||
229 | defines a slat with 4 PCBs : XXYZ | |
230 | ||
231 | The manu to motif relationship is attached to the fact that we're counting | |
232 | counter-clockwise, starting on the lower-left of the PCB. (and the pcb files | |
233 | have to follow this convention to defined their motifs, otherwise all | |
234 | this won't work). | |
235 | ||
236 | Note that the definition of the PCBs have to be in files with extension | |
237 | .pcb (X.pcb, Y.pcb, Z.pcb) | |
238 | ||
239 | ||
91509ec6 | 240 | \subsection mapping_s3_sub7 DetElemIdToBusPatch.dat |
518eb852 | 241 | |
242 | Lines starting with # are comments. | |
243 | ||
244 | Contains the detection element identifier with the associated buspatch numbers | |
245 | and the corresponding DDL identifier. | |
246 | The link between buspatches and DE's is needed on the rawdata level to identify | |
247 | the type of quadrant/slat to get the corresponding mapping. | |
248 | The DDL id is needed for the rawdata generation only. | |
249 | ||
250 | To generate this file, the macro MUONGenerateBusPatch.C could be used. | |
251 | ||
252 | ||
062f2b75 | 253 | \subsection mapping_s3_sub8 BusPatchSpecial.dat |
ae649dcb | 254 | |
255 | Lines starting with # are comments. | |
256 | ||
257 | Contains the list of bus patches which manu readout is | |
258 | not in the standard order. The format: | |
259 | ||
260 | <pre> | |
261 | KEYWORD DDLs BusPatches [ManuIDs} | |
262 | where KEYWORD = REVERT or EXPLICIT | |
263 | </pre> | |
264 | ||
265 | - For the bus patches following the REVERT keyword, | |
266 | the manus are just reordered in a reverted order. | |
267 | - For the bus patches following the EXPLICIT keyword, | |
268 | the manus filled with a standard procedure (using the DetElemIdToBusPatch.dat | |
269 | file) are replaced with the list of manus in this file. | |
270 | ||
271 | ||
062f2b75 | 272 | \subsection mapping_s3_sub9 BusPatchLength.dat |
273 | ||
274 | Lines starting with # are comments. | |
275 | ||
276 | Contains the list of bus patches and their cable length in meters | |
277 | ||
278 | <pre> | |
279 | # DDL 0 | |
280 | 1 3 | |
281 | 2 3 | |
282 | ... | |
283 | </pre> | |
284 | ||
285 | ||
286 | \subsection mapping_s3_sub10 crate.dat | |
518eb852 | 287 | |
288 | Muon trigger electronics configuration file (decoded in class | |
289 | AliMUONTriggerCrateStore) directly copy/paste from the ALICE PRR | |
290 | ALICE-EN-2003-010. Gives local board number, name, | |
291 | crate name it belongs to, slot number, and internal switches | |
292 | (used in the algorithm). | |
293 | ||
294 | ||
8b68068b | 295 | \subsection mapping_s3_sub11 ManuSerialToBin.dat |
296 | ||
297 | Lines starting with # are comments. | |
298 | ||
299 | Contains the manu serial number with their associated bin number, injection and calibration gain. | |
300 | ||
301 | To compare the bin number with the serial in the CDB database you can run the macro: | |
302 | ||
303 | <pre> | |
304 | AliMpCDB::LoadDDLStore2(); | |
305 | .L $ALICE_ROOT/MUON/mapping/macros/MUONCheckManu.C+ | |
306 | MUONCheckManu(10, kFALSE); | |
307 | </pre> | |
308 | ||
309 | The function has two parameters, the first is the number of the chamber (zero mean all chambers). | |
310 | The macro can create a set of histogramms with the different gain distributions stored into a root file | |
311 | (second parameter). | |
312 | ||
313 | Two files a generated: one with the list of manu per detection element with their associated bin and gain | |
314 | value, the other with the bad, strange or unidentified serial number. | |
315 | ||
316 | ||
518eb852 | 317 | \section mapping_s4 Units used |
318 | ||
319 | Lengths are in centimeters. | |
320 | ||
91509ec6 | 321 | This chapter is defined in the READMEmapping.txt file. |
322 | ||
518eb852 | 323 | */ |
324 |