source: JEM-EUSO/equalization_gain/trunk/README @ 197

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

bug due to a comment left corrected

File size: 11.5 KB
Line 
1*************************************************************
2*
3* README file for gain equalisation
4* SDC le 25/09/2013
5*
6**********************************************************
7
8Repository
9===========
10
11to 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
16branches/
17tags/
18trunk/
19
20
21The Gain Equalisation files are inside the analysis directory.
22
23The analysis directory contains :
24- this Top level README
25- the MySetup.sh file
26
27
281) 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
322) 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
39SRC directory
40===============
41
42Makefile : to check the coding is correct from C++ compiler point of view
43
44PlotScurvesAllMain.cc : The main for the compilation used from now on for the analysis
45PlotScurvesAllMain.h
46
47PlotScurvesAll-diffFit.cc : The only file that does really the gain equalisation inside the PlotScurve function
48PlotScurvesAll-diffFitConst.h : define the constant used by PlotScurve function in the file PlotScurvesAll-diffFit.cc
49PlotScurvesAll-diffFit.h
50
51
52Please do
53
54make
55-----
56to check that PlotScurvesAll-diffFit.cc syntax is correct for the C++ compiler
57
58makeDataFile.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
61makeGainTable.sh : extract the table for the ASIC obtained by the output result of the execution of PlotScurve() inside PlotScurvesAll-diffFit.cc
62
63PlotScurvesAll-diffFit.C ! Old file uncompiled by Hiroko (23/09/2013)
64
65
66
67
68DATA directory
69================
70/Users/dagoret-campagnesylvie/MacOsX/EUSO-BALLOON/GainEqualisation/analysis/data>ls -l
71total 16
7220130923-APC contains S-Curves
7320130924-LAL contains S-Curves
74gain-default-ASIC_C.txt : Default ASIC Gain
75gain-default-ASIC_D.txt
76
77Procedures
78==========
79
80From Hiroko : Monday 23 09 2013
81
82First of all, things are not fully automatick yet as we are still
83looking 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
94make 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
101data directories for the analysis:
102There are many ways to do this, and you can do as you wish.
103Ask Pierre to make the data file which includes DAC values
104and data for ASIC_C and ASIC_D at the beginning as he knows
105what I mean.
106
107If you want, the data obtained by LabView can be used as itself
108with modifying the parameter on my makeDataFile.sh script.
109I leave it for right now because we haven't fixed the data format
110yet, 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
116This sh automatically makes two directories data_s_curves_runXX_C
117and data_s_curves_runXX_D for the data of ASIC_C and ASIC_D respectively.
118
119From next steps, it totally depends on which data you are taking.
120Assume 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
128Usually, the following command is not necessary as long as the data
129includes pedestal, otherwise:
130% ln -s ../$pedestal_data_directory_D/*.dat .
131
132Check the parameters in header file or directory input the parameter
133in main function as you can see in the source code.
134This totally depends on the data. You have to modify it to suitable
135parameters.
136
137% root -l
138
139Set the parameters on the top of the program depending on your analysis.
140• General policy: parameters starting with "k" at the beginning is
141fixed gloval parameter and usually set in the header file, never change
142through the program.
143• kDrawCh: channel just you want to check on display. doens't effect
144the analysis.
145• fname, fname_ped (kFname, kFnamePed): "YOUR DATA FILE" without ".data".
146See examples in the header file.
147• dac_half_spe_fix: set DAC value only when you want to adjust the gain
148to particular pulse height (DAC value) instead of either average of the
149pulse height of reference pixel. Usually just leave it -1.
150• fit_min, fit_max (kFitMin, kFitMax): leave them as default,
151it is not currently used for the analysis.
152• fit_min_scurve, fit_max_scurve (kFitMinS, kFitMaxS): define the range
153of s-curve fitting. search proper values by yourself with running root
154program a few times.
155• kBoard: don't forget to change 0(C) or 1(D) depending on which ASIC
156you're analysing
157• kChRef (kRefCh): a pixel whose gain remains 64 thorough the gain
158adjustment.
159• checkAve: for the first run, set this parameter 1, and find a pixel
160which remains 64. In the case of parameter 1, all the gains are adjusted
161to the average pulse height.
162Once you choose the reference pixel, set the parameter 0, as well as
163set kRefCh the pixel number. (better to keep in the header file for the
164record of each PMTs.)
165
166Once you set all the parameters above, then
167[].L PlotScurvesAll-diffFit.C
168[]PlotScurve()
169
170or do in another way according Sylvie's
171from the shell (not inside root), execute directly the binary
172
173$(srcDIR)/PlotScurvesAllMain
174
175
176Repeat until you define all the parameters above.
177----------------------------------------------------------------------------
178
179
180----------------------------------------------------------------------------
181<STEP 4> Make the gain table
182Once 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
188If you have the data of ASIC_D, go to the directory of ASIC_D
189and do the same.
190
191% cd ../
192Check the paramters in $srcDIR/makeGainTable.sh and run
193You should add/remove #s depending on which data you're analysing.
194% sh makeGainTable.sh
195Or type by your hands the commands in the script file.
196
197If everything has been done properly, you should get a gain
198table with a proper format.
199I would recommend that when you make tmp.data file, to include
200the value of threshold used, and the number of iteration, e.g.,
201tmp-th180-it0.data
202And then do the iteration of the analysis with the data with
203the obtained gain table until you get reasonable uniformity.
204
205NOTE that, sometimes PMT gain or efficiency is too low to obtain
206the inflection point, in this case the program outputs the -1 for
207flag_fit. If it remains -1 after some trials, you should adjust
208by hand. Ask Philippe for detailes.
209----------------------------------------------------------------------------
210
211
212----------------------------------------------------------------------------
213<STEP 5> Adjust gain of EC_unit
214Once you succeed to obtain all the gain tables:
2151) check the pulse height (dac_sfit[kChRef]-dac_ped[kChRef])
2162) choose 1 of 4 PMTs in EC_unit
2173) take the ratio of pulse height between reference pixels
2184) multiply the gain table by the ratio above
2195) combine all the gain tables
220----------------------------------------------------------------------------
221
222
223
224Good luck!
225
226
227Logbook
228=======
229
230
231up to run95, the definition of iteration:
232
233T1, T2: board1, board2
234no description: data with ASIC gain 64 everywhere,
235it0: data after the 1st adjustment,
236it1: data after the 2nd adjustment, ...
237it2: data after the 3rd adjustment, ...
238
239should be changed afterward:
240T1, T3: board1, board2
241it0: data with ASIC gain 64 everywhere,
242it1: data after the 1st adjustment,
243it2: data after the 2nd adjustment, ...
244
245
246
247
248
249run60: 2 ch (44,56), 0.562
250run62: 2ch it0 (by hand)
251run63: 64ch it0 (by file, sfit)
252run64: 64ch it1 strange noise default gain
253run65: 384 ch (128ch HVon default gain)
254run66: 64 ch ASIC_D default gain
255run67: sfit it0 th180 100 events
256run68: sfit it0 th180 modified 10000 events ch62:103->92, ch60:109->95
257run69: sfit it1 th240 100 events
258run70: sfit it1 th240 10000 events
259run71: 64 ch ASIC_D default gain
260
261
262run72: ASIC_D gain 64 others 0 100 events, step 10,
263run73: with adjust gain for ASIC_D th240 it1 100 events, step 10
26474: light off, HV ON ped step 2 ASC_C
26575: light off, HV ON ped step 1 ASC_C -> same as 76
? forgot to save
26676: 10000 events                   
267
26878: T2 (board2) ASIC_C default 10000 events
26979: T2 (board2) ASIC_D default 10000 events
270
27180: T2 ASIC_C it0 100 events
27281: T2 ASIC_C it0 10000 events
27382: T2 ASIC_D it0 10000 events
27483: T1 ASIC_C it0 10000 events
27584: T2 ASIC_C it1 100 events
27685: T2 ASIC_C it1 10000 events
27786: T2 ASIC_D it1 10000 events
27887: T2 ASIC_C it1 10000 events
279
28089: T1 ASIC_C it1 100 events
28190: T1 ASIC_C it1 10000 events
28291: T1 ASIC_C it2 10000 events
28392: T1 ASIC_C it2 10000 events, lower luminosity (50%)
28493: T1 ASIC_C it3 (with using 91) 10000 events, lower luminosity (50%)
285
28694: T1 ASIC_C it3 (with using 91) 10000 events, lower luminosity (50%),
287modified the gain of ch39,ch43,ch47 by hand
288aiming threshold at 150
28995: T1 ASIC_C it3 (with using 91) 10000 events, lower luminosity (50%),
290modified the gain of ch39,ch43,ch47 by hand
291with HV of CW corresponding to 900V
292
293
294tmp tables for each PMTs:
295Board  ASIC    dir incl. table_fin, chRef, data\w table_fin, ped, peak, PH, ratio
296T1     ASIC_C: run91, chRef 31, run 94&95, 72.5 232.5, 160, 1.27
297T1     ASIC_D: run68, chRef 31, run70,     74.5 277.5, 203, 1
298T2(T3) ASIC_C: run87, chRef 37, run85&87,  72.5 287.5, 215, 0.94
299T2(T3) ASIC_D: run86, chRef 32, run86,     67.5 252.5, 180, 1.13
300
301
302History
303=======
304
305------------------------------------------------------------------------------
306Up to 23/09/2013 : code developped by Hiroko
307------------------------------------------------------------------------------
30824/09/2013 : Sylvie introduces PlotScurvesAll-diffFit.cc and makes it compilable with the makefile.
309------------------------------------------------------------------------------
31024/09/2013 : From Pierre :
311
312So you have a pptx file which is the summary of the data taken yesterday.
313The 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
317I don't remember if Hiroko uses first or second type of file for her analysis.
318cheers
319pierre
320------------------------------------------------------------------------------
32125/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 
Note: See TracBrowser for help on using the repository browser.