1 | ********************************** |
---|
2 | *** Equalization gain analysis *** |
---|
3 | ********************************** |
---|
4 | |
---|
5 | In the /analysis directory where this README is placed, follow instruction to proceed the equalization gain algorithm from H. Miyamoto (see HowToEaqualizeGain.txt for the original README): |
---|
6 | |
---|
7 | 1) Source the analysis environment with the MySetup.sh bash script after setting proper path: |
---|
8 | |
---|
9 | % source MySetup.sh |
---|
10 | |
---|
11 | 2) Go in the /src directory to compile the Makefile |
---|
12 | |
---|
13 | % cd src |
---|
14 | % make |
---|
15 | |
---|
16 | 3) Create a work directory in the top level directory /analysis: |
---|
17 | |
---|
18 | % cd .. |
---|
19 | % mkdir work |
---|
20 | % cd work |
---|
21 | |
---|
22 | 4) Put in this new /work directory one or more data file created by P. Barillon with the name format data_s_curves_runXX.data with XX the number of the run. For example some files are by default in the directory /data/20130924-LAL |
---|
23 | |
---|
24 | % cp ../data/20130924-LAL/data_s_curves_run104.data . |
---|
25 | % cp ../data/20130924-LAL/data_s_curves_run105.data . |
---|
26 | |
---|
27 | 5) In the /work directory run the makeDataFile.sh script and put the name of the data file you want to process (without the .data extension): |
---|
28 | |
---|
29 | % ../src/makeDataFile.sh data_s_curves_runXX |
---|
30 | |
---|
31 | Two directories data_s_curves_runXX_C and data_s_curves_runXX_D have been created. In the following we work with the data_s_curves_runXX_C one. They correspond each to an ASIC. Verify that everything as well processed by looking a data_s_curves_runXX_C/data_s_curves_runXX-chYY.dat file (with YY the number of the channel of a PMT/ASIC). Values for the different DAC should not be equal to 0. |
---|
32 | |
---|
33 | 6) If you want to attribute a gain table different than the default one (64 per default for 64 channels in the data_s_curves_run104_C/gain-org.txt), link this gain-org.txt with the choosen table put in the work directory (respect the original format of the gain-org.txt i.e. 64 channels at the good place): |
---|
34 | |
---|
35 | % cp PATH_YOUR_GAIN_TABLE/YOUR_GAIN_TABLE.txt . |
---|
36 | % cd data_s_curves_runXX_C |
---|
37 | % rm gain-org.txt |
---|
38 | % ln -s ../YOUR_GAIN_TABLE.txt gain-org.txt |
---|
39 | |
---|
40 | 7) (Hiroko's README) |
---|
41 | |
---|
42 | Usually, the following command is not necessary as long as the data |
---|
43 | includes pedestal, otherwise: |
---|
44 | % ln -s ../$pedestal_data_directory_D/*.dat . |
---|
45 | |
---|
46 | Check the parameters in header file or directory input the parameter |
---|
47 | in main function as you can see in the source code. |
---|
48 | This totally depends on the data. You have to modify it to suitable |
---|
49 | parameters. |
---|
50 | |
---|
51 | % root -l |
---|
52 | |
---|
53 | Set the parameters on the top of the program depending on your analysis. |
---|
54 | ⢠General policy: parameters starting with "k" at the beginning is |
---|
55 | fixed global parameter and usually set in the header file, never change |
---|
56 | through the program. |
---|
57 | ⢠kDrawCh: channel just you want to check on display. doens't effect |
---|
58 | the analysis. |
---|
59 | ⢠fname, fname_ped (kFname, kFnamePed): "YOUR DATA FILE" without ".data". |
---|
60 | See examples in the header file. |
---|
61 | ⢠dac_half_spe_fix: set DAC value only when you want to adjust the gain |
---|
62 | to particular pulse height (DAC value) instead of either average of the |
---|
63 | pulse height of reference pixel. Usually just leave it -1. |
---|
64 | ⢠fit_min, fit_max (kFitMin, kFitMax): leave them as default, |
---|
65 | it is not currently used for the analysis. |
---|
66 | ⢠fit_min_scurve, fit_max_scurve (kFitMinS, kFitMaxS): define the range |
---|
67 | of s-curve fitting. search proper values by yourself with running root |
---|
68 | program a few times. |
---|
69 | ⢠kBoard: don't forget to change 0(C) or 1(D) depending on which ASIC |
---|
70 | you're analysing |
---|
71 | ⢠kChRef (kRefCh): a pixel whose gain remains 64 thorough the gain |
---|
72 | adjustment. |
---|
73 | |
---|
74 | /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ |
---|
75 | ⢠checkAve: for the first run, set this parameter 1, and find a pixel |
---|
76 | which remains 64. In the case of parameter 1, all the gains are adjusted |
---|
77 | to the average pulse height. |
---|
78 | Once you choose the reference pixel, set the parameter 0, as well as |
---|
79 | set kRefCh the pixel number. (better to keep in the header file for the |
---|
80 | record of each PMTs.) |
---|
81 | /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ |
---|
82 | |
---|
83 | Once you set all the parameters above, then |
---|
84 | [].L PlotScurvesAll-diffFit.C |
---|
85 | []PlotScurve() |
---|
86 | |
---|
87 | 8) Repeat until you define all the parameters above. The parameters you could have to tune are: |
---|
88 | |
---|
89 | ⢠fit_min_scurve, fit_max_scurve (kFitMinS, kFitMaxS): define the range |
---|
90 | of s-curve fitting. Search proper values by yourself with running root |
---|
91 | program a few times. |
---|
92 | |
---|
93 | /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ |
---|
94 | Looking at the Hist_diff you can see on some histograms that no maximum has been found despite you tuned previous parameters as you can. To correct this, you can implement by hardcoding in the PlotScurvesAll-diffFit.cc at line ~393 the parameter fit_min_scurve for the corresponding channel. But remember that ASIC C starts at channel 128 and D at 192. |
---|
95 | /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ |
---|
96 | |
---|
97 | |
---|
98 | Once you choose the reference pixel, set the parameter checkAve = 0, as well as |
---|
99 | set kRefCh the pixel number. (better to keep in the header file for the |
---|
100 | record of each PMTs.) |
---|
101 | |
---|
102 | /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ |
---|
103 | But how should we choose this pixel whose gain will remain 64? |
---|
104 | /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ |
---|
105 | |
---|
106 | Quit root: |
---|
107 | |
---|
108 | % .q |
---|
109 | |
---|
110 | 9) Now we chose the header parameters we can make the new gain table. Run: |
---|
111 | |
---|
112 | % root -l > tmp.data |
---|
113 | [].L PlotScurvesAll-diffFit.C |
---|
114 | []PlotScurve() |
---|
115 | [].q |
---|
116 | |
---|
117 | Do the same instructions for an other ASIC (D one for example). |
---|
118 | |
---|
119 | Go back in the previous folder to run the makeGainTable.sh bash script. But first, modify parameters of it as name of file and created .txt. You also have to make modification depending on whether you use type C or D ASICs : |
---|
120 | |
---|
121 | % cd ../ |
---|
122 | % open ../src/makeGainTable.sh |
---|
123 | |
---|
124 | After modification has been done run in the work directory: |
---|
125 | |
---|
126 | % ../src/makeGainTable.sh |
---|
127 | |
---|
128 | |
---|
129 | |
---|
130 | |
---|
131 | |
---|