]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PMD/pmd_da_info.txt
ALIROOT-5564: fix in TOF calibration for new TOF data structure
[u/mrichter/AliRoot.git] / PMD / pmd_da_info.txt
1 DETECTOR ALGORITHM for PMD
2 ++++++++++++++++++++++++++
3 Author: Satyajit Jena
4 Date: 14 Nov 2009
5 Updated: Wed Aug  4 11:03:37 CEST 2010
6 ++++++++++++++++++++++++++
7 Informations are added at:
8 https://twiki.cern.ch/twiki/bin/view/ALICE/DA
9
10 Detail of Central DA Framework can be found here:
11 https://aliceinfo.cern.ch/DAQ/index.php?q=products/detector-algorithms
12
13 Please note that: The informatoins are also kept in the DA code
14 header, it is the requirements for DA framework. Please nver change 
15 the values. it should look like:
16
17 PMD DA for online calibration
18
19 contact: basanta@iitb.ac.in, Satyajit.Jena@cern.ch
20 Link: https://twiki.cern.ch/twiki/bin/view/ALICE/DA
21 Reference run:/afs/cern.ch/user/s/sjena/public/run83496.raw
22 Run Type: PHYSICS
23 DA Type: MON
24 Number of events needed: 1 million for PB+PB, 200 milion for p+p
25 Input Files: PMD/Calib/Mapping/Run0_999999999_v0_s0.root, PMD_PED.root, PMD_GAIN_CONFIGFILE, pmd_gain_tempfile.dat
26 Output Files: PMDGAINS.root, to be exported to the DAQ FES
27 Trigger types used: PHYSICS_EVENT
28
29
30 and 
31
32 /*
33 PMD DA for online calibration
34
35 contact: basanta@iitb.ac.in, Satyajit.Jena@cern.ch
36 Link: https://twiki.cern.ch/twiki/bin/view/ALICE/DA
37 Reference Run:/afs/cern.ch/user/s/sjena/public/run83496.raw
38 Run Type: PEDESTAL
39 DA Type: LDC
40 Number of events needed: 1000
41 Input Files: PMD/Calib/Mapping/Run0_999999999_v0_s0.root
42 Output Files: pmd_ped.root, to be exported to the DAQ FXS, pedestal230*.ped
43 Trigger types used: PHYSICS_EVENT
44
45 */
46
47
48
49 This infomration can be accessed in P@2 machince via rpm -qip command
50
51 e.g. 
52 rpm -qip daqDA-PMD-GAIN-36451-trunk.36552.i386.rpm
53
54 it will show all the following information it has:
55
56 [pmdldc01] /home/pmd/AliSoft/AliRoot >  rpm -qip  daqDA-PMD-PEDESTAL-36451-trunk.36552.i386.rpm
57 Name        : daqDA-PMD-PEDESTAL           Relocations: /opt/daqDA-PMD-PEDESTAL
58 Version     : 36451                             Vendor: (none)
59 Release     : trunk.36552                   Build Date: Mon 09 Nov 2009 01:51:47 PM CET
60 Install Date: (not installed)               Build Host: pmdldc01.cern.ch
61 Group       : Applications/Alice            Source RPM: daqDA-PMD-PEDESTAL-36451-trunk.36552.src.rpm
62 Size        : 65331468                      License: CERN Alice DAQ/Offine
63 Signature   : (none)
64 Summary     : PMD Detector Algorithm
65 Description :
66 This is the PMD PEDESTAL DA for online calibration.
67 It uses data from PMD and  detectors at run time.
68 Build requires: daqDAlib, date, AliRoot trunk.36552, ROOT 5.24.00.
69 Runtime requires: date.
70 Contact: basanta@phy.iitb.ac.in, Satyajit.Jena@cern.ch
71 Link:
72 Reference Run: /afs/cern.ch/user/s/sjena/public/run83496.raw
73 Run type: PEDESTAL
74 DA type: LDC
75 Number of events needed: 1000
76 Input files: PMD/Calib/Mapping
77 Output files: pmd_ped.root, to be exported to the DAQ FXS, pedestal230*.ped
78 Trigger types used: PHYSICS_EVENT
79
80
81 -------------------------------
82
83 A Brief Infromation about PMD DA
84 ================================
85
86 PMD has two types of detector algorithm. One algorithm is for the 
87 pedestal data and the other one is for the online gain calibration.
88
89 Pedestal DA
90 ============
91 Pedestal DA is to calculate the mean pedestal value and the root 
92 mean square value for each channel. The output is written in a 
93 root file and finally goes to the OCDB
94
95 for offline reconstruction.
96 --------------
97 At the same time this pedestal da also writes the pedestal values 
98 in ASCII file corresponding to each DDL. This file is appropriately 
99 converted to the right format and is loaded
100
101 to the MARC for pedestal suppression while taking data. The ASCII files are:
102
103      pedestal2304.ped 
104      pedestal2305.ped
105      pedestal2306.ped
106      pedestal2307.ped
107      pedestal2308.ped
108      pedestal2309.ped
109
110 Six files corresponding to 6 DDL. This is our original configuration.
111
112 However, in the year 2009, we have 4 DDL. The corresponding files are:
113
114      pedestal2304.ped
115      pedestal2305.ped
116      pedestal2308.ped
117      pedestal2309.ped
118
119   --Two DDLs are for PREshower plane (2304, 2305) and two DDLs (2308, 2309) 
120     are for CPV plane.
121
122   --The input to this da code is the mapping file which can be found here 
123     (Run0_999999999_v0_s0.root).
124
125 This file can be taken from here or from 
126 $ALICE_ROOT/OCDB/PMD/Calib/Mapping/Run0_999999999_v0_s0.root.
127
128 * Run0_999999999_v0_s0.root: Run0_999999999_v0_s0.root
129
130 This file has to be stored in the DAQ database and will be fetched from the 
131 DAQ database and kept in a local directory as
132
133 localOCDB/PMD/Calib/Mapping/Run0_999999999_v0_s0.root.
134
135 The output of pedestal da is "PMD_PED.root" which contains mean and rms of 
136 each channel in a tree. One copy goes to the DAQ database for pedestal 
137 subtraction while running the gain DA and another copy goes to FES and 
138 ultimately to the OCDB for offline reconstruction.
139
140 The pedestal run for validation can be found here
141
142 /afs/cern.ch/user/s/sjena/public/run83496.raw
143
144 PMDGAINda:
145 =========
146 PMDGAIN da calculates the relative gain of individual channel.
147
148 The input to this program are the following files.
149
150     Mapping file which is mentioned above and can also be taken from here 
151     * Run0_999999999_v0_s0.root: Run0_999999999_v0_s0.root. During the 
152     run this file is fetched from the DAQ database and The other input 
153     is "PMD_GAIN_CONFIGFILE" which can be either taken from here 
154     PMD_GAIN_CONFIGFILE: PMD_GAIN_CONFIGFILE or from 
155     $ALICE_ROOT/PMD/PMD_GAIN_CONFIGFILE. This file has 5 words. 
156
157     filestatus    : 0 or 1 (to start a new run or not) 
158     xvar      : variance define (say 5 sigma) to define the hot cell 
159     totevt    : incremented event number 
160     maxevt    : Total number of Physics event required to find gain 
161     hotevtsize : after these many events, the hot cell file will be generated
162
163     PMD_PED.root : A copy of this file is already in the DAQ database. 
164     Before every run this is copied from the DAQ database and kept in the 
165     local directory for further use. 
166
167 Output files:
168 ------------
169 PMDGAINS.root
170 PMD_MEAN_SM.root
171
172 Input/Output files:
173
174 1. PMD_HOT.root : This is the output of gain DA and it is again reused by the DA.
175
176 2. pmd_gain_tempfile.dat : This is an ASCII file and generated by gain DA 
177    and again taken as the input in the next run.
178
179     If filestatus = 0, the temporary file "pmd_gain_tempfile.dat" 
180     is generated. 
181
182     If filestatus = 1, the temporary file "pmd_gain_tempfile.dat" 
183     is fetched from the DAQ database. 
184
185
186 The file for gain da validation can be found here
187 /afs/cern.ch/user/s/sjena/public/run83496.raw
188
189 Link to Codes:
190
191 PEDESTALda http://alisoft.cern.ch/viewvc/trunk/PMD/PMDPEDESTALda.cxx?root=AliRoot&view=log
192 GAINda http://alisoft.cern.ch/viewvc/trunk/PMD/PMDGAINda.cxx?root=AliRoot&view=log 
193
194
195
196 How to build DA (cc from central da page)
197 =======================
198 Building of the DAs is handled in Aliroot. You can find below some hints on 
199 how to build DAs, but this is no official documentation (such documentation 
200 has been requested). In case of problems please report directly to the 
201 Offline team. Build targets for DAs are created by cmake. Before invoking cmake, 
202 in addition to the standard Aliroot settings (see README_CMake in Aliroot), 
203 one should make sure it will detect the DA dependencies, or DA compile errors may follow:
204
205     DATE: launch DATE setup with . /date/setup.sh
206     AMORE: make sure amore-config is in the path, e.g. export PATH=${PATH}:/opt/amore
207     daqDA-lib: export DAQDALIB_PATH=/opt/daqDA-lib
208
209 Sourcing the following example environment should allow to build DAs using 
210 default dependencies installation path:
211 . DAbuildenv.sh
212
213 Afte cmake is invoked, one can build DAs with one of the following targets:
214
215     make daqDA-PMD-all : build all DAs for detector 
216     make daqDA-PMD-rpm : build DA RPM packages 
217   
218    make daqDA-PMD-PEDESTAL : build a given DA
219    make daqDA-PMD-PEDESTAL-rpm : build a given DA RPM
220
221    make daqDA-PMD-GAIN : build a given DA
222    make daqDA-PMD-GAIN-rpm : build a given DA RPM
223
224 RPMs are created in the build directory. Binaries are stored under ./lib/tgt_linuxx8664gcc
225
226
227 DA testing information
228 ======================
229 It is possible to fully test the DAs outside of the production framework. 
230 It can be done by setting a number of environment variable, as described 
231 in the example DAtestenv.sh
232
233
234     # This is an example DA test environment
235     # Put DB files needed by DA in $DAQDA_TEST_DIR
236     # and then launch the DA with DAexe DAtestfile.
237     # DA local output files will be in $TESTDIR directory
238     # and exported files (FXS, AMORE, DaqDetDB) will go to $DAQDA_TEST_DIR.
239
240     # to change according to local settings
241     TESTDIR=/tmp/DAtest
242     export        DAQDALIB_PATH=.../daqDAlib
243
244     # to be left unchanged
245     export        PATH=/bin:/usr/bin
246     export        ROOTSYS=NULL
247     unset         ALICE_ROOT
248     export        DAQDA_TEST_DIR=${TESTDIR}/db
249     export        AMORE_NO_DB_DIR=${TESTDIR}/db
250     export        DATE_RUN_NUMBER=12345
251     export        DATE_DETECTOR_CODE=TST
252     export        AMORE_NO_DB=true
253     export        DATE_ROLE_NAME=myrole
254     export        DIM_DNS_NODE=noname
255
256     mkdir -p $TESTDIR
257     mkdir -p $DAQDA_TEST_DIR
258     cd $TESTDIR
259
260 Detector DA deployment procedure (cc from DA page)
261 =================================
262 The detector team should contact the DAQ team (alice-datesupport@cern.ch) 
263 and the following steps should be done (in parenthesis, the responsible 
264 of each action is indicated):
265
266    1. define the calibrations tasks, DAs and corresponding run types in 
267       the ECS (detector team)
268    2. commit code in Aliroot and test it (detector team)
269    3. contact DAQ team to ask for DA release and provide raw data 
270       test files (detector team)
271    4. build RPM (DAQ team)
272    5. compliance checks with DA framework packaging and documentation 
273       guidelines. (DAQ team)
274    6. in case of fulfillment of the requirements, the DA is considered 
275       validated for deployment and the detector team is informed (DAQ team)
276    7. deploy and exercise the DA on a real setup with the full DAQ chain 
277       and the detector hardware (detector team)
278    8. all the above steps are mandatory before allowing the usage of the 
279       detector DA in production, ie during cosmic runs
280    9. changes in detector DA code (detector team) imply the repetition of 
281       steps 2 to 7
282