]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/READMEshuttle.txt
New configuration for AliGenMUONCocktailpp
[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--------------------------------------------------------------------------------------------------------
36MCH PEDESTAL_RUN read ASCII ped files AliMUONPedestalSubprocessor
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
e66e85b0 45MCH ELECTRONICS_CALIBRATION_RUN read ASCII gain files prototype only = 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
f7493b7e 62So first generate a valid pedestal CDB entry by using the AliMUONCDB class
e661d480 63
518eb852 64<pre>
e661d480 65root[] const char* cdbpath="local://$ALICE_ROOT/SHUTTLE/TestShuttle/TestCDB"; // where to put the CDB
e66e85b0 66root[] AliMUONCDB cdb(cdbpath)
e661d480 67root[] Bool_t defaultValues = kFALSE; // to generate random values instead of plain zeros...
68root[] Int_t startRun = 80;
69root[] Int_t endRun = 80;
e66e85b0 70root[] cdb.WritePedestals(defaultValues, startRun, endRun);
518eb852 71</pre>
e661d480 72
73Expected output is (don't worry about the warnings, they are harmless) :
74
518eb852 75<pre>
e66e85b0 76I-AliMUONCDB::ManuList: Generating ManuList...
77I-AliMUONCDB::ManuList: Manu List generated.
78I-AliMUONCDB::MakePedestalStore: 16828 Manus and 1064008 channels.
79I-AliMUONCDB::WritePedestals: Ngenerated = 1064008
80I-AliCDBManager::Init: AliEn classes enabled in Root. AliCDBGrid factory registered.
81I-AliCDBManager::SetDefaultStorage: Setting Default storage to: local://$ALICE_ROOT/SHUTTLE/TestShuttle/TestCDB
82I-AliCDBLocal::PutEntry: CDB object stored into file ($ALICE_ROOT)/SHUTTLE/TestShuttle/TestCDB/MUON/Calib/Pedestals/Run80_80_v0_s0.root
518eb852 83</pre>
e661d480 84
85Then use the AliMUONPedestalEventGenerator to produce simulated pedestal events.
86
f7493b7e 87Usage (from the Root prompt) :
518eb852 88<pre>
f7493b7e 89AliCDBManager::Instance()->SetDefaultStorage(cdbpath); // so you will read
e661d480 90// back pedestals values generated in the previous step
f7493b7e 91const char* dateFileName = "raw.date"; // base filename for the output
92Int_t runNumber = 80; // run number used to fetch the pedestals from the OCDB
93Int_t nevents = 100; // # of events to generate. 100 should be enough
94gSystem->Load("libMUONshuttle"); // needed or not depending on whether it's already loaded or not
95AliMUONPedestalEventGenerator ped(runNumber,nevents,dateFileName);
96ped.Exec("");
518eb852 97</pre>
f7493b7e 98
99It *will* take a lot of time (mainly due to the fact that we're writing a
e661d480 100bunch of ASCII files = DDL files), so please be patient.
101
102The output should be the normal simulated sequence of MUON.Hits.root, MUON.SDigits.root,
103 MUON.Digits.root, raw/*.ddl files and raw.date.LDCi where i=0-3 (i.e. one DATE file
104per LDC, as will be used in real life), the latter ones being roughly 100 MB each.
105
f7493b7e 106// FIXME : instructions below should be replaced with usage of MUONTRKda
107//
108
e661d480 109The raw.date.LDC* files are then processed using the makeped online program
110(currently found, pending an agreement on where to put online programs under cvs,
03fa8501 111 under /afs/cern.ch/user/a/abaldiss/public/v16; Please contact Alberto to check
e661d480 112 it's the latest version) which outputs manus-*.ped ASCII files (one per LDC) :
113
518eb852 114<pre>
03fa8501 115 makeped -f raw.date.LCDi -a LDCi.ped (i=0,1,2,3)
e661d480 116
117 (repeat for each LDC)
518eb852 118</pre>
e661d480 119
120The LDCi.ped files are the input for the pedestal subprocessor,
121which is tested using the TestMUONPreprocessor.C macro.
122The output of the pedestal subprocessor (upon success only) is written into the OCDB.
123Difference between the input and the output can be inferred using the diff() function
124of MUONCDB.C macro.
125
518eb852 126
127\section shuttle_s4 Gains
f7493b7e 128
129Like pedestals, you have two options here. You can either use a pre-done set of
130ASCII gain files (generated as explained below for the 2nd option),
131located at /afs/cern.ch/user/l/laphecet/public/LDC*.gains, or build you own set.
132
133We've written an AliMUONGainEventGenerator which creates fake gain events.
134The pedestal and gain values are taken from the Offline Condition DataBase (OCDB)
135 (which is itself fakely filled using the WritePedestals() and WriteGains()
136 methods of AliMUONCDB class).
137
138So first you need to generate a valid pedestal CDB entry and a valid gain CDB
139entry by using the AliMUONCDB class, from the Root prompt:
140
518eb852 141<pre>
f7493b7e 142const char* cdbpath="local://$ALICE_ROOT/SHUTTLE/TestShuttle/TestCDB"; // where to put the CDB
143AliMUONCDB cdb(cdbpath)
144Bool_t defaultValues = kFALSE; // to generate random values instead of plain zeros...
145Int_t gainRun = 80;
146Int_t pedRun = 81;
147cdb.WritePedestals(defaultValues, pedRun, pedRun);
148cdb.WriteGains(defaultValues, gainRun, gainRun);
518eb852 149</pre>
f7493b7e 150
151Expected output is (don't worry about the warnings, they are harmless) :
152
153Then use the AliMUONGainEventGenerator to produce simulated gain events : the output
154will be n x 4 date files (n is the number of fake injections, currently 9, and 4
155 is the number of LDCs)
156
157Usage (again, from the Root prompt) :
158
518eb852 159<pre>
f7493b7e 160const char* cdbpath="local://$ALICE_ROOT/SHUTTLE/TestShuttle/TestCDB"; // where to get the CDB
161AliCDBManager::Instance()->SetDefaultStorage(cdbpath); // so you will read
162// back pedestals and gain values generated in the previous step
163const char* dateFileName = "raw.date"; // base filename for the output
164Int_t gainRunNumber = 80; // run number used to fetch gains from OCDB
165Int_t pedRunNumber = 81; // run number used to fetch the pedestals from the OCDB
166// generated ped files will be for r = 81, 83, etc...
167Int_t nevents = 100; // # of events to generate. 100 should be enough for testing, but 1000 would be better for prod
168gSystem->Load("libMUONshuttle"); // needed or not depending on whether it's already loaded or not
169AliMUONGainEventGenerator g(gainRunNumber,pedRunNumber,nevents,dateFileName);
170g.Exec("");
518eb852 171</pre>
f7493b7e 172
173It *will* take a lot of time (mainly due to the fact that we're writing a
174bunch of ASCII files = DDL files), so please be patient.
175
176The output should be a sequence of directories, RUN81, RUN82, etc..., each
177containing the normal simulated sequence of MUON.Hits.root, MUON.SDigits.root,
178 MUON.Digits.root, raw/*.ddl files and raw.date.LDCi where i=0-3 (i.e. one DATE file
179per LDC, as will be used in real life), the latter ones being roughly 100 MB each.
180
518eb852 181<pre>
f7493b7e 182// FIXME
183// Below should follow instructions on how to feed the MUONTRKda with the
184// generated files.
518eb852 185</pre>
186
e661d480 187
518eb852 188\section shuttle_s5 HV
e661d480 189
190HV DCS values are created in CreateDCSAliasMap() of TestMUONPreprocessor.C
191You might want to modify this function to create a given set of error conditions
192 in order to test whether the HVSubprocessor is reacting properly to those errors.
ee9324d3 193
518eb852 194
195\section shuttle_s6 GMS
ee9324d3 196
197The GMS alignment data for testing can be generated with
198the macro MUONGenerateTestGMS.C:
199The matrices of TGeoHMatrix type, with TObject::fUniqueID equal to the geometry
200module Id, are put in a TClonesArray and saved in the Root file with a
201key "GMSarray".
518eb852 202
91509ec6 203This chapter is defined in the READMEshuttle.txt file.
204
518eb852 205*/
e661d480 206