X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=blobdiff_plain;f=MUON%2FREADMEmapping.txt;h=df881df368eda396c08ec25b740aa820335c4ec8;hp=239ed2341c36be30414b1e0d725791721b86c5a8;hb=ab199c13cb30f7f1c2d2875d24060c2603bd23b5;hpb=518eb85250b0656c862cd657a7276956073981d8 diff --git a/MUON/READMEmapping.txt b/MUON/READMEmapping.txt index 239ed2341c3..df881df368e 100644 --- a/MUON/READMEmapping.txt +++ b/MUON/READMEmapping.txt @@ -2,23 +2,78 @@ /*! -\page README_mapping README mapping +\page README_mapping Mapping -See detailed description in ALICE-INT-2003-025. +See the detailed description of the mapping package in ALICE-INT-2003-025. +Since that time the mapping has been extended for slat and trigger +chamber segmentations an later on also to hold the description of the +top level connections of detection elements, including information +about DDLs, bus patches and also trigger configuration. +\section mapping_s0 Mapping in OCDB + +The mapping is everywhere in the MUON code loaded from +OCDB. In case the mapping data files are changed, the mapping +in OCDB has to be regenerated in this way: + +For changes in mapping/data: +
+$> rm $ALICE_ROOT/OCDB/MUON/Calib/MappingData/Run0_999999999_v0_s0.root
+$> cd $ALICE_ROOT/MUON
+$> aliroot
+root [0] AliMpCDB::WriteMpData(); 
+
+ +For changes in mapping/data_run: +
+$> rm $ALICE_ROOT/OCDB/MUON/Calib/MappingRunData/Run0_999999999_v0_s0.root
+$> cd $ALICE_ROOT/MUON
+$> aliroot
+root [0] AliMpCDB::WriteMpRunData(); 
+
+ +Note that mapping has to be loaded from OCDB almost each time +when using MUON classes; the loading of mapping depends on +the CBD manager state (the current run number, storage ...). +The standard way of loading mapping expects the CDB manager +in a state well defined beforehand; this way is used in +the MUON code: +
+if ( ! AliMpCDB::LoadDDLStore() ) {
+  AliFatal("Could not access mapping from OCDB !");
+}
+
+In the same way, you can load AliMpManuStore, when manu serial +numbers are needed: +
+if ( ! AliMpCDB::LoadManuStore() ) {
+  AliFatal("Could not access run-dependent mapping from OCDB !");
+}
+
+In the interactive Root session, in case the CDB manager state is +not defined, you can load mapping from the local OCDB files in this +way: +
+root [0] AliMpCDB::LoadDDLStore2();
+root [2] AliMpCDB::LoadManuStore2();
+
\section mapping_s1 Graphical User Interface To use the GUI to plot DE segmentation run: -
+
 
+AliMpCDB::LoadDDLStore2();
+AliMpCDB::LoadManuStore2();
 new AliMpDEVisu();
 
or
+AliMpCDB::LoadDDLStore2();
+AliMpCDB::LoadManuStore2();
 new AliMpDEVisu(w, h);
 
@@ -40,46 +95,22 @@ The GUI allows: \section mapping_s2 Test macros +A set of tests macros have been written during the development +of the mapping classes. To run these macros: +
    cd ../mapping/macro
    root
    root [0] .x testMacroName.C    
-                      see available macros below   
 
-A set of test macros be run at once by test_suite.pl scripts: -- test_suite.pl - run all test macros and compare results with - the reference output -- test_suite_ref.pl - generates reference output - !! this script will overwrite the refence output - provided with the source; - it should be used only by developers - -Macros included in the test suite: -- testReadSector.C -- testReadMotifType.C -- testGraphics.C -- testSectorFind.C -- testPlaneFind.C -- testPrintLimits.C -- testExistingPads.C -- testPadDimensions.C -- testSectorPadIterators.C -- testMotifTypeIterators.C -- testNeighboursPadIterator.C -- testAnyPadIterators.C -- testPadsUp.C -- testPlaneAreaIterator.C - -Other macros (not included in the test suite): -- testAllIndices.C -- testUpdateGlobalIndices.C - -\section mapping_s3 Data files format +\section mapping_s3 Data files in mapping/data +The directory data in $ALICE_ROOT/MUON/mapping contains files +with data which are not supposed to be changed in a long period. -\subsection mapping_s3_sub1 zones.dat: +\subsection mapping_s3_sub1 zones.dat Describes layout of zones, rows, row segments, subzones, motifs @@ -110,7 +141,7 @@ Describes layout of zones, rows, row segments, subzones, motifs
-\subsection mapping_s3_sub2 zones_special.dat: +\subsection mapping_s3_sub2 zones_special.dat Describes layout of special row segments (with irregular motifs) @@ -171,7 +202,7 @@ the local pad indices (i,j) -\subsection mapping_s3_sub4 *.pcb files +\subsection mapping_s3_sub5 *.pcb files Lines starting with # are comments. @@ -196,7 +227,7 @@ computed from the motif alone (but that serves as a cross-check that the motif pattern given is ok). That's not the case for short or rounded PCB though. -\subsection mapping_s3_sub5 *.slat files +\subsection mapping_s3_sub6 *.slat files A slat is defined by the list of its PCB, described starting from the beam and going outward. @@ -225,7 +256,7 @@ Note that the definition of the PCBs have to be in files with extension .pcb (X.pcb, Y.pcb, Z.pcb) -\subsection mapping_s3_sub6 DetElemIdToBusPatch.dat +\subsection mapping_s3_sub7 DetElemIdToBusPatch.dat Lines starting with # are comments. @@ -238,7 +269,40 @@ The DDL id is needed for the rawdata generation only. To generate this file, the macro MUONGenerateBusPatch.C could be used. -\subsection mapping_s3_sub7 crate.dat +\subsection mapping_s3_sub8 BusPatchSpecial.dat + +Lines starting with # are comments. + +Contains the list of bus patches which manu readout is +not in the standard order. The format: + +
+KEYWORD  DDLs  BusPatches [ManuIDs}
+         where KEYWORD = REVERT or EXPLICIT
+
+ +- For the bus patches following the REVERT keyword, + the manus are just reordered in a reverted order. +- For the bus patches following the EXPLICIT keyword, +the manus filled with a standard procedure (using the DetElemIdToBusPatch.dat +file) are replaced with the list of manus in this file. + + +\subsection mapping_s3_sub9 BusPatchLength.dat + +Lines starting with # are comments. + +Contains the list of bus patches and their cable length in meters + +
+# DDL 0
+  1  3
+  2  3
+...
+
+ + +\subsection mapping_s3_sub10 crate.dat Muon trigger electronics configuration file (decoded in class AliMUONTriggerCrateStore) directly copy/paste from the ALICE PRR @@ -247,9 +311,50 @@ crate name it belongs to, slot number, and internal switches (used in the algorithm). -\section mapping_s4 Units used +\subsection mapping_s3_sub11 ManuSerialToBin.dat + +Lines starting with # are comments. + +Contains the manu serial number with their associated bin number, injection and calibration gain. + +To compare the bin number with the serial in the CDB database you can run the macro: + +
 
+AliMpCDB::LoadDDLStore2();
+.L $ALICE_ROOT/MUON/mapping/macros/MUONCheckManu.C+
+MUONCheckManu(10, kFALSE);
+
+ +The function has two parameters, the first is the number of the chamber (zero mean all chambers). +The macro can create a set of histogramms with the different gain distributions stored into a root file +(second parameter). + +Two files a generated: one with the list of manu per detection element with their associated bin and gain +value, the other with the bad, strange or unidentified serial number. + + +\section mapping_s4 Data files in mapping/data_run + +The directory data_run in $ALICE_ROOT/MUON/mapping contains files +with data which are expected to change during experiment. +At present time, there are only files with manu serial numbers: + +\subsection mapping_s4_sub1 deName_manu_dat.dat + +Contains the list of manuIds and their serial numbers. + +
 
+# Id bp/nbp serial
+1 bp 4615
+2 bp 4616
+...
+
+ +\section mapping_s5 Units used Lengths are in centimeters. +This chapter is defined in the READMEmapping.txt file. + */