5 \page README_calib Calibration
7 The Offline Condition DataBase is described extensively on ALICE Offline pages.
9 Here you'll find only information relevant to the AliMUONCDB class
10 (formerly MUONCDB.C macro), which defines a set of functions to read/write
11 MUON information to this CDB. Those functions are not meant to be used
14 Please have a closer look before using (especially the ones writing to the CDB...)
17 \section calib_s1 Calibration data objects
19 We've designed generic data containers to store calibration information,
20 tailored to the way we usually access MUON tracker data, that is,
21 indexed by the pair (detElemId,manuId).
22 This container is called AliMUONV2DStore. You can attach a TObject to every and
23 each pair (detElemId,manuId).
25 For the moment, that TObject is generally of AliMUONVCalibParam type,
26 which handles a given number of channels (64 typically) as a group.
27 There's also an AliMUONV1DStore for data types which only requires indexing
28 by 1 value (like trigger masks for instance).
30 As the class names suggest (V...), those classes are only interfaces.
31 Concrete ones are AliMUON2DMap (used instead of a vector as detElemId are
32 not contiguous) for the V2DStore, AliMUON1DArray (for things where indices are
33 contiguous) and AliMUON1DMap for the V1DStore, and CalibParamNI (VCalibParam
34 storing n integer per channel), and CalibParamNF
35 (VCalibParam storing n floats per channel).
37 One exception are the HV values from DCS, which are stored "as they come" from
38 the shuttle-dcs interface, as a TMap, where the key is the aliasname (TString),
39 and the value a TObjArray of AliDCSValue.
41 For trigger, the same virtual container idea applies,
42 except we're using 1D container (AliMUONV1DStore, for masks) or specific ones (for LUT
45 \section calib_s2 CDB location
47 One very important notion is that of the DefaultStorage (which you might set with
48 AliCDBManager::Instance()->SetDefaultStorage(path)), which tells the CDB library where
49 the CDB is sitting (either locally on disk, or on the grid).
51 For local tests, path will be most likely = <code> "local://$ALICE_ROOT"</code>
52 (i.e. there is, in CVS a slim version of the calibration objects needed
53 for running the MUON code), or <code> "local://$ALICE_ROOT/SHUTTLE/TestShuttle/TestCDB </code>
56 When using alien, the path definition can be eg.
57 <code> "alien://folder=/alice/data/2007/LHC07w/OCDB" </code>.
59 \section calib_s3 Writing to CDB
61 AliMUONCDB class is used to populate the CDB with fake calibration objects for testing purposes.
62 Real calibration data will normally be handled by the Shuttle (see READMEshuttle).
64 The various WriteXXX() methods may be used to populate MUON tracker and trigger
66 A full set of calibration data types can be created from scratch using, from
67 the Root prompt (from within the $ALICE_ROOT/MUON directory to get the correct
68 list of libraries loaded by the loadlibs.C macro)
71 root[0] AliMpCDB::LoadDDLStore2();
72 root[1] AliMUONCDB cdb;
73 root[2] Int_t startRun = 0;
74 root[3] Bool_t defaultValues = kTRUE;
75 root[4] cdb.WriteTrigger(startRun);
76 root[5] cdb.WriteTracker(defaultValues,startRun);
80 \section calib_s4 Reading the CDB
82 The actual reading is encapsulated into AliMUONCalibrationData class.
83 e.g. to read pedestals for run 4567, one would do :
86 AliCDBManager::Instance()->SetDefaultStorage(cdbPath);
87 AliMUONCalibrationData cd(4567);
88 AliMUONV2DStore* ped = cd.Pedestals();
91 If you want to plot calibration data (not terribly usefull as it's a really global view),
92 use the Plot() function of AliMUONCDB, e.g.
95 AliMUONCDB cdb(cdbpath);
96 cdb.Plot(*ped,"pedestal")
99 which will create 2 histograms : pedestal_0 (mean) and pedestal_1 (sigma).
101 You might also be interested in the AliMUONStoreHelper::Diff() method
102 which generates an AliMUONV2DStore containing the difference
103 (either absolute or relative) of two AliMUONV2DStore.
105 \section calib_s5 A note on status and status map
107 A special kind of object is the status map. It would deserve a full documentation
108 (and that will need to be done some day), but for the moment, please have a look
109 at the MUONStatusMap.C macro which can let you play with it. For more information,
110 have a look at the AliMUONPadStatusMaker and AliMUONPadStatusMapMaker.
112 This chapter is defined in the READMEcalib.txt file.