]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/READMEcalib.txt
An example macro for running data analysis on AOD directly
[u/mrichter/AliRoot.git] / MUON / READMEcalib.txt
CommitLineData
518eb852 1// $Id$
2ce5e44e 2
518eb852 3/*!
4
91509ec6 5\page README_calib Calibration
518eb852 6
2ce5e44e 7The Offline Condition DataBase is described extensively on ALICE Offline pages.
8
9Here 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
12 as black boxes.
518eb852 13
2ce5e44e 14Please have a closer look before using (especially the ones writing to the CDB...)
15
518eb852 16
17\section calib_s1 Calibration data objects
2ce5e44e 18
19We've designed generic data containers to store calibration information,
20tailored to the way we usually access MUON tracker data, that is,
21indexed by the pair (detElemId,manuId).
22This container is called AliMUONV2DStore. You can attach a TObject to every and
23each pair (detElemId,manuId).
518eb852 24
2ce5e44e 25For the moment, that TObject is generally of AliMUONVCalibParam type,
26 which handles a given number of channels (64 typically) as a group.
27There's also an AliMUONV1DStore for data types which only requires indexing
28by 1 value (like trigger masks for instance).
518eb852 29
2ce5e44e 30As the class names suggest (V...), those classes are only interfaces.
31Concrete ones are AliMUON2DMap (used instead of a vector as detElemId are
32not contiguous) for the V2DStore, AliMUON1DArray (for things where indices are
33contiguous) and AliMUON1DMap for the V1DStore, and CalibParamNI (VCalibParam
34storing n integer per channel), and CalibParamNF
35(VCalibParam storing n floats per channel).
36
37One exception are the HV values from DCS, which are stored "as they come" from
38the shuttle-dcs interface, as a TMap, where the key is the aliasname (TString),
39and the value a TObjArray of AliDCSValue.
40
41For trigger, the same virtual container idea applies,
42except we're using 1D container (AliMUONV1DStore, for masks) or specific ones (for LUT
43and efficiency)
44
518eb852 45\section calib_s2 CDB location
2ce5e44e 46
47One 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).
50
51For local tests, path will be most likely = local://$ALICE_ROOT/MUON
52(i.e. there is, in CVS a slim version of the calibration objects needed
53 for running the MUON code), or local://$ALICE_ROOT/SHUTTLE/TestShuttle/TestCDB for Shuttle testing.
54
518eb852 55
56\section calib_s3 Writing to CDB
2ce5e44e 57
58AliMUONCDB class is used to populate the CDB with fake calibration objects for testing purposes.
59Real calibration data will normally be handled by the Shuttle (see READMEshuttle).
60
61The various WriteXXX() methods may be used to populate MUON tracker and trigger
62information.
63A full set of calibration data types can be created from scratch using, from
64the Root prompt (from within the $ALICE_ROOT/MUON directory to get the correct
65list of libraries loaded by the loadlibs.C macro)
66
518eb852 67<pre>
2ce5e44e 68root[0] AliMUONCDB cdb;
69root[1] Int_t startRun = 0;
70root[2] Bool_t defaultValues = kTRUE;
71root[3] cdb.WriteTrigger(startRun);
72root[4] cdb.WriteTracker(defaultValues,startRun);
518eb852 73</pre>
74
2ce5e44e 75
518eb852 76\section calib_s4 Reading the CDB
2ce5e44e 77
78The actual reading is encapsulated into AliMUONCalibrationData class.
79e.g. to read pedestals for run 4567, one would do :
80
518eb852 81<pre>
2ce5e44e 82AliCDBManager::Instance()->SetDefaultStorage(cdbPath);
83AliMUONCalibrationData cd(4567);
84AliMUONV2DStore* ped = cd.Pedestals();
518eb852 85</pre>
2ce5e44e 86
87If you want to plot calibration data (not terribly usefull as it's a really global view),
88 use the Plot() function of AliMUONCDB, e.g.
89
518eb852 90<pre>
2ce5e44e 91AliMUONCDB cdb(cdbpath);
92cdb.Plot(*ped,"pedestal")
518eb852 93</pre>
2ce5e44e 94
95which will create 2 histograms : pedestal_0 (mean) and pedestal_1 (sigma).
96
97You might also be interested in the AliMUONStoreHelper::Diff() method
98which generates an AliMUONV2DStore containing the difference
99(either absolute or relative) of two AliMUONV2DStore.
100
095ae052 101\section calib_s5 A note on status and status map
102
103A special kind of object is the status map. It would deserve a full documentation
104 (and that will need to be done some day), but for the moment, please have a look
105 at the MUONStatusMap.C macro which can let you play with it. For more information,
106 have a look at the AliMUONPadStatusMaker and AliMUONPadStatusMapMaker.
107
91509ec6 108This chapter is defined in the READMEcalib.txt file.
518eb852 109*/
2ce5e44e 110