]>
Commit | Line | Data |
---|---|---|
518eb852 | 1 | // $Id$ |
2ce5e44e | 2 | |
518eb852 | 3 | /*! |
4 | ||
5 | \page README_calib README calib | |
6 | ||
2ce5e44e | 7 | The Offline Condition DataBase is described extensively on ALICE Offline pages. |
8 | ||
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 | |
12 | as black boxes. | |
518eb852 | 13 | |
2ce5e44e | 14 | Please 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 | |
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). | |
518eb852 | 24 | |
2ce5e44e | 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). | |
518eb852 | 29 | |
2ce5e44e | 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). | |
36 | ||
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. | |
40 | ||
41 | For trigger, the same virtual container idea applies, | |
42 | except we're using 1D container (AliMUONV1DStore, for masks) or specific ones (for LUT | |
43 | and efficiency) | |
44 | ||
518eb852 | 45 | |
46 | \section calib_s2 CDB location | |
2ce5e44e | 47 | |
48 | One very important notion is that of the DefaultStorage (which you might set with | |
49 | AliCDBManager::Instance()->SetDefaultStorage(path)), which tells the CDB library where | |
50 | the CDB is sitting (either locally on disk, or on the grid). | |
51 | ||
52 | For local tests, path will be most likely = local://$ALICE_ROOT/MUON | |
53 | (i.e. there is, in CVS a slim version of the calibration objects needed | |
54 | for running the MUON code), or local://$ALICE_ROOT/SHUTTLE/TestShuttle/TestCDB for Shuttle testing. | |
55 | ||
518eb852 | 56 | |
57 | \section calib_s3 Writing to CDB | |
2ce5e44e | 58 | |
59 | AliMUONCDB class is used to populate the CDB with fake calibration objects for testing purposes. | |
60 | Real calibration data will normally be handled by the Shuttle (see READMEshuttle). | |
61 | ||
62 | The various WriteXXX() methods may be used to populate MUON tracker and trigger | |
63 | information. | |
64 | A full set of calibration data types can be created from scratch using, from | |
65 | the Root prompt (from within the $ALICE_ROOT/MUON directory to get the correct | |
66 | list of libraries loaded by the loadlibs.C macro) | |
67 | ||
518eb852 | 68 | <pre> |
2ce5e44e | 69 | root[0] AliMUONCDB cdb; |
70 | root[1] Int_t startRun = 0; | |
71 | root[2] Bool_t defaultValues = kTRUE; | |
72 | root[3] cdb.WriteTrigger(startRun); | |
73 | root[4] cdb.WriteTracker(defaultValues,startRun); | |
518eb852 | 74 | </pre> |
75 | ||
2ce5e44e | 76 | |
518eb852 | 77 | \section calib_s4 Reading the CDB |
2ce5e44e | 78 | |
79 | The actual reading is encapsulated into AliMUONCalibrationData class. | |
80 | e.g. to read pedestals for run 4567, one would do : | |
81 | ||
518eb852 | 82 | <pre> |
2ce5e44e | 83 | AliCDBManager::Instance()->SetDefaultStorage(cdbPath); |
84 | AliMUONCalibrationData cd(4567); | |
85 | AliMUONV2DStore* ped = cd.Pedestals(); | |
518eb852 | 86 | </pre> |
2ce5e44e | 87 | |
88 | If you want to plot calibration data (not terribly usefull as it's a really global view), | |
89 | use the Plot() function of AliMUONCDB, e.g. | |
90 | ||
518eb852 | 91 | <pre> |
2ce5e44e | 92 | AliMUONCDB cdb(cdbpath); |
93 | cdb.Plot(*ped,"pedestal") | |
518eb852 | 94 | </pre> |
2ce5e44e | 95 | |
96 | which will create 2 histograms : pedestal_0 (mean) and pedestal_1 (sigma). | |
97 | ||
98 | You might also be interested in the AliMUONStoreHelper::Diff() method | |
99 | which generates an AliMUONV2DStore containing the difference | |
100 | (either absolute or relative) of two AliMUONV2DStore. | |
101 | ||
518eb852 | 102 | */ |
2ce5e44e | 103 |