]>
Commit | Line | Data |
---|---|---|
a8827307 | 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: 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 | ||
42 | 2) Generating a file of V30 bias values for each tower: | |
43 | ------------------------------------------------------- | |
44 | # arguments are: | |
45 | 1: input APD database csv file | |
46 | 2: APD map file - which tower is where in the SuperModule; from step 1) above. | |
47 | 3: defaultVoltage - use 390 if no settings can be found for some APDs | |
48 | 4: outputfile | |
49 | ||
50 | root -b 'WriteBiasV30.C("APD-database.csv", "DummySuperModAPDMap.txt", 390, "BiasV30.txt")' -q | |
51 | # aliroot also works instead of root; as you prefer | |
52 | ||
53 | 3) Optional - e.g. in case you don't have the whole SuperModule APD map or what not | |
54 | Generating a file of the same bias value for each tower: | |
55 | ---------------------------------------------------------- | |
56 | root -b 'WriteBiasFixVoltage(390, "Bias390.txt")' -q # aliroot also works.. | |
57 | ||
58 | 4) 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 | |
62 | by 10% and factor 1.1 would mean an increase by 10% relative to the file used previously, | |
63 | in this case BiasV30.txt. | |
64 | ||
65 | root -b 'WriteNewBias.C("APD-database.csv", "DummySuperModAPDMap.txt", "BiasV30.txt", "GainChange.txt", "NewBias.txt")' -q # aliroot also works.. | |
66 | ||
67 | 5) Converting a bias value file to a set of files that can be used by DCS/RCU: | |
68 | ----------------------------------------------------------------------------- | |
69 | Arguments are: | |
70 | 1: input file with voltage per tower | |
71 | 2: output directory for scripts | |
72 | 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] | |
73 | ||
74 | mkdir APD # create output directory | |
75 | root -b 'DCSGenerateAPD.C("NewBias.txt","APD")' -q | |
76 | ||
77 | The result should be that 1 'set' and 1 'read' file for each FEC should have been created in the directory APD/. | |
78 | ||
79 | 6) Use the newly produced files: | |
80 | ------------------------------- | |
81 | Copy 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 | |
83 | on your DAQ computer, if possible), | |
84 | rcu_0 files should be readable by RCU0 DCS, and rcu_1 files should be readable by RCU1 DCS. | |
85 | ||
86 | Then, on the DCS card, you can do something like: | |
87 | cd /dcs | |
88 | ./biasSetup.sh 0 # argument is RCU (0 or 1),; we need to tell each RCU who (s)he is.. | |
89 |