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

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

Initial import of the project

File size: 11.3 KB
Line 
1*************************************************************
2*
3* README file for gain equalisation
4* SDC le 25/09/2013
5*
6**********************************************************
7The Gain Equalisation files are inside the analysis directory.
8
9The analysis directory contains :
10- this Top level README
11- the MySetup.sh file
12
13
141) 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
182) 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
25SRC directory
26===============
27
28Makefile : to check the coding is correct from C++ compiler point of view
29
30PlotScurvesAllMain.cc : The main for the compilation used from now on for the analysis
31PlotScurvesAllMain.h
32
33PlotScurvesAll-diffFit.cc : The only file that does really the gain equalisation inside the PlotScurve function
34PlotScurvesAll-diffFitConst.h : define the constant used by PlotScurve function in the file PlotScurvesAll-diffFit.cc
35PlotScurvesAll-diffFit.h
36
37
38Please do
39
40make
41-----
42to check that PlotScurvesAll-diffFit.cc syntax is correct for the C++ compiler
43
44makeDataFile.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
47makeGainTable.sh : extract the table for the ASIC obtained by the output result of the execution of PlotScurve() inside PlotScurvesAll-diffFit.cc
48
49PlotScurvesAll-diffFit.C ! Old file uncompiled by Hiroko (23/09/2013)
50
51
52
53
54DATA directory
55================
56/Users/dagoret-campagnesylvie/MacOsX/EUSO-BALLOON/GainEqualisation/analysis/data>ls -l
57total 16
5820130923-APC contains S-Curves
5920130924-LAL contains S-Curves
60gain-default-ASIC_C.txt : Default ASIC Gain
61gain-default-ASIC_D.txt
62
63Procedures
64==========
65
66From Hiroko : Monday 23 09 2013
67
68First of all, things are not fully automatick yet as we are still
69looking 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
80make 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
87data directories for the analysis:
88There are many ways to do this, and you can do as you wish.
89Ask Pierre to make the data file which includes DAC values
90and data for ASIC_C and ASIC_D at the beginning as he knows
91what I mean.
92
93If you want, the data obtained by LabView can be used as itself
94with modifying the parameter on my makeDataFile.sh script.
95I leave it for right now because we haven't fixed the data format
96yet, 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
102This sh automatically makes two directories data_s_curves_runXX_C
103and data_s_curves_runXX_D for the data of ASIC_C and ASIC_D respectively.
104
105From next steps, it totally depends on which data you are taking.
106Assume 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
114Usually, the following command is not necessary as long as the data
115includes pedestal, otherwise:
116% ln -s ../$pedestal_data_directory_D/*.dat .
117
118Check the parameters in header file or directory input the parameter
119in main function as you can see in the source code.
120This totally depends on the data. You have to modify it to suitable
121parameters.
122
123% root -l
124
125Set the parameters on the top of the program depending on your analysis.
126• General policy: parameters starting with "k" at the beginning is
127fixed gloval parameter and usually set in the header file, never change
128through the program.
129• kDrawCh: channel just you want to check on display. doens't effect
130the analysis.
131• fname, fname_ped (kFname, kFnamePed): "YOUR DATA FILE" without ".data".
132See examples in the header file.
133• dac_half_spe_fix: set DAC value only when you want to adjust the gain
134to particular pulse height (DAC value) instead of either average of the
135pulse height of reference pixel. Usually just leave it -1.
136• fit_min, fit_max (kFitMin, kFitMax): leave them as default,
137it is not currently used for the analysis.
138• fit_min_scurve, fit_max_scurve (kFitMinS, kFitMaxS): define the range
139of s-curve fitting. search proper values by yourself with running root
140program a few times.
141• kBoard: don't forget to change 0(C) or 1(D) depending on which ASIC
142you're analysing
143• kChRef (kRefCh): a pixel whose gain remains 64 thorough the gain
144adjustment.
145• checkAve: for the first run, set this parameter 1, and find a pixel
146which remains 64. In the case of parameter 1, all the gains are adjusted
147to the average pulse height.
148Once you choose the reference pixel, set the parameter 0, as well as
149set kRefCh the pixel number. (better to keep in the header file for the
150record of each PMTs.)
151
152Once you set all the parameters above, then
153[].L PlotScurvesAll-diffFit.C
154[]PlotScurve()
155
156or do in another way according Sylvie's
157from the shell (not inside root), execute directly the binary
158
159$(srcDIR)/PlotScurvesAllMain
160
161
162Repeat until you define all the parameters above.
163----------------------------------------------------------------------------
164
165
166----------------------------------------------------------------------------
167<STEP 4> Make the gain table
168Once 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
174If you have the data of ASIC_D, go to the directory of ASIC_D
175and do the same.
176
177% cd ../
178Check the paramters in $srcDIR/makeGainTable.sh and run
179You should add/remove #s depending on which data you're analysing.
180% sh makeGainTable.sh
181Or type by your hands the commands in the script file.
182
183If everything has been done properly, you should get a gain
184table with a proper format.
185I would recommend that when you make tmp.data file, to include
186the value of threshold used, and the number of iteration, e.g.,
187tmp-th180-it0.data
188And then do the iteration of the analysis with the data with
189the obtained gain table until you get reasonable uniformity.
190
191NOTE that, sometimes PMT gain or efficiency is too low to obtain
192the inflection point, in this case the program outputs the -1 for
193flag_fit. If it remains -1 after some trials, you should adjust
194by hand. Ask Philippe for detailes.
195----------------------------------------------------------------------------
196
197
198----------------------------------------------------------------------------
199<STEP 5> Adjust gain of EC_unit
200Once you succeed to obtain all the gain tables:
2011) check the pulse height (dac_sfit[kChRef]-dac_ped[kChRef])
2022) choose 1 of 4 PMTs in EC_unit
2033) take the ratio of pulse height between reference pixels
2044) multiply the gain table by the ratio above
2055) combine all the gain tables
206----------------------------------------------------------------------------
207
208
209
210Good luck!
211
212
213Logbook
214=======
215
216
217up to run95, the definition of iteration:
218
219T1, T2: board1, board2
220no description: data with ASIC gain 64 everywhere,
221it0: data after the 1st adjustment,
222it1: data after the 2nd adjustment, ...
223it2: data after the 3rd adjustment, ...
224
225should be changed afterward:
226T1, T3: board1, board2
227it0: data with ASIC gain 64 everywhere,
228it1: data after the 1st adjustment,
229it2: data after the 2nd adjustment, ...
230
231
232
233
234
235run60: 2 ch (44,56), 0.562
236run62: 2ch it0 (by hand)
237run63: 64ch it0 (by file, sfit)
238run64: 64ch it1 strange noise default gain
239run65: 384 ch (128ch HVon default gain)
240run66: 64 ch ASIC_D default gain
241run67: sfit it0 th180 100 events
242run68: sfit it0 th180 modified 10000 events ch62:103->92, ch60:109->95
243run69: sfit it1 th240 100 events
244run70: sfit it1 th240 10000 events
245run71: 64 ch ASIC_D default gain
246
247
248run72: ASIC_D gain 64 others 0 100 events, step 10,
249run73: with adjust gain for ASIC_D th240 it1 100 events, step 10
25074: light off, HV ON ped step 2 ASC_C
25175: light off, HV ON ped step 1 ASC_C -> same as 76
? forgot to save
25276: 10000 events                   
253
25478: T2 (board2) ASIC_C default 10000 events
25579: T2 (board2) ASIC_D default 10000 events
256
25780: T2 ASIC_C it0 100 events
25881: T2 ASIC_C it0 10000 events
25982: T2 ASIC_D it0 10000 events
26083: T1 ASIC_C it0 10000 events
26184: T2 ASIC_C it1 100 events
26285: T2 ASIC_C it1 10000 events
26386: T2 ASIC_D it1 10000 events
26487: T2 ASIC_C it1 10000 events
265
26689: T1 ASIC_C it1 100 events
26790: T1 ASIC_C it1 10000 events
26891: T1 ASIC_C it2 10000 events
26992: T1 ASIC_C it2 10000 events, lower luminosity (50%)
27093: T1 ASIC_C it3 (with using 91) 10000 events, lower luminosity (50%)
271
27294: T1 ASIC_C it3 (with using 91) 10000 events, lower luminosity (50%),
273modified the gain of ch39,ch43,ch47 by hand
274aiming threshold at 150
27595: T1 ASIC_C it3 (with using 91) 10000 events, lower luminosity (50%),
276modified the gain of ch39,ch43,ch47 by hand
277with HV of CW corresponding to 900V
278
279
280tmp tables for each PMTs:
281Board  ASIC    dir incl. table_fin, chRef, data\w table_fin, ped, peak, PH, ratio
282T1     ASIC_C: run91, chRef 31, run 94&95, 72.5 232.5, 160, 1.27
283T1     ASIC_D: run68, chRef 31, run70,     74.5 277.5, 203, 1
284T2(T3) ASIC_C: run87, chRef 37, run85&87,  72.5 287.5, 215, 0.94
285T2(T3) ASIC_D: run86, chRef 32, run86,     67.5 252.5, 180, 1.13
286
287
288History
289=======
290
291------------------------------------------------------------------------------
292Up to 23/09/2013 : code developped by Hiroko
293------------------------------------------------------------------------------
29424/09/2013 : Sylvie introduces PlotScurvesAll-diffFit.cc and makes it compilable with the makefile.
295------------------------------------------------------------------------------
29624/09/2013 : From Pierre :
297
298So you have a pptx file which is the summary of the data taken yesterday.
299The 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
303I don't remember if Hiroko uses first or second type of file for her analysis.
304cheers
305pierre
306------------------------------------------------------------------------------
30725/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 
Note: See TracBrowser for help on using the repository browser.