5 \page README_mapping Mapping
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.
14 \section mapping_s0 Mapping in OCDB
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:
21 $> cd $ALICE_ROOT/MUON
22 $> rm Calib/Mapping/Run0_999999999_v0_s0.root
23 $> rm Calib/DDLStore/Run0_999999999_v0_s0.root
25 root [0] AliMpDDLStore::ReadData();
26 root [1] AliMpCDB::WriteMpSegmentation();
27 root [2] AliMpCDB::WriteDDLStore();
30 Note that mapping has to be loaded from OCDB almost each time
31 when using MUON classes; the loading of mapping depends on
32 the CBD manager state (the current run number, storage ...).
33 The standard way of loading mapping expects the CDB manager
34 in a state well defined beforehand; this way is used in
38 if ( ! AliMpCDB::LoadDDLStore() ) {
39 AliFatal("Could not access mapping from OCDB !");
43 In the interactive Root session, in case the CDB manager state is
44 not defined, you can load mapping from the local OCDB files in this
47 root [0] AliMpCDB::LoadDDLStore2();
51 \section mapping_s1 Graphical User Interface
53 To use the GUI to plot DE segmentation run:
56 AliMpCDB::LoadDDLStore2();
63 AliMpCDB::LoadDDLStore2();
64 new AliMpDEVisu(w, h);
67 if you want to change the size of the GUI window.
70 w = 1200, h = 600 for PC
71 w = 1000, h = 550 for laptop
75 - drawing motif of a slat/quadrant
76 - search of a given manu (motif) number
77 - draw the channel number for a given manu number by clicking of the motif in canvas
78 - write down in log message informations about the given detection element
80 * number of buspatches, manus, manu serials
81 - option to save log message onto disc
83 \section mapping_s2 Test macros
85 A set of tests macros have been written during the development
86 of the mapping classes. To run these macros:
91 root [0] .x testMacroName.C
95 \section mapping_s3 Data files format
97 \subsection mapping_s3_sub1 zones.dat
99 Describes layout of zones, rows, row segments, subzones, motifs
105 direction of constant pad size (X or Y)
106 offset in X direction
107 offset in Y direction
111 half legth of pad size in x
112 half legth of pad size in y
119 x offset (in number of pads)
120 y offset (in number of pads)
123 first motif position Id
124 step to the next motif position Id (+1 or -1)
128 \subsection mapping_s3_sub2 zones_special.dat
130 Describes layout of special row segments (with irregular motifs)
144 number of these pad rows in row
147 mumber of pads in the rows segment
153 Describes characteristics of the motif type X
163 \subsection mapping_s3_sub3 motifSpecialX.dat
165 Describes characteristics of the special motif with motif Id X;
166 the special motif caontains pads of different size
172 half legth of pad size in x
173 half legth of pad size in y
176 \subsection mapping_s3_sub4 padPosX.dat
178 Maps pad numbers used in the motifX.dat files to
179 the local pad indices (i,j)
189 \subsection mapping_s3_sub5 *.pcb files
191 Lines starting with # are comments.
194 SIZES PadSizeX PadSizeY SizeX SizeY (cm)
196 MOTIF motifType ix iy
197 MOTIF motifType ix iy
201 where ix, iy are the local coordinates (in pad unit) of the
202 lower-left corner of the motif (0,0 is the lower-left corner
205 PCB *MUST* be described in a rotating way, starting lower-left and
206 then counter-clockwise, otherwise the manu-to-motif association
207 (fixed in the slat definition files) will be wrong.
209 Note that for "full" PCBs, the SizeX and SizeY are redundant as they could be
210 computed from the motif alone (but that serves as a cross-check that the motif
211 pattern given is ok). That's not the case for short or rounded PCB though.
214 \subsection mapping_s3_sub6 *.slat files
216 A slat is defined by the list of its PCB, described starting
217 from the beam and going outward.
219 One PCB per line, preceded by the keyword PCB
220 Other lines not matching this syntax are ignored.
221 After the PCB is the list of manu ids for this PCB.
226 PCB X 1-3;24-20;42;44;53
229 PCB Z 1;2;3;4;5;6;7;12;120
232 defines a slat with 4 PCBs : XXYZ
234 The manu to motif relationship is attached to the fact that we're counting
235 counter-clockwise, starting on the lower-left of the PCB. (and the pcb files
236 have to follow this convention to defined their motifs, otherwise all
239 Note that the definition of the PCBs have to be in files with extension
240 .pcb (X.pcb, Y.pcb, Z.pcb)
243 \subsection mapping_s3_sub7 DetElemIdToBusPatch.dat
245 Lines starting with # are comments.
247 Contains the detection element identifier with the associated buspatch numbers
248 and the corresponding DDL identifier.
249 The link between buspatches and DE's is needed on the rawdata level to identify
250 the type of quadrant/slat to get the corresponding mapping.
251 The DDL id is needed for the rawdata generation only.
253 To generate this file, the macro MUONGenerateBusPatch.C could be used.
256 \subsection mapping_s3_sub8 BusPatchSpecial.dat
258 Lines starting with # are comments.
260 Contains the list of bus patches which manu readout is
261 not in the standard order. The format:
264 KEYWORD DDLs BusPatches [ManuIDs}
265 where KEYWORD = REVERT or EXPLICIT
268 - For the bus patches following the REVERT keyword,
269 the manus are just reordered in a reverted order.
270 - For the bus patches following the EXPLICIT keyword,
271 the manus filled with a standard procedure (using the DetElemIdToBusPatch.dat
272 file) are replaced with the list of manus in this file.
275 \subsection mapping_s3_sub9 BusPatchLength.dat
277 Lines starting with # are comments.
279 Contains the list of bus patches and their cable length in meters
289 \subsection mapping_s3_sub10 crate.dat
291 Muon trigger electronics configuration file (decoded in class
292 AliMUONTriggerCrateStore) directly copy/paste from the ALICE PRR
293 ALICE-EN-2003-010. Gives local board number, name,
294 crate name it belongs to, slot number, and internal switches
295 (used in the algorithm).
298 \subsection mapping_s3_sub11 ManuSerialToBin.dat
300 Lines starting with # are comments.
302 Contains the manu serial number with their associated bin number, injection and calibration gain.
304 To compare the bin number with the serial in the CDB database you can run the macro:
307 AliMpCDB::LoadDDLStore2();
308 .L $ALICE_ROOT/MUON/mapping/macros/MUONCheckManu.C+
309 MUONCheckManu(10, kFALSE);
312 The function has two parameters, the first is the number of the chamber (zero mean all chambers).
313 The macro can create a set of histogramms with the different gain distributions stored into a root file
316 Two files a generated: one with the list of manu per detection element with their associated bin and gain
317 value, the other with the bad, strange or unidentified serial number.
320 \section mapping_s4 Units used
322 Lengths are in centimeters.
324 This chapter is defined in the READMEmapping.txt file.