]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/READMEshuttle.txt
Using GRP instead of local setters. Creation of AOD for from the RAW ESDs. No need...
[u/mrichter/AliRoot.git] / MUON / READMEshuttle.txt
CommitLineData
518eb852 1// $Id$
2
3/*!
4
91509ec6 5\page README_shuttle Shuttle
aa9dd72b 6
e661d480 7How to test the Shuttle preprocessor(s) for MUON.
8
9We will get two "logical" MUON preprocessors : one for the tracker and one for the trigger.
10Both 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.
13Depending 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.
15Output 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
21This is the master macro used to check the MUON part of the Shuttle.
22Depending 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
28Depending 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 34detName runType task to be done worker class (AliMUONVSubprocessor child)
35--------------------------------------------------------------------------------------------------------
24dbd5dd 36MCH PEDESTAL read ASCII ped files AliMUONPedestalSubprocessor
e661d480 37 and put them into OCDB
38
39MCH GMS read GMS alignment files AliMUONGMSSubprocessor
40 and put them into OCDB
41
42MCH PHYSICS read DCS HV values and AliMUONHVSubprocessor
43 put them into OCDB
44
24dbd5dd 45MCH CALIBRATION read ASCII gain files AliMUONGainSubprocessor
e661d480 46 and put them into OCDB
47
48MTR to be defined to be defined to be done
518eb852 49</pre>
e661d480 50
518eb852 51
52\section shuttle_s3 Pedestals
e661d480 53
54Two 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
58We've written an AliMUONPedestalEventGenerator which creates fake pedestal events. The pedestal values
59are taken from the Offline Condition DataBase (OCDB) (which is itself fakely filled
e66e85b0 60using the WritePedestals() method of AliMUONCDB class
e661d480 61
10eb3d17 62So 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
24dbd5dd 64 order to get the mapping loaded, then only you can play with another OCDB.
65 Or, alternatively, you can put the mapping stuff in the test OCDB, like this :
66
67<pre>
68root[] AliMpDDLStore::ReadData(); // read mapping from ASCII files
69root[] const char* cdbpath="local://$ALICE_ROOT/SHUTTLE/TestShuttle/TestCDB"; // where to put the CDB
70root[] AliCDBManager::Instance()->SetDefaultStorage(cdbpath);
71root[] AliMpCDB::WriteMpSegmentation();
72root[] AliMpCDB::WriteDDLStore();
73</pre>
e661d480 74
24dbd5dd 75If you've not put the mapping in the test database, then you must start with the default OCDB, load the mapping, and then only switch to the
76 test database :
77
518eb852 78<pre>
24dbd5dd 79root[] AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT"); // only if you've not put the mapping in test OCDB
80root[] AliCDBManager::Instance()->SetRun(0); // only if you've not put the mapping in test OCDB
81root[] AliMpCDB::LoadDDLStore(); // only if you've not put the mapping in test OCDB
82// below are lines to be executed whatever you did with the mapping...
e661d480 83root[] const char* cdbpath="local://$ALICE_ROOT/SHUTTLE/TestShuttle/TestCDB"; // where to put the CDB
e66e85b0 84root[] AliMUONCDB cdb(cdbpath)
e661d480 85root[] Bool_t defaultValues = kFALSE; // to generate random values instead of plain zeros...
86root[] Int_t startRun = 80;
87root[] Int_t endRun = 80;
e66e85b0 88root[] cdb.WritePedestals(defaultValues, startRun, endRun);
518eb852 89</pre>
e661d480 90
91Expected output is (don't worry about the warnings, they are harmless) :
92
518eb852 93<pre>
e66e85b0 94I-AliMUONCDB::ManuList: Generating ManuList...
95I-AliMUONCDB::ManuList: Manu List generated.
96I-AliMUONCDB::MakePedestalStore: 16828 Manus and 1064008 channels.
97I-AliMUONCDB::WritePedestals: Ngenerated = 1064008
98I-AliCDBManager::Init: AliEn classes enabled in Root. AliCDBGrid factory registered.
99I-AliCDBManager::SetDefaultStorage: Setting Default storage to: local://$ALICE_ROOT/SHUTTLE/TestShuttle/TestCDB
100I-AliCDBLocal::PutEntry: CDB object stored into file ($ALICE_ROOT)/SHUTTLE/TestShuttle/TestCDB/MUON/Calib/Pedestals/Run80_80_v0_s0.root
518eb852 101</pre>
e661d480 102
103Then use the AliMUONPedestalEventGenerator to produce simulated pedestal events.
104
f7493b7e 105Usage (from the Root prompt) :
518eb852 106<pre>
24dbd5dd 107AliMpCDB::LoadDDLStore2(); // load mapping from "default" OCDB=local://$ALICE_ROOT
f7493b7e 108AliCDBManager::Instance()->SetDefaultStorage(cdbpath); // so you will read
e661d480 109// back pedestals values generated in the previous step
f7493b7e 110const char* dateFileName = "raw.date"; // base filename for the output
111Int_t runNumber = 80; // run number used to fetch the pedestals from the OCDB
112Int_t nevents = 100; // # of events to generate. 100 should be enough
113gSystem->Load("libMUONshuttle"); // needed or not depending on whether it's already loaded or not
114AliMUONPedestalEventGenerator ped(runNumber,nevents,dateFileName);
115ped.Exec("");
518eb852 116</pre>
f7493b7e 117
118It *will* take a lot of time (mainly due to the fact that we're writing a
e661d480 119bunch of ASCII files = DDL files), so please be patient.
120
121The output should be the normal simulated sequence of MUON.Hits.root, MUON.SDigits.root,
122 MUON.Digits.root, raw/*.ddl files and raw.date.LDCi where i=0-3 (i.e. one DATE file
123per LDC, as will be used in real life), the latter ones being roughly 100 MB each.
124
f7493b7e 125// FIXME : instructions below should be replaced with usage of MUONTRKda
126//
127
24dbd5dd 128The raw.date.LDC* files are then processed using the DA online program (which is not built by default, but must be made
129 explicitely using make daqDA-MCH from $ALICE_ROOT, and requires some DATE setup..., see \ref READMEmchda.txt )
e661d480 130
518eb852 131<pre>
24dbd5dd 132 MUONTRKda.exe -f raw.date.LCDi -a LDCi.ped (i=0,1,2,3)
e661d480 133
134 (repeat for each LDC)
518eb852 135</pre>
e661d480 136
137The LDCi.ped files are the input for the pedestal subprocessor,
138which is tested using the TestMUONPreprocessor.C macro.
139The output of the pedestal subprocessor (upon success only) is written into the OCDB.
140Difference between the input and the output can be inferred using the diff() function
141of MUONCDB.C macro.
142
518eb852 143
144\section shuttle_s4 Gains
f7493b7e 145
146Like pedestals, you have two options here. You can either use a pre-done set of
147ASCII gain files (generated as explained below for the 2nd option),
148located at /afs/cern.ch/user/l/laphecet/public/LDC*.gains, or build you own set.
149
150We've written an AliMUONGainEventGenerator which creates fake gain events.
151The pedestal and gain values are taken from the Offline Condition DataBase (OCDB)
152 (which is itself fakely filled using the WritePedestals() and WriteGains()
153 methods of AliMUONCDB class).
154
155So first you need to generate a valid pedestal CDB entry and a valid gain CDB
156entry by using the AliMUONCDB class, from the Root prompt:
157
518eb852 158<pre>
f7493b7e 159const char* cdbpath="local://$ALICE_ROOT/SHUTTLE/TestShuttle/TestCDB"; // where to put the CDB
160AliMUONCDB cdb(cdbpath)
161Bool_t defaultValues = kFALSE; // to generate random values instead of plain zeros...
162Int_t gainRun = 80;
163Int_t pedRun = 81;
164cdb.WritePedestals(defaultValues, pedRun, pedRun);
165cdb.WriteGains(defaultValues, gainRun, gainRun);
518eb852 166</pre>
f7493b7e 167
168Expected output is (don't worry about the warnings, they are harmless) :
169
170Then use the AliMUONGainEventGenerator to produce simulated gain events : the output
171will be n x 4 date files (n is the number of fake injections, currently 9, and 4
172 is the number of LDCs)
173
174Usage (again, from the Root prompt) :
175
518eb852 176<pre>
f7493b7e 177const char* cdbpath="local://$ALICE_ROOT/SHUTTLE/TestShuttle/TestCDB"; // where to get the CDB
178AliCDBManager::Instance()->SetDefaultStorage(cdbpath); // so you will read
179// back pedestals and gain values generated in the previous step
180const char* dateFileName = "raw.date"; // base filename for the output
181Int_t gainRunNumber = 80; // run number used to fetch gains from OCDB
182Int_t pedRunNumber = 81; // run number used to fetch the pedestals from the OCDB
183// generated ped files will be for r = 81, 83, etc...
184Int_t nevents = 100; // # of events to generate. 100 should be enough for testing, but 1000 would be better for prod
185gSystem->Load("libMUONshuttle"); // needed or not depending on whether it's already loaded or not
186AliMUONGainEventGenerator g(gainRunNumber,pedRunNumber,nevents,dateFileName);
187g.Exec("");
518eb852 188</pre>
f7493b7e 189
190It *will* take a lot of time (mainly due to the fact that we're writing a
191bunch of ASCII files = DDL files), so please be patient.
192
193The output should be a sequence of directories, RUN81, RUN82, etc..., each
194containing the normal simulated sequence of MUON.Hits.root, MUON.SDigits.root,
195 MUON.Digits.root, raw/*.ddl files and raw.date.LDCi where i=0-3 (i.e. one DATE file
196per LDC, as will be used in real life), the latter ones being roughly 100 MB each.
197
518eb852 198<pre>
f7493b7e 199// FIXME
200// Below should follow instructions on how to feed the MUONTRKda with the
201// generated files.
518eb852 202</pre>
203
e661d480 204
518eb852 205\section shuttle_s5 HV
e661d480 206
207HV DCS values are created in CreateDCSAliasMap() of TestMUONPreprocessor.C
208You might want to modify this function to create a given set of error conditions
209 in order to test whether the HVSubprocessor is reacting properly to those errors.
ee9324d3 210
518eb852 211
212\section shuttle_s6 GMS
ee9324d3 213
214The GMS alignment data for testing can be generated with
215the macro MUONGenerateTestGMS.C:
216The matrices of TGeoHMatrix type, with TObject::fUniqueID equal to the geometry
217module Id, are put in a TClonesArray and saved in the Root file with a
218key "GMSarray".
518eb852 219
91509ec6 220This chapter is defined in the READMEshuttle.txt file.
221
518eb852 222*/
e661d480 223