1 | 20/09/2013 How to eaqualize the gain of MAPMTs on an EC_Unit |
---|
2 | Written by Hiroko Miyamoto |
---|
3 | |
---|
4 | |
---|
5 | First of all, things are not fully automatick yet as we are still |
---|
6 | looking for the best way to carry it out. |
---|
7 | |
---|
8 | |
---|
9 | |
---|
10 | <STEP 1> Organize your directories (I prefer to use bash.sh |
---|
11 | instead of csh,tcsh): |
---|
12 | % mkdir YOUR_DIR/analysis |
---|
13 | % mkdir YOUR_DIR/analysis/src |
---|
14 | % mkdir YOUR_DIR/analysis/data |
---|
15 | % export YOUR_DIR/analysis/src srcDIR |
---|
16 | % export YOUR_DIR/analysis/data dataDIR |
---|
17 | |
---|
18 | make your data directory for the day. e.g.,: |
---|
19 | % mkdir $dataDIR/yYYmMMdDD-APC |
---|
20 | % cd yYYmMMdDD-APC |
---|
21 | |
---|
22 | |
---|
23 | <STEP 2> Modify data file obtained by LabView to fit and make |
---|
24 | data directories for the analysis: |
---|
25 | There are many ways to do this, and you can do as you wish. |
---|
26 | Ask Pierre to make the data file which includes DAC values |
---|
27 | and data for ASIC_C and ASIC_D at the beginning as he knows |
---|
28 | what I mean. |
---|
29 | |
---|
30 | If you want, the data obtained by LabView can be used as itself |
---|
31 | with modifying the parameter on my makeDataFile.sh script. |
---|
32 | I leave it for right now because we haven't fixed the data format |
---|
33 | yet, at least by the last time I was there. |
---|
34 | |
---|
35 | |
---|
36 | % cp -p data_s_curves_runXX.data . |
---|
37 | % sh $srcDIR/makeDataFile.sh data_s_curves_runXX |
---|
38 | |
---|
39 | This sh automatically makes two directories data_s_curves_runXX_C |
---|
40 | and data_s_curves_runXX_D for the data of ASIC_C and ASIC_D respectively. |
---|
41 | |
---|
42 | From next steps, it totally depends on which data you are taking. |
---|
43 | Assume you want to analyse the data of ASIC_C. |
---|
44 | |
---|
45 | |
---|
46 | <STEP 3> Run ROOT, search the suitable parameters for each data |
---|
47 | % cd data_s_curves_runXX_C |
---|
48 | % ln -s ../FORMER_GAIN_DATA.txt gain-org.txt |
---|
49 | |
---|
50 | Usually, the following command is not necessary as long as the data |
---|
51 | includes pedestal, otherwise: |
---|
52 | % ln -s ../$pedestal_data_directory_D/*.dat . |
---|
53 | |
---|
54 | Check the parameters in header file or directory input the parameter |
---|
55 | in main function as you can see in the source code. |
---|
56 | This totally depends on the data. You have to modify it to suitable |
---|
57 | parameters. |
---|
58 | |
---|
59 | % root -l |
---|
60 | |
---|
61 | Set the parameters on the top of the program depending on your analysis. |
---|
62 | ⢠General policy: parameters starting with "k" at the beginning is |
---|
63 | fixed global parameter and usually set in the header file, never change |
---|
64 | through the program. |
---|
65 | ⢠kDrawCh: channel just you want to check on display. doens't effect |
---|
66 | the analysis. |
---|
67 | ⢠fname, fname_ped (kFname, kFnamePed): "YOUR DATA FILE" without ".data". |
---|
68 | See examples in the header file. |
---|
69 | ⢠dac_half_spe_fix: set DAC value only when you want to adjust the gain |
---|
70 | to particular pulse height (DAC value) instead of either average of the |
---|
71 | pulse height of reference pixel. Usually just leave it -1. |
---|
72 | ⢠fit_min, fit_max (kFitMin, kFitMax): leave them as default, |
---|
73 | it is not currently used for the analysis. |
---|
74 | ⢠fit_min_scurve, fit_max_scurve (kFitMinS, kFitMaxS): define the range |
---|
75 | of s-curve fitting. search proper values by yourself with running root |
---|
76 | program a few times. |
---|
77 | ⢠kBoard: don't forget to change 0(C) or 1(D) depending on which ASIC |
---|
78 | you're analysing |
---|
79 | ⢠kChRef (kRefCh): a pixel whose gain remains 64 thorough the gain |
---|
80 | adjustment. |
---|
81 | ⢠checkAve: for the first run, set this parameter 1, and find a pixel |
---|
82 | which remains 64. In the case of parameter 1, all the gains are adjusted |
---|
83 | to the average pulse height. |
---|
84 | Once you choose the reference pixel, set the parameter 0, as well as |
---|
85 | set kRefCh the pixel number. (better to keep in the header file for the |
---|
86 | record of each PMTs.) |
---|
87 | |
---|
88 | Once you set all the parameters above, then |
---|
89 | [].L PlotScurvesAll-diffFit.C |
---|
90 | []PlotScurve() |
---|
91 | |
---|
92 | Repeat until you define all the parameters above. |
---|
93 | |
---|
94 | |
---|
95 | <STEP 4> Make the gain table |
---|
96 | Once you decide the parameters and modify the header file, then run |
---|
97 | % root -l > tmp.data |
---|
98 | [].L PlotScurvesAll-diffFit.C |
---|
99 | []PlotScurve() |
---|
100 | [].q |
---|
101 | |
---|
102 | If you have the data of ASIC_D, go to the directory of ASIC_D |
---|
103 | and do the same. |
---|
104 | |
---|
105 | % cd ../ |
---|
106 | Check the paramters in $srcDIR/makeGainTable.sh and run |
---|
107 | You should add/remove #s depending on which data you're analysing. |
---|
108 | % sh makeGainTable.sh |
---|
109 | Or type by your hands the commands in the script file. |
---|
110 | |
---|
111 | If everything has been done properly, you should get a gain |
---|
112 | table with a proper format. |
---|
113 | I would recommend that when you make tmp.data file, to include |
---|
114 | the value of threshold used, and the number of iteration, e.g., |
---|
115 | tmp-th180-it0.data |
---|
116 | And then do the iteration of the analysis with the data with |
---|
117 | the obtained gain table until you get reasonable uniformity. |
---|
118 | |
---|
119 | NOTE that, sometimes PMT gain or efficiency is too low to obtain |
---|
120 | the inflection point, in this case the program outputs the -1 for |
---|
121 | flag_fit. If it remains -1 after some trials, you should adjust |
---|
122 | by hand. Ask Philippe for detailes. |
---|
123 | |
---|
124 | |
---|
125 | <STEP 5> Adjust gain of EC_unit |
---|
126 | Once you succeed to obtain all the gain tables: |
---|
127 | 1) check the pulse height (dac_sfit[kChRef]-dac_ped[kChRef]) |
---|
128 | 2) choose 1 of 4 PMTs in EC_unit |
---|
129 | 3) take the ratio of pulse height between reference pixels |
---|
130 | 4) multiply the gain table by the ratio above |
---|
131 | 5) combine all the gain tables |
---|
132 | |
---|
133 | |
---|
134 | Good luck! |
---|
135 | |
---|
136 | |
---|
137 | |
---|