source: JEM-EUSO/equalization_gain/branches/analclass-Sylvie/HowToEaqualizeGain.txt @ 196

Last change on this file since 196 was 196, checked in by dagoret, 11 years ago

add the developpment branch of the class to avoid pertrubation on the main Plost Scurve function, this is only developpement

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