]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EMCAL/SMcalib/README
Updated version of ITS QA Checker and related modifications (Melinda)
[u/mrichter/AliRoot.git] / EMCAL / SMcalib / README
1 silvermy@ornl.gov, Oct 9, 2008: 
2 This README file and the associated macros are meant to help with the SuperModule calibrations.
3
4 The steps below indicate how a set of bias
5 values (fixed voltage, or V30 for each APD, and a 2nd iteration with gain balancing)
6 for a SuperModule can be created.
7
8 The necessary information that would be needed to complete the steps would be
9 A) APD calibration info (csv file) - from Catania or Houston
10 B) Info on which APD goes where in the different StripModules - and
11 where these StripModules end up in the SuperModule.
12 C) [for the balancing] A file obtained from the first analysis iteration regarding
13 how the gains should be modified, for each tower.
14
15 /David Silvermyr
16
17 0) Compile the help classes in root or aliroot:
18 ----------------------------------------------
19 root [0] .L AliEMCALMapAPD.cxx+
20 root [1] .L AliEMCALCalibAPD.cxx+
21
22 1) Generating an APD map: example use case in a root macro
23 -------------------------
24 Note: the contents of this macro has to be strongly modified to adapt to 
25 your SuperModule setup..
26 root -b GenerateAPDMap.C -q
27
28 2) Generating a file of V30 bias values for each tower:
29 ------------------------------------------------------- 
30 # arguments are:
31 1: input APD database dat file 
32 [ this can be produced from the csv file with a cmd like: 
33 sed 's/,/ /g' APD-database-Houston.csv | awk '{if (NF==19) {print $0}}' > APD-database-Houston.dat ]
34 2: APD map file - which tower is where in the SuperModule; from step 1) above. 
35 3: defaultVoltage - use 390 if no settings can be found for some APDs
36 4: outputfile
37
38 root -b 'WriteBiasV30.C("APD-database-Houston.dat", "APD/APDSuperModW1.txt", 390, "BiasV30.txt")' -q 
39 # aliroot also works instead of root; as you prefer
40
41 3) Optional - e.g. in case you don't have the whole SuperModule APD map or what not 
42 Generating a file of the same bias value for each tower:
43 ---------------------------------------------------------- 
44 root -b 'WriteBiasFixVoltage.C(390, "Bias390.txt")' -q # aliroot also works..
45
46 4) Generating a file of new bias values for each tower:
47 - based on existing file, and a suggested gain factor change, to obtain a balanced setup
48 ------------------------------------------------------------
49 "GainChange.txt" here contains a factor for each tower: factor 0.9 would mean a reduction
50 by 10% and factor 1.1 would mean an increase by 10% relative to the file used previously,
51 in this case BiasV30.txt.
52
53 root -b 'WriteNewBias.C("APD-database-Houston.dat", "APD/APDSuperModW1.txt", "BiasV30.txt", "GainChange.txt", "NewBias.txt")' -q # aliroot also works..
54
55 5) Converting a bias value file to a set of files that can be used by DCS/RCU: 
56 -----------------------------------------------------------------------------
57 Arguments are:
58 1: input file with voltage per tower
59 2: output directory for scripts
60 3: [optional: put a non-zero value there to also ask for the values to be read back at the end of the 'set' files]
61
62 mkdir APD # create output directory
63 root -b 'DCSGenerateAPD.C("NewBias.txt","APD")' -q
64
65 The result should be that 1 'set' and 1 'read' file for each FEC should have been created in the directory APD/.
66
67 6) Use the newly produced files:
68 -------------------------------
69 Copy the files, and possibly biasSetup.sh into your DCS nodes 
70 (e.g. with scp, or better use nfsmount on DCS cards to see some directory
71 on your DAQ computer, if possible),
72 rcu_0 files should be readable by RCU0 DCS, and rcu_1 files should be readable by RCU1 DCS.
73
74 Then, on the DCS card, you can do something like:
75 cd /dcs
76 ./biasSetup.sh 0 # argument is RCU (0 or 1),; we need to tell each RCU who (s)he is..
77