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