]>
Commit | Line | Data |
---|---|---|
518eb852 | 1 | // $Id$ |
2 | ||
3 | /*! | |
4 | ||
91509ec6 | 5 | \page README_shuttle Shuttle |
aa9dd72b | 6 | |
e661d480 | 7 | How to test the Shuttle preprocessor(s) for MUON. |
8 | ||
9 | We will get two "logical" MUON preprocessors : one for the tracker and one for the trigger. | |
10 | Both will manage several subtasks (e.g. the tracker one will handle pedestals, | |
11 | gains and deadchannels, while the trigger one will handle masks and trigger lut) | |
12 | "Physically", only one class will manage both the tracker and the trigger : AliMUONPreprocessor. | |
13 | Depending on the subsystem and on the task to be performed (based on the run type), this class | |
14 | will instanciate the correct set of AliMUONVSubProcessor(s) which does the actual job. | |
15 | Output of most processors will end up in OCDB (Offine Condition DataBase). A set of helper functions | |
e66e85b0 | 16 | to peek at this OCDB are gathered in AiMUONCDB class. |
e661d480 | 17 | |
518eb852 | 18 | |
19 | \section shuttle_s1 TestMUONPreprocessor.C | |
e661d480 | 20 | |
21 | This is the master macro used to check the MUON part of the Shuttle. | |
22 | Depending on what you want to test, you'll have to modify the input files | |
23 | (using shuttle->AddInputFile) and/or the run type (using shuttle->AddInputRunParameter()) | |
24 | ||
518eb852 | 25 | |
26 | \section shuttle_s2 AliMUONPreprocessor(const TString& detName) | |
e661d480 | 27 | |
28 | Depending on how this one is constructed, and depending on the runtype, it will | |
29 | perform differents tasks. Note that for the moment the runtypes are "fake", i.e. | |
30 | put by hand in the TestMUONPreprocessor.C macro, and might not correspond to | |
31 | the final values to be used by the DAQ. | |
518eb852 | 32 | |
33 | <pre> | |
e661d480 | 34 | detName runType task to be done worker class (AliMUONVSubprocessor child) |
35 | -------------------------------------------------------------------------------------------------------- | |
36 | MCH PEDESTAL_RUN read ASCII ped files AliMUONPedestalSubprocessor | |
37 | and put them into OCDB | |
38 | ||
39 | MCH GMS read GMS alignment files AliMUONGMSSubprocessor | |
40 | and put them into OCDB | |
41 | ||
42 | MCH PHYSICS read DCS HV values and AliMUONHVSubprocessor | |
43 | put them into OCDB | |
44 | ||
e66e85b0 | 45 | MCH ELECTRONICS_CALIBRATION_RUN read ASCII gain files prototype only = AliMUONGainSubprocessor |
e661d480 | 46 | and put them into OCDB |
47 | ||
48 | MTR to be defined to be defined to be done | |
518eb852 | 49 | </pre> |
e661d480 | 50 | |
518eb852 | 51 | |
52 | \section shuttle_s3 Pedestals | |
e661d480 | 53 | |
54 | Two options here. You can either use a pre-done set of ASCII pedestals files (generated as | |
55 | explained below for the 2nd option), located at /afs/cern.ch/user/l/laphecet/public/LDC*.ped, | |
56 | or build you own set. | |
57 | ||
58 | We've written an AliMUONPedestalEventGenerator which creates fake pedestal events. The pedestal values | |
59 | are taken from the Offline Condition DataBase (OCDB) (which is itself fakely filled | |
e66e85b0 | 60 | using the WritePedestals() method of AliMUONCDB class |
e661d480 | 61 | |
10eb3d17 | 62 | So first generate a valid pedestal CDB entry by using the AliMUONCDB class. There's one |
63 | little trick : you should first point to the "default" OCDB (local://$ALICE_ROOT) in | |
64 | order to get the mapping loaded. Then only you can play with another OCDB. | |
e661d480 | 65 | |
518eb852 | 66 | <pre> |
10eb3d17 | 67 | root[] AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT"); |
68 | root[] AliCDBManager::Instance()->SetRun(0); | |
69 | root[] AliMpCDB::LoadDDLStore(); | |
e661d480 | 70 | root[] const char* cdbpath="local://$ALICE_ROOT/SHUTTLE/TestShuttle/TestCDB"; // where to put the CDB |
e66e85b0 | 71 | root[] AliMUONCDB cdb(cdbpath) |
e661d480 | 72 | root[] Bool_t defaultValues = kFALSE; // to generate random values instead of plain zeros... |
73 | root[] Int_t startRun = 80; | |
74 | root[] Int_t endRun = 80; | |
e66e85b0 | 75 | root[] cdb.WritePedestals(defaultValues, startRun, endRun); |
518eb852 | 76 | </pre> |
e661d480 | 77 | |
78 | Expected output is (don't worry about the warnings, they are harmless) : | |
79 | ||
518eb852 | 80 | <pre> |
e66e85b0 | 81 | I-AliMUONCDB::ManuList: Generating ManuList... |
82 | I-AliMUONCDB::ManuList: Manu List generated. | |
83 | I-AliMUONCDB::MakePedestalStore: 16828 Manus and 1064008 channels. | |
84 | I-AliMUONCDB::WritePedestals: Ngenerated = 1064008 | |
85 | I-AliCDBManager::Init: AliEn classes enabled in Root. AliCDBGrid factory registered. | |
86 | I-AliCDBManager::SetDefaultStorage: Setting Default storage to: local://$ALICE_ROOT/SHUTTLE/TestShuttle/TestCDB | |
87 | I-AliCDBLocal::PutEntry: CDB object stored into file ($ALICE_ROOT)/SHUTTLE/TestShuttle/TestCDB/MUON/Calib/Pedestals/Run80_80_v0_s0.root | |
518eb852 | 88 | </pre> |
e661d480 | 89 | |
90 | Then use the AliMUONPedestalEventGenerator to produce simulated pedestal events. | |
91 | ||
f7493b7e | 92 | Usage (from the Root prompt) : |
518eb852 | 93 | <pre> |
f7493b7e | 94 | AliCDBManager::Instance()->SetDefaultStorage(cdbpath); // so you will read |
e661d480 | 95 | // back pedestals values generated in the previous step |
f7493b7e | 96 | const char* dateFileName = "raw.date"; // base filename for the output |
97 | Int_t runNumber = 80; // run number used to fetch the pedestals from the OCDB | |
98 | Int_t nevents = 100; // # of events to generate. 100 should be enough | |
99 | gSystem->Load("libMUONshuttle"); // needed or not depending on whether it's already loaded or not | |
100 | AliMUONPedestalEventGenerator ped(runNumber,nevents,dateFileName); | |
101 | ped.Exec(""); | |
518eb852 | 102 | </pre> |
f7493b7e | 103 | |
104 | It *will* take a lot of time (mainly due to the fact that we're writing a | |
e661d480 | 105 | bunch of ASCII files = DDL files), so please be patient. |
106 | ||
107 | The output should be the normal simulated sequence of MUON.Hits.root, MUON.SDigits.root, | |
108 | MUON.Digits.root, raw/*.ddl files and raw.date.LDCi where i=0-3 (i.e. one DATE file | |
109 | per LDC, as will be used in real life), the latter ones being roughly 100 MB each. | |
110 | ||
f7493b7e | 111 | // FIXME : instructions below should be replaced with usage of MUONTRKda |
112 | // | |
113 | ||
e661d480 | 114 | The raw.date.LDC* files are then processed using the makeped online program |
115 | (currently found, pending an agreement on where to put online programs under cvs, | |
03fa8501 | 116 | under /afs/cern.ch/user/a/abaldiss/public/v16; Please contact Alberto to check |
e661d480 | 117 | it's the latest version) which outputs manus-*.ped ASCII files (one per LDC) : |
118 | ||
518eb852 | 119 | <pre> |
03fa8501 | 120 | makeped -f raw.date.LCDi -a LDCi.ped (i=0,1,2,3) |
e661d480 | 121 | |
122 | (repeat for each LDC) | |
518eb852 | 123 | </pre> |
e661d480 | 124 | |
125 | The LDCi.ped files are the input for the pedestal subprocessor, | |
126 | which is tested using the TestMUONPreprocessor.C macro. | |
127 | The output of the pedestal subprocessor (upon success only) is written into the OCDB. | |
128 | Difference between the input and the output can be inferred using the diff() function | |
129 | of MUONCDB.C macro. | |
130 | ||
518eb852 | 131 | |
132 | \section shuttle_s4 Gains | |
f7493b7e | 133 | |
134 | Like pedestals, you have two options here. You can either use a pre-done set of | |
135 | ASCII gain files (generated as explained below for the 2nd option), | |
136 | located at /afs/cern.ch/user/l/laphecet/public/LDC*.gains, or build you own set. | |
137 | ||
138 | We've written an AliMUONGainEventGenerator which creates fake gain events. | |
139 | The pedestal and gain values are taken from the Offline Condition DataBase (OCDB) | |
140 | (which is itself fakely filled using the WritePedestals() and WriteGains() | |
141 | methods of AliMUONCDB class). | |
142 | ||
143 | So first you need to generate a valid pedestal CDB entry and a valid gain CDB | |
144 | entry by using the AliMUONCDB class, from the Root prompt: | |
145 | ||
518eb852 | 146 | <pre> |
f7493b7e | 147 | const char* cdbpath="local://$ALICE_ROOT/SHUTTLE/TestShuttle/TestCDB"; // where to put the CDB |
148 | AliMUONCDB cdb(cdbpath) | |
149 | Bool_t defaultValues = kFALSE; // to generate random values instead of plain zeros... | |
150 | Int_t gainRun = 80; | |
151 | Int_t pedRun = 81; | |
152 | cdb.WritePedestals(defaultValues, pedRun, pedRun); | |
153 | cdb.WriteGains(defaultValues, gainRun, gainRun); | |
518eb852 | 154 | </pre> |
f7493b7e | 155 | |
156 | Expected output is (don't worry about the warnings, they are harmless) : | |
157 | ||
158 | Then use the AliMUONGainEventGenerator to produce simulated gain events : the output | |
159 | will be n x 4 date files (n is the number of fake injections, currently 9, and 4 | |
160 | is the number of LDCs) | |
161 | ||
162 | Usage (again, from the Root prompt) : | |
163 | ||
518eb852 | 164 | <pre> |
f7493b7e | 165 | const char* cdbpath="local://$ALICE_ROOT/SHUTTLE/TestShuttle/TestCDB"; // where to get the CDB |
166 | AliCDBManager::Instance()->SetDefaultStorage(cdbpath); // so you will read | |
167 | // back pedestals and gain values generated in the previous step | |
168 | const char* dateFileName = "raw.date"; // base filename for the output | |
169 | Int_t gainRunNumber = 80; // run number used to fetch gains from OCDB | |
170 | Int_t pedRunNumber = 81; // run number used to fetch the pedestals from the OCDB | |
171 | // generated ped files will be for r = 81, 83, etc... | |
172 | Int_t nevents = 100; // # of events to generate. 100 should be enough for testing, but 1000 would be better for prod | |
173 | gSystem->Load("libMUONshuttle"); // needed or not depending on whether it's already loaded or not | |
174 | AliMUONGainEventGenerator g(gainRunNumber,pedRunNumber,nevents,dateFileName); | |
175 | g.Exec(""); | |
518eb852 | 176 | </pre> |
f7493b7e | 177 | |
178 | It *will* take a lot of time (mainly due to the fact that we're writing a | |
179 | bunch of ASCII files = DDL files), so please be patient. | |
180 | ||
181 | The output should be a sequence of directories, RUN81, RUN82, etc..., each | |
182 | containing the normal simulated sequence of MUON.Hits.root, MUON.SDigits.root, | |
183 | MUON.Digits.root, raw/*.ddl files and raw.date.LDCi where i=0-3 (i.e. one DATE file | |
184 | per LDC, as will be used in real life), the latter ones being roughly 100 MB each. | |
185 | ||
518eb852 | 186 | <pre> |
f7493b7e | 187 | // FIXME |
188 | // Below should follow instructions on how to feed the MUONTRKda with the | |
189 | // generated files. | |
518eb852 | 190 | </pre> |
191 | ||
e661d480 | 192 | |
518eb852 | 193 | \section shuttle_s5 HV |
e661d480 | 194 | |
195 | HV DCS values are created in CreateDCSAliasMap() of TestMUONPreprocessor.C | |
196 | You might want to modify this function to create a given set of error conditions | |
197 | in order to test whether the HVSubprocessor is reacting properly to those errors. | |
ee9324d3 | 198 | |
518eb852 | 199 | |
200 | \section shuttle_s6 GMS | |
ee9324d3 | 201 | |
202 | The GMS alignment data for testing can be generated with | |
203 | the macro MUONGenerateTestGMS.C: | |
204 | The matrices of TGeoHMatrix type, with TObject::fUniqueID equal to the geometry | |
205 | module Id, are put in a TClonesArray and saved in the Root file with a | |
206 | key "GMSarray". | |
518eb852 | 207 | |
91509ec6 | 208 | This chapter is defined in the READMEshuttle.txt file. |
209 | ||
518eb852 | 210 | */ |
e661d480 | 211 |