source: JEM-EUSO/equalization_gain/trunk/README_camille @ 208

Last change on this file since 208 was 208, checked in by moretto, 11 years ago

addition of default gain tables for ASIC C & D needed to create the default gain-org.txt gain table

File size: 5.9 KB
Line 
1**********************************
2*** Equalization gain analysis ***
3**********************************
4
5In 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
71) Source the analysis environment with the MySetup.sh bash script after setting proper path:
8
9% source MySetup.sh
10
112) Go in the /src directory to compile the Makefile
12
13% cd src
14% make
15
163) Create a work directory in the top level directory /analysis:
17
18% cd ..
19% mkdir work
20% cd work
21
224) 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
275) 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
31Two 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
336) 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
407) (Hiroko's README)
41
42Usually, the following command is not necessary as long as the data
43includes pedestal, otherwise:
44% ln -s ../$pedestal_data_directory_D/*.dat .
45
46Check the parameters in header file or directory input the parameter
47in main function as you can see in the source code.
48This totally depends on the data. You have to modify it to suitable
49parameters.
50
51% root -l
52
53Set the parameters on the top of the program depending on your analysis.
54• General policy: parameters starting with "k" at the beginning is
55fixed global parameter and usually set in the header file, never change
56through the program.
57• kDrawCh: channel just you want to check on display. doens't effect
58the analysis.
59• fname, fname_ped (kFname, kFnamePed): "YOUR DATA FILE" without ".data".
60See examples in the header file.
61• dac_half_spe_fix: set DAC value only when you want to adjust the gain
62to particular pulse height (DAC value) instead of either average of the
63pulse height of reference pixel. Usually just leave it -1.
64• fit_min, fit_max (kFitMin, kFitMax): leave them as default,
65it is not currently used for the analysis.
66• fit_min_scurve, fit_max_scurve (kFitMinS, kFitMaxS): define the range
67of s-curve fitting. search proper values by yourself with running root
68program a few times.
69• kBoard: don't forget to change 0(C) or 1(D) depending on which ASIC
70you're analysing
71• kChRef (kRefCh): a pixel whose gain remains 64 thorough the gain
72adjustment.
73
74/!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\
75• checkAve: for the first run, set this parameter 1, and find a pixel
76which remains 64. In the case of parameter 1, all the gains are adjusted
77to the average pulse height.
78Once you choose the reference pixel, set the parameter 0, as well as
79set kRefCh the pixel number. (better to keep in the header file for the
80record of each PMTs.)
81/!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\
82
83Once you set all the parameters above, then
84[].L PlotScurvesAll-diffFit.C
85[]PlotScurve()
86
878) 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
90of s-curve fitting. Search proper values by yourself with running root
91program a few times.
92
93/!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\
94Looking 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
98Once you choose the reference pixel, set the parameter checkAve = 0, as well as
99set kRefCh the pixel number. (better to keep in the header file for the
100record of each PMTs.)
101
102/?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\
103But how should we choose this pixel whose gain will remain 64?
104/?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\
105
106Quit root:
107
108% .q
109
1108bis) You can also run the with root the App PlotScurvesAllMain as follow:
111
112% ../../src/PlotScurvesAllMain
113
114It will also produce the .data file described at step 9). You have to go directly to step 10) then.
115
116However you will have to "make clean" & "make" after changing fitting parameters etc.
117
1189) Now we chose the header parameters we can make the new gain table. Run:
119
120% root -l > tmp.data
121[].L PlotScurvesAll-diffFit.C
122[]PlotScurve()
123[].q
124
125Do the same instructions for an other ASIC (D one for example).
126
12710) 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 :
128
129% cd ../
130% open ../src/makeGainTable.sh
131
132After modification has been done run in the work directory:
133
134% ../src/makeGainTable.sh
135
136
137
138
139
Note: See TracBrowser for help on using the repository browser.