]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EMCAL/SMcalib/README
use same DAC-HV value relation as for calibrations + voltage values stored as floats...
[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
221) Generating an APD map: normal use case in a root macro for your SuperModule
23-------------------------
24//a) create a dummy space in memory:
25 gSystem->Load("AliEMCALMapAPD_cxx");
26 AliEMCALMapAPD *mapAPD = new AliEMCALMapAPD();
27
28 Int_t iSM[2] = {0,1}; // allow for two SuperModules
29 mapAPD->GenerateDummyAPDInfo(1, iSM); // space for one SuperModule, with number iSM[0] = 0
30
31//b) overwrite this memory with the actual values for the StripModules; one line for each of the 24 stripmodules (0-23)
32 mapAPD->ReadMapAPDInfoSingleStripBasis(0, 21, "APDStripModXY.txt");
33// "XY" should perhaps be F5 for 5th stripmodule from Frascati or something like that. F=Frascati, W=WSU, N=Nantes, C=Catania
34
35//For a "APDStripModXY.txt" file, 48 lines with 3 fields:
36//StripColumn StripRow APDNum
37//is expected..
38
39//c) write out the map for column, row, APD for the whole SM:
40 mapAPD->WriteMapAPDInfo("APDSuperModY1.txt"); // Y=Yale, G=Grenoble
41
422) Generating a file of V30 bias values for each tower:
43-------------------------------------------------------
44# arguments are:
451: input APD database csv file
462: APD map file - which tower is where in the SuperModule; from step 1) above.
473: defaultVoltage - use 390 if no settings can be found for some APDs
484: outputfile
49
50root -b 'WriteBiasV30.C("APD-database.csv", "DummySuperModAPDMap.txt", 390, "BiasV30.txt")' -q
51# aliroot also works instead of root; as you prefer
52
533) Optional - e.g. in case you don't have the whole SuperModule APD map or what not
54Generating a file of the same bias value for each tower:
55----------------------------------------------------------
cdb5074a 56root -b 'WriteBiasFixVoltage.C(390, "Bias390.txt")' -q # aliroot also works..
a8827307 57
584) Generating a file of new bias values for each tower:
59- based on existing file, and a suggested gain factor change, to obtain a balanced setup
60------------------------------------------------------------
61"GainChange.txt" here contains a factor for each tower: factor 0.9 would mean a reduction
62by 10% and factor 1.1 would mean an increase by 10% relative to the file used previously,
63in this case BiasV30.txt.
64
65root -b 'WriteNewBias.C("APD-database.csv", "DummySuperModAPDMap.txt", "BiasV30.txt", "GainChange.txt", "NewBias.txt")' -q # aliroot also works..
66
675) Converting a bias value file to a set of files that can be used by DCS/RCU:
68-----------------------------------------------------------------------------
69Arguments are:
701: input file with voltage per tower
712: output directory for scripts
723: [optional: put a non-zero value there to also ask for the values to be read back at the end of the 'set' files]
73
74mkdir APD # create output directory
75root -b 'DCSGenerateAPD.C("NewBias.txt","APD")' -q
76
77The result should be that 1 'set' and 1 'read' file for each FEC should have been created in the directory APD/.
78
796) Use the newly produced files:
80-------------------------------
81Copy the files, and possibly biasSetup.sh into your DCS nodes
82(e.g. with scp, or better use nfsmount on DCS cards to see some directory
83on your DAQ computer, if possible),
84rcu_0 files should be readable by RCU0 DCS, and rcu_1 files should be readable by RCU1 DCS.
85
86Then, on the DCS card, you can do something like:
87cd /dcs
88./biasSetup.sh 0 # argument is RCU (0 or 1),; we need to tell each RCU who (s)he is..
89