]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EMCAL/SMcalib/README
Move setting of cluster in array after the cluster has been modified with distance...
[u/mrichter/AliRoot.git] / EMCAL / SMcalib / README
CommitLineData
a8827307 1silvermy@ornl.gov, Oct 9, 2008:
2This README file and the associated macros are meant to help with the SuperModule calibrations.
3
4The steps below indicate how a set of bias
5values (fixed voltage, or V30 for each APD, and a 2nd iteration with gain balancing)
6for a SuperModule can be created.
7
8The necessary information that would be needed to complete the steps would be
9A) APD calibration info (csv file) - from Catania or Houston
10B) Info on which APD goes where in the different StripModules - and
11where these StripModules end up in the SuperModule.
12C) [for the balancing] A file obtained from the first analysis iteration regarding
13how the gains should be modified, for each tower.
14
15/David Silvermyr
16
170) Compile the help classes in root or aliroot:
18----------------------------------------------
19root [0] .L AliEMCALMapAPD.cxx+
20root [1] .L AliEMCALCalibAPD.cxx+
21
c093846b 221) Generating an APD map: example use case in a root macro
a8827307 23-------------------------
c093846b 24Note: the contents of this macro has to be strongly modified to adapt to
25your SuperModule setup..
26root -b GenerateAPDMap.C -q
a8827307 27
282) Generating a file of V30 bias values for each tower:
29-------------------------------------------------------
30# arguments are:
c093846b 311: input APD database dat file
32[ this can be produced from the csv file with a cmd like:
33sed 's/,/ /g' APD-database-Houston.csv | awk '{if (NF==19) {print $0}}' > APD-database-Houston.dat ]
a8827307 342: APD map file - which tower is where in the SuperModule; from step 1) above.
353: defaultVoltage - use 390 if no settings can be found for some APDs
364: outputfile
37
c093846b 38root -b 'WriteBiasV30.C("APD-database-Houston.dat", "APD/APDSuperModW1.txt", 390, "BiasV30.txt")' -q
a8827307 39# aliroot also works instead of root; as you prefer
40
413) Optional - e.g. in case you don't have the whole SuperModule APD map or what not
42Generating a file of the same bias value for each tower:
43----------------------------------------------------------
cdb5074a 44root -b 'WriteBiasFixVoltage.C(390, "Bias390.txt")' -q # aliroot also works..
a8827307 45
464) 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
50by 10% and factor 1.1 would mean an increase by 10% relative to the file used previously,
51in this case BiasV30.txt.
52
c093846b 53root -b 'WriteNewBias.C("APD-database-Houston.dat", "APD/APDSuperModW1.txt", "BiasV30.txt", "GainChange.txt", "NewBias.txt")' -q # aliroot also works..
a8827307 54
555) Converting a bias value file to a set of files that can be used by DCS/RCU:
56-----------------------------------------------------------------------------
57Arguments are:
581: input file with voltage per tower
592: output directory for scripts
603: [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
62mkdir APD # create output directory
63root -b 'DCSGenerateAPD.C("NewBias.txt","APD")' -q
64
65The result should be that 1 'set' and 1 'read' file for each FEC should have been created in the directory APD/.
66
676) Use the newly produced files:
68-------------------------------
69Copy 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
71on your DAQ computer, if possible),
72rcu_0 files should be readable by RCU0 DCS, and rcu_1 files should be readable by RCU1 DCS.
73
74Then, on the DCS card, you can do something like:
75cd /dcs
76./biasSetup.sh 0 # argument is RCU (0 or 1),; we need to tell each RCU who (s)he is..
77