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