1 | ************************************************************* |
---|
2 | * |
---|
3 | * README file for gain equalisation |
---|
4 | * SDC le 25/09/2013 |
---|
5 | * |
---|
6 | ********************************************************** |
---|
7 | The Gain Equalisation files are inside the analysis directory. |
---|
8 | |
---|
9 | The analysis directory contains : |
---|
10 | - this Top level README |
---|
11 | - the MySetup.sh file |
---|
12 | |
---|
13 | |
---|
14 | 1) configure the MySetUp file to define the proper environnement variables |
---|
15 | - srcDIR : repository which contains the analysis code and the scripts files |
---|
16 | - dataDIR : contains the data |
---|
17 | |
---|
18 | 2) the analysis directory further contains 3 subdirectories |
---|
19 | - the src directory that contains the sources |
---|
20 | - the data directory that contains the data to analyses |
---|
21 | - the work directory (or any other name) that should be created for the analysis |
---|
22 | |
---|
23 | |
---|
24 | |
---|
25 | SRC directory |
---|
26 | =============== |
---|
27 | |
---|
28 | Makefile : to check the coding is correct from C++ compiler point of view |
---|
29 | |
---|
30 | PlotScurvesAllMain.cc : The main for the compilation used from now on for the analysis |
---|
31 | PlotScurvesAllMain.h |
---|
32 | |
---|
33 | PlotScurvesAll-diffFit.cc : The only file that does really the gain equalisation inside the PlotScurve function |
---|
34 | PlotScurvesAll-diffFitConst.h : define the constant used by PlotScurve function in the file PlotScurvesAll-diffFit.cc |
---|
35 | PlotScurvesAll-diffFit.h |
---|
36 | |
---|
37 | |
---|
38 | Please do |
---|
39 | |
---|
40 | make |
---|
41 | ----- |
---|
42 | to check that PlotScurvesAll-diffFit.cc syntax is correct for the C++ compiler |
---|
43 | |
---|
44 | makeDataFile.sh : Extract the data from the EC-ASIC board read by the Test-EC-ASIC into one file of data per ASIC channel |
---|
45 | Create directories, one per ASIC. |
---|
46 | Link *.h and *.cc files locally for analysis |
---|
47 | makeGainTable.sh : extract the table for the ASIC obtained by the output result of the execution of PlotScurve() inside PlotScurvesAll-diffFit.cc |
---|
48 | |
---|
49 | PlotScurvesAll-diffFit.C ! Old file uncompiled by Hiroko (23/09/2013) |
---|
50 | |
---|
51 | |
---|
52 | |
---|
53 | |
---|
54 | DATA directory |
---|
55 | ================ |
---|
56 | /Users/dagoret-campagnesylvie/MacOsX/EUSO-BALLOON/GainEqualisation/analysis/data>ls -l |
---|
57 | total 16 |
---|
58 | 20130923-APC contains S-Curves |
---|
59 | 20130924-LAL contains S-Curves |
---|
60 | gain-default-ASIC_C.txt : Default ASIC Gain |
---|
61 | gain-default-ASIC_D.txt |
---|
62 | |
---|
63 | Procedures |
---|
64 | ========== |
---|
65 | |
---|
66 | From Hiroko : Monday 23 09 2013 |
---|
67 | |
---|
68 | First of all, things are not fully automatick yet as we are still |
---|
69 | looking for the best way to carry it out. |
---|
70 | |
---|
71 | |
---|
72 | ---------------------------------------------------------------------------- |
---|
73 | <STEP 1> Organize your directories (I prefer to use bash.sh instead of csh,tcsh): |
---|
74 | % mkdir YOUR_DIR/analysis |
---|
75 | % mkdir YOUR_DIR/analysis/src |
---|
76 | % mkdir YOUR_DIR/analysis/data |
---|
77 | % export YOUR_DIR/analysis/src srcDIR |
---|
78 | % export YOUR_DIR/analysis/data dataDIR |
---|
79 | |
---|
80 | make your data directory for the day. e.g.,: |
---|
81 | % mkdir $dataDIR/yYYmMMdDD-APC |
---|
82 | % cd yYYmMMdDD-APC |
---|
83 | ---------------------------------------------------------------------------- |
---|
84 | |
---|
85 | ---------------------------------------------------------------------------- |
---|
86 | <STEP 2> Modify data file obtained by LabView to fit and make |
---|
87 | data directories for the analysis: |
---|
88 | There are many ways to do this, and you can do as you wish. |
---|
89 | Ask Pierre to make the data file which includes DAC values |
---|
90 | and data for ASIC_C and ASIC_D at the beginning as he knows |
---|
91 | what I mean. |
---|
92 | |
---|
93 | If you want, the data obtained by LabView can be used as itself |
---|
94 | with modifying the parameter on my makeDataFile.sh script. |
---|
95 | I leave it for right now because we haven't fixed the data format |
---|
96 | yet, at least by the last time I was there. |
---|
97 | |
---|
98 | |
---|
99 | % cp -p data_s_curves_runXX.data . |
---|
100 | % sh $srcDIR/makeDataFile.sh data_s_curves_runXX |
---|
101 | |
---|
102 | This sh automatically makes two directories data_s_curves_runXX_C |
---|
103 | and data_s_curves_runXX_D for the data of ASIC_C and ASIC_D respectively. |
---|
104 | |
---|
105 | From next steps, it totally depends on which data you are taking. |
---|
106 | Assume you want to analyse the data of ASIC_C. |
---|
107 | ---------------------------------------------------------------------------- |
---|
108 | |
---|
109 | ---------------------------------------------------------------------------- |
---|
110 | <STEP 3> Run ROOT, search the suitable parameters for each data |
---|
111 | % cd data_s_curves_runXX_C |
---|
112 | % ln -s ../FORMER_GAIN_DATA.txt gain-org.txt |
---|
113 | |
---|
114 | Usually, the following command is not necessary as long as the data |
---|
115 | includes pedestal, otherwise: |
---|
116 | % ln -s ../$pedestal_data_directory_D/*.dat . |
---|
117 | |
---|
118 | Check the parameters in header file or directory input the parameter |
---|
119 | in main function as you can see in the source code. |
---|
120 | This totally depends on the data. You have to modify it to suitable |
---|
121 | parameters. |
---|
122 | |
---|
123 | % root -l |
---|
124 | |
---|
125 | Set the parameters on the top of the program depending on your analysis. |
---|
126 | ⢠General policy: parameters starting with "k" at the beginning is |
---|
127 | fixed gloval parameter and usually set in the header file, never change |
---|
128 | through the program. |
---|
129 | ⢠kDrawCh: channel just you want to check on display. doens't effect |
---|
130 | the analysis. |
---|
131 | ⢠fname, fname_ped (kFname, kFnamePed): "YOUR DATA FILE" without ".data". |
---|
132 | See examples in the header file. |
---|
133 | ⢠dac_half_spe_fix: set DAC value only when you want to adjust the gain |
---|
134 | to particular pulse height (DAC value) instead of either average of the |
---|
135 | pulse height of reference pixel. Usually just leave it -1. |
---|
136 | ⢠fit_min, fit_max (kFitMin, kFitMax): leave them as default, |
---|
137 | it is not currently used for the analysis. |
---|
138 | ⢠fit_min_scurve, fit_max_scurve (kFitMinS, kFitMaxS): define the range |
---|
139 | of s-curve fitting. search proper values by yourself with running root |
---|
140 | program a few times. |
---|
141 | ⢠kBoard: don't forget to change 0(C) or 1(D) depending on which ASIC |
---|
142 | you're analysing |
---|
143 | ⢠kChRef (kRefCh): a pixel whose gain remains 64 thorough the gain |
---|
144 | adjustment. |
---|
145 | ⢠checkAve: for the first run, set this parameter 1, and find a pixel |
---|
146 | which remains 64. In the case of parameter 1, all the gains are adjusted |
---|
147 | to the average pulse height. |
---|
148 | Once you choose the reference pixel, set the parameter 0, as well as |
---|
149 | set kRefCh the pixel number. (better to keep in the header file for the |
---|
150 | record of each PMTs.) |
---|
151 | |
---|
152 | Once you set all the parameters above, then |
---|
153 | [].L PlotScurvesAll-diffFit.C |
---|
154 | []PlotScurve() |
---|
155 | |
---|
156 | or do in another way according Sylvie's |
---|
157 | from the shell (not inside root), execute directly the binary |
---|
158 | |
---|
159 | $(srcDIR)/PlotScurvesAllMain |
---|
160 | |
---|
161 | |
---|
162 | Repeat until you define all the parameters above. |
---|
163 | ---------------------------------------------------------------------------- |
---|
164 | |
---|
165 | |
---|
166 | ---------------------------------------------------------------------------- |
---|
167 | <STEP 4> Make the gain table |
---|
168 | Once you decide the parameters and modify the header file, then run |
---|
169 | % root -l > tmp.data |
---|
170 | [].L PlotScurvesAll-diffFit.C |
---|
171 | []PlotScurve() |
---|
172 | [].q |
---|
173 | |
---|
174 | If you have the data of ASIC_D, go to the directory of ASIC_D |
---|
175 | and do the same. |
---|
176 | |
---|
177 | % cd ../ |
---|
178 | Check the paramters in $srcDIR/makeGainTable.sh and run |
---|
179 | You should add/remove #s depending on which data you're analysing. |
---|
180 | % sh makeGainTable.sh |
---|
181 | Or type by your hands the commands in the script file. |
---|
182 | |
---|
183 | If everything has been done properly, you should get a gain |
---|
184 | table with a proper format. |
---|
185 | I would recommend that when you make tmp.data file, to include |
---|
186 | the value of threshold used, and the number of iteration, e.g., |
---|
187 | tmp-th180-it0.data |
---|
188 | And then do the iteration of the analysis with the data with |
---|
189 | the obtained gain table until you get reasonable uniformity. |
---|
190 | |
---|
191 | NOTE that, sometimes PMT gain or efficiency is too low to obtain |
---|
192 | the inflection point, in this case the program outputs the -1 for |
---|
193 | flag_fit. If it remains -1 after some trials, you should adjust |
---|
194 | by hand. Ask Philippe for detailes. |
---|
195 | ---------------------------------------------------------------------------- |
---|
196 | |
---|
197 | |
---|
198 | ---------------------------------------------------------------------------- |
---|
199 | <STEP 5> Adjust gain of EC_unit |
---|
200 | Once you succeed to obtain all the gain tables: |
---|
201 | 1) check the pulse height (dac_sfit[kChRef]-dac_ped[kChRef]) |
---|
202 | 2) choose 1 of 4 PMTs in EC_unit |
---|
203 | 3) take the ratio of pulse height between reference pixels |
---|
204 | 4) multiply the gain table by the ratio above |
---|
205 | 5) combine all the gain tables |
---|
206 | ---------------------------------------------------------------------------- |
---|
207 | |
---|
208 | |
---|
209 | |
---|
210 | Good luck! |
---|
211 | |
---|
212 | |
---|
213 | Logbook |
---|
214 | ======= |
---|
215 | |
---|
216 | |
---|
217 | up to run95, the definition of iteration: |
---|
218 | |
---|
219 | T1, T2: board1, board2 |
---|
220 | no description: data with ASIC gain 64 everywhere, |
---|
221 | it0: data after the 1st adjustment, |
---|
222 | it1: data after the 2nd adjustment, ... |
---|
223 | it2: data after the 3rd adjustment, ... |
---|
224 | |
---|
225 | should be changed afterward: |
---|
226 | T1, T3: board1, board2 |
---|
227 | it0: data with ASIC gain 64 everywhere, |
---|
228 | it1: data after the 1st adjustment, |
---|
229 | it2: data after the 2nd adjustment, ... |
---|
230 | |
---|
231 | |
---|
232 | |
---|
233 | |
---|
234 | |
---|
235 | run60: 2 ch (44,56), 0.562 |
---|
236 | run62: 2ch it0 (by hand) |
---|
237 | run63: 64ch it0 (by file, sfit) |
---|
238 | run64: 64ch it1 strange noise default gain |
---|
239 | run65: 384 ch (128ch HVon default gain) |
---|
240 | run66: 64 ch ASIC_D default gain |
---|
241 | run67: sfit it0 th180 100 events |
---|
242 | run68: sfit it0 th180 modified 10000 events ch62:103->92, ch60:109->95 |
---|
243 | run69: sfit it1 th240 100 events |
---|
244 | run70: sfit it1 th240 10000 events |
---|
245 | run71: 64 ch ASIC_D default gain |
---|
246 | |
---|
247 | |
---|
248 | run72: ASIC_D gain 64 others 0 100 events, step 10, |
---|
249 | run73: with adjust gain for ASIC_D th240 it1 100 events, step 10 |
---|
250 | 74: light off, HV ON ped step 2 ASC_C |
---|
251 | 75: light off, HV ON ped step 1 ASC_C -> same as 76� forgot to save |
---|
252 | 76: 10000 events |
---|
253 | |
---|
254 | 78: T2 (board2) ASIC_C default 10000 events |
---|
255 | 79: T2 (board2) ASIC_D default 10000 events |
---|
256 | |
---|
257 | 80: T2 ASIC_C it0 100 events |
---|
258 | 81: T2 ASIC_C it0 10000 events |
---|
259 | 82: T2 ASIC_D it0 10000 events |
---|
260 | 83: T1 ASIC_C it0 10000 events |
---|
261 | 84: T2 ASIC_C it1 100 events |
---|
262 | 85: T2 ASIC_C it1 10000 events |
---|
263 | 86: T2 ASIC_D it1 10000 events |
---|
264 | 87: T2 ASIC_C it1 10000 events |
---|
265 | |
---|
266 | 89: T1 ASIC_C it1 100 events |
---|
267 | 90: T1 ASIC_C it1 10000 events |
---|
268 | 91: T1 ASIC_C it2 10000 events |
---|
269 | 92: T1 ASIC_C it2 10000 events, lower luminosity (50%) |
---|
270 | 93: T1 ASIC_C it3 (with using 91) 10000 events, lower luminosity (50%) |
---|
271 | |
---|
272 | 94: T1 ASIC_C it3 (with using 91) 10000 events, lower luminosity (50%), |
---|
273 | modified the gain of ch39,ch43,ch47 by hand |
---|
274 | aiming threshold at 150 |
---|
275 | 95: T1 ASIC_C it3 (with using 91) 10000 events, lower luminosity (50%), |
---|
276 | modified the gain of ch39,ch43,ch47 by hand |
---|
277 | with HV of CW corresponding to 900V |
---|
278 | |
---|
279 | |
---|
280 | tmp tables for each PMTs: |
---|
281 | Board ASIC dir incl. table_fin, chRef, data\w table_fin, ped, peak, PH, ratio |
---|
282 | T1 ASIC_C: run91, chRef 31, run 94&95, 72.5 232.5, 160, 1.27 |
---|
283 | T1 ASIC_D: run68, chRef 31, run70, 74.5 277.5, 203, 1 |
---|
284 | T2(T3) ASIC_C: run87, chRef 37, run85&87, 72.5 287.5, 215, 0.94 |
---|
285 | T2(T3) ASIC_D: run86, chRef 32, run86, 67.5 252.5, 180, 1.13 |
---|
286 | |
---|
287 | |
---|
288 | History |
---|
289 | ======= |
---|
290 | |
---|
291 | ------------------------------------------------------------------------------ |
---|
292 | Up to 23/09/2013 : code developped by Hiroko |
---|
293 | ------------------------------------------------------------------------------ |
---|
294 | 24/09/2013 : Sylvie introduces PlotScurvesAll-diffFit.cc and makes it compilable with the makefile. |
---|
295 | ------------------------------------------------------------------------------ |
---|
296 | 24/09/2013 : From Pierre : |
---|
297 | |
---|
298 | So you have a pptx file which is the summary of the data taken yesterday. |
---|
299 | The you have two types of data file: |
---|
300 | - s_curves_runXXX.data (where XXX is the run number) : this is the raw data with the first column being the DAC value et then you have 384 columns corresponding to the 64 channels of ASIC A, B, C, D, E and F |
---|
301 | - data_s_curves_runXXX.data (where XXX is the run number) : this is the data from the two used ASICs (C and D). 1st column is still the the DAC values, then 128 columns corresponding to the 64 channels of ASICs C and D |
---|
302 | |
---|
303 | I don't remember if Hiroko uses first or second type of file for her analysis. |
---|
304 | cheers |
---|
305 | pierre |
---|
306 | ------------------------------------------------------------------------------ |
---|
307 | 25/09/2013 : Improve a little bit PlotScurvesAll-diffFit.cc with welcome comments inside the code. |
---|
308 | add the PlotScurvesAll-diffFitConst.h |
---|
309 | Put Canvas name and title to understand better what is seen on screen |
---|
310 | ------------------------------------------------------------------------------ |
---|
311 | |
---|
312 | |
---|