1 DETECTOR ALGORITHM for PMD
2 ++++++++++++++++++++++++++
3 This is a brief note on pmd da:
4 - how to get info at P@2
8 - Deployment procedures.
12 Updated: Wed Aug 4 11:03:37 CEST 2010
13 ++++++++++++++++++++++++++
15 Information is added at:
16 https://twiki.cern.ch/twiki/bin/view/ALICE/DA
18 Detail of Central DA Framework can be found here:
19 https://aliceinfo.cern.ch/DAQ/index.php?q=products/detector-algorithms
21 ++++++++++++++++++++++++++
23 ++++++++++++++++++++++++++
24 Please note that: The informatoins are also kept in the DA code
25 header, it is the requirements for DA framework. Please nver change
26 the values. it should look like:
28 PMD DA for online calibration
30 contact: basanta@iitb.ac.in, Satyajit.Jena@cern.ch
31 Link: https://twiki.cern.ch/twiki/bin/view/ALICE/DA
32 Reference run:/afs/cern.ch/user/s/sjena/public/run83496.raw
35 Number of events needed: 1 million for PB+PB, 200 milion for p+p
36 Input Files: PMD/Calib/Mapping/Run0_999999999_v0_s0.root, PMD_PED.root,
37 PMD_GAIN_CONFIGFILE, pmd_gain_tempfile.dat
38 Output Files: PMDGAINS.root, to be exported to the DAQ FES
39 Trigger types used: PHYSICS_EVENT
45 PMD DA for online calibration
47 contact: basanta@iitb.ac.in, Satyajit.Jena@cern.ch
48 Link: https://twiki.cern.ch/twiki/bin/view/ALICE/DA
49 Reference Run:/afs/cern.ch/user/s/sjena/public/run83496.raw
52 Number of events needed: 1000
53 Input Files: PMD/Calib/Mapping/Run0_999999999_v0_s0.root
54 Output Files: pmd_ped.root, to be exported to the DAQ FXS, pedestal230*.ped
55 Trigger types used: PHYSICS_EVENT
59 This infomration can be accessed in P@2 machince via rpm -qip command
62 rpm -qip daqDA-PMD-GAIN-36451-trunk.36552.i386.rpm
64 it will show all the following information it has:
66 [pmdldc01] /home/pmd/AliSoft/AliRoot > rpm -qip daqDA-PMD-PEDESTAL-36451-trunk.36552.i386.rpm
67 Name : daqDA-PMD-PEDESTAL Relocations: /opt/daqDA-PMD-PEDESTAL
68 Version : 36451 Vendor: (none)
69 Release : trunk.36552 Build Date: Mon 09 Nov 2009 01:51:47 PM CET
70 Install Date: (not installed) Build Host: pmdldc01.cern.ch
71 Group : Applications/Alice Source RPM: daqDA-PMD-PEDESTAL-36451-trunk.36552.src.rpm
72 Size : 65331468 License: CERN Alice DAQ/Offine
74 Summary : PMD Detector Algorithm
76 This is the PMD PEDESTAL DA for online calibration.
77 It uses data from PMD and detectors at run time.
78 Build requires: daqDAlib, date, AliRoot trunk.36552, ROOT 5.24.00.
79 Runtime requires: date.
80 Contact: basanta@phy.iitb.ac.in, Satyajit.Jena@cern.ch
82 Reference Run: /afs/cern.ch/user/s/sjena/public/run83496.raw
85 Number of events needed: 1000
86 Input files: PMD/Calib/Mapping
87 Output files: pmd_ped.root, to be exported to the DAQ FXS, pedestal230*.ped
88 Trigger types used: PHYSICS_EVENT
90 ================================
91 A Brief Infromation about PMD DA
92 ================================
94 PMD has two types of detector algorithm. One algorithm is for the
95 pedestal data and the other one is for the online gain calibration.
99 Pedestal DA is to calculate the mean pedestal value and the root
100 mean square value for each channel. The output is written in a
101 root file and finally goes to the OCDB
103 for offline reconstruction.
105 At the same time this pedestal da also writes the pedestal values
106 in ASCII file corresponding to each DDL. This file is appropriately
107 converted to the right format and is loaded
109 to the MARC for pedestal suppression while taking data. The ASCII files are:
118 Six files corresponding to 6 DDL. This is our original configuration.
120 However, in the year 2009, we have 4 DDL. The corresponding files are:
127 --Two DDLs are for PREshower plane (2304, 2305) and two DDLs (2308, 2309)
130 --The input to this da code is the mapping file which can be found here
131 (Run0_999999999_v0_s0.root).
133 This file can be taken from here or from
134 $ALICE_ROOT/OCDB/PMD/Calib/Mapping/Run0_999999999_v0_s0.root.
136 * Run0_999999999_v0_s0.root: Run0_999999999_v0_s0.root
138 This file has to be stored in the DAQ database and will be fetched from the
139 DAQ database and kept in a local directory as
141 localOCDB/PMD/Calib/Mapping/Run0_999999999_v0_s0.root.
143 The output of pedestal da is "PMD_PED.root" which contains mean and rms of
144 each channel in a tree. One copy goes to the DAQ database for pedestal
145 subtraction while running the gain DA and another copy goes to FES and
146 ultimately to the OCDB for offline reconstruction.
148 The pedestal run for validation can be found here
150 /afs/cern.ch/user/s/sjena/public/run83496.raw
154 PMDGAIN da calculates the relative gain of individual channel.
156 The input to this program are the following files.
158 Mapping file which is mentioned above and can also be taken from here
159 * Run0_999999999_v0_s0.root: Run0_999999999_v0_s0.root. During the
160 run this file is fetched from the DAQ database and The other input
161 is "PMD_GAIN_CONFIGFILE" which can be either taken from here
162 PMD_GAIN_CONFIGFILE: PMD_GAIN_CONFIGFILE or from
163 $ALICE_ROOT/PMD/PMD_GAIN_CONFIGFILE. This file has 5 words.
165 filestatus : 0 or 1 (to start a new run or not)
166 xvar : variance define (say 5 sigma) to define the hot cell
167 totevt : incremented event number
168 maxevt : Total number of Physics event required to find gain
169 hotevtsize : after these many events, the hot cell file will be generated
171 PMD_PED.root : A copy of this file is already in the DAQ database.
172 Before every run this is copied from the DAQ database and kept in the
173 local directory for further use.
182 1. PMD_HOT.root : This is the output of gain DA and it is again reused by the DA.
184 2. pmd_gain_tempfile.dat : This is an ASCII file and generated by gain DA
185 and again taken as the input in the next run.
187 If filestatus = 0, the temporary file "pmd_gain_tempfile.dat"
190 If filestatus = 1, the temporary file "pmd_gain_tempfile.dat"
191 is fetched from the DAQ database.
194 The file for gain da validation can be found here
195 /afs/cern.ch/user/s/sjena/public/run83496.raw
197 Detail logics and implimentation can be understood by looking at the
198 code with a minimal knowledge of PMD data structures.
201 PEDESTALda http://alisoft.cern.ch/viewvc/trunk/PMD/PMDPEDESTALda.cxx?root=AliRoot&view=log
202 GAINda http://alisoft.cern.ch/viewvc/trunk/PMD/PMDGAINda.cxx?root=AliRoot&view=log
204 =======================
206 =======================
207 Building of the DAs is handled in Aliroot. You can find below some hints on
208 how to build DAs, but this is no official documentation (such documentation
209 has been requested). In case of problems please report directly to the
210 Offline team. Build targets for DAs are created by cmake. Before invoking cmake,
211 in addition to the standard Aliroot settings (see README_CMake in Aliroot),
212 one should make sure it will detect the DA dependencies, or DA compile errors may follow:
214 DATE: launch DATE setup with . /date/setup.sh
215 AMORE: make sure amore-config is in the path, e.g. export PATH=${PATH}:/opt/amore
216 daqDA-lib: export DAQDALIB_PATH=/opt/daqDA-lib
218 Sourcing the following example environment should allow to build DAs using
219 default dependencies installation path:
222 Afte cmake is invoked, one can build DAs with one of the following targets:
224 make daqDA-PMD-all : build all DAs for detector
225 make daqDA-PMD-rpm : build DA RPM packages
227 make daqDA-PMD-PEDESTAL : build a given DA
228 make daqDA-PMD-PEDESTAL-rpm : build a given DA RPM
230 make daqDA-PMD-GAIN : build a given DA
231 make daqDA-PMD-GAIN-rpm : build a given DA RPM
233 RPMs are created in the build directory. Binaries are stored under ./lib/tgt_linuxx8664gcc
235 ======================
236 DA testing information
237 ======================
238 It is possible to fully test the DAs outside of the production framework.
239 It can be done by setting a number of environment variable, as described
240 in the example DAtestenv.sh
243 # This is an example DA test environment
244 # Put DB files needed by DA in $DAQDA_TEST_DIR
245 # and then launch the DA with DAexe DAtestfile.
246 # DA local output files will be in $TESTDIR directory
247 # and exported files (FXS, AMORE, DaqDetDB) will go to $DAQDA_TEST_DIR.
249 # to change according to local settings
251 export DAQDALIB_PATH=.../daqDAlib
253 # to be left unchanged
254 export PATH=/bin:/usr/bin
257 export DAQDA_TEST_DIR=${TESTDIR}/db
258 export AMORE_NO_DB_DIR=${TESTDIR}/db
259 export DATE_RUN_NUMBER=12345
260 export DATE_DETECTOR_CODE=TST
261 export AMORE_NO_DB=true
262 export DATE_ROLE_NAME=myrole
263 export DIM_DNS_NODE=noname
266 mkdir -p $DAQDA_TEST_DIR
269 =================================
270 Detector DA deployment procedure (cc from DA page)
271 =================================
272 The detector team should contact the DAQ team (alice-datesupport@cern.ch)
273 and the following steps should be done (in parenthesis, the responsible
274 of each action is indicated):
276 1. define the calibrations tasks, DAs and corresponding run types in
277 the ECS (detector team)
278 2. commit code in Aliroot and test it (detector team)
279 3. contact DAQ team to ask for DA release and provide raw data
280 test files (detector team)
281 4. build RPM (DAQ team)
282 5. compliance checks with DA framework packaging and documentation
283 guidelines. (DAQ team)
284 6. in case of fulfillment of the requirements, the DA is considered
285 validated for deployment and the detector team is informed (DAQ team)
286 7. deploy and exercise the DA on a real setup with the full DAQ chain
287 and the detector hardware (detector team)
288 8. all the above steps are mandatory before allowing the usage of the
289 detector DA in production, ie during cosmic runs
290 9. changes in detector DA code (detector team) imply the repetition of
293 Please feel free to contact me (sjena@cern.ch, satya.ino@gmail.com) to know
294 more or in case of any trouble.