1 DETECTOR ALGORITHM for PMD
2 ++++++++++++++++++++++++++
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
10 Detail of Central DA Framework can be found here:
11 https://aliceinfo.cern.ch/DAQ/index.php?q=products/detector-algorithms
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:
17 PMD DA for online calibration
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
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
33 PMD DA for online calibration
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
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
49 This infomration can be accessed in P@2 machince via rpm -qip command
52 rpm -qip daqDA-PMD-GAIN-36451-trunk.36552.i386.rpm
54 it will show all the following information it has:
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
64 Summary : PMD Detector Algorithm
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
72 Reference Run: /afs/cern.ch/user/s/sjena/public/run83496.raw
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
81 -------------------------------
83 A Brief Infromation about PMD DA
84 ================================
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.
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
95 for offline reconstruction.
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
101 to the MARC for pedestal suppression while taking data. The ASCII files are:
110 Six files corresponding to 6 DDL. This is our original configuration.
112 However, in the year 2009, we have 4 DDL. The corresponding files are:
119 --Two DDLs are for PREshower plane (2304, 2305) and two DDLs (2308, 2309)
122 --The input to this da code is the mapping file which can be found here
123 (Run0_999999999_v0_s0.root).
125 This file can be taken from here or from
126 $ALICE_ROOT/OCDB/PMD/Calib/Mapping/Run0_999999999_v0_s0.root.
128 * Run0_999999999_v0_s0.root: Run0_999999999_v0_s0.root
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
133 localOCDB/PMD/Calib/Mapping/Run0_999999999_v0_s0.root.
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.
140 The pedestal run for validation can be found here
142 /afs/cern.ch/user/s/sjena/public/run83496.raw
146 PMDGAIN da calculates the relative gain of individual channel.
148 The input to this program are the following files.
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.
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
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.
174 1. PMD_HOT.root : This is the output of gain DA and it is again reused by the DA.
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.
179 If filestatus = 0, the temporary file "pmd_gain_tempfile.dat"
182 If filestatus = 1, the temporary file "pmd_gain_tempfile.dat"
183 is fetched from the DAQ database.
186 The file for gain da validation can be found here
187 /afs/cern.ch/user/s/sjena/public/run83496.raw
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
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:
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
209 Sourcing the following example environment should allow to build DAs using
210 default dependencies installation path:
213 Afte cmake is invoked, one can build DAs with one of the following targets:
215 make daqDA-PMD-all : build all DAs for detector
216 make daqDA-PMD-rpm : build DA RPM packages
218 make daqDA-PMD-PEDESTAL : build a given DA
219 make daqDA-PMD-PEDESTAL-rpm : build a given DA RPM
221 make daqDA-PMD-GAIN : build a given DA
222 make daqDA-PMD-GAIN-rpm : build a given DA RPM
224 RPMs are created in the build directory. Binaries are stored under ./lib/tgt_linuxx8664gcc
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
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.
240 # to change according to local settings
242 export DAQDALIB_PATH=.../daqDAlib
244 # to be left unchanged
245 export PATH=/bin:/usr/bin
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
257 mkdir -p $DAQDA_TEST_DIR
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):
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