********************************** *** Equalization gain analysis *** ********************************** In 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): 1) Source the analysis environment with the MySetup.sh bash script after setting proper path: % source MySetup.sh 2) Go in the /src directory to compile the Makefile % cd src % make 3) Create a work directory in the top level directory /analysis: % cd .. % mkdir work % cd work 4) 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 % cp ../data/20130924-LAL/data_s_curves_run104.data . % cp ../data/20130924-LAL/data_s_curves_run105.data . 5) 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): % ../src/makeDataFile.sh data_s_curves_runXX Two 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. 6) 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): % cp PATH_YOUR_GAIN_TABLE/YOUR_GAIN_TABLE.txt . % cd data_s_curves_runXX_C % rm gain-org.txt % ln -s ../YOUR_GAIN_TABLE.txt gain-org.txt 7) (Hiroko's README) Usually, the following command is not necessary as long as the data includes pedestal, otherwise: % ln -s ../$pedestal_data_directory_D/*.dat . Check the parameters in header file or directory input the parameter in main function as you can see in the source code. This totally depends on the data. You have to modify it to suitable parameters. % root -l Set the parameters on the top of the program depending on your analysis. • General policy: parameters starting with "k" at the beginning is fixed global parameter and usually set in the header file, never change through the program. • kDrawCh: channel just you want to check on display. doens't effect the analysis. • fname, fname_ped (kFname, kFnamePed): "YOUR DATA FILE" without ".data". See examples in the header file. • dac_half_spe_fix: set DAC value only when you want to adjust the gain to particular pulse height (DAC value) instead of either average of the pulse height of reference pixel. Usually just leave it -1. • fit_min, fit_max (kFitMin, kFitMax): leave them as default, it is not currently used for the analysis. • fit_min_scurve, fit_max_scurve (kFitMinS, kFitMaxS): define the range of s-curve fitting. search proper values by yourself with running root program a few times. • kBoard: don't forget to change 0(C) or 1(D) depending on which ASIC you're analysing • kChRef (kRefCh): a pixel whose gain remains 64 thorough the gain adjustment. /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ • checkAve: for the first run, set this parameter 1, and find a pixel which remains 64. In the case of parameter 1, all the gains are adjusted to the average pulse height. Once you choose the reference pixel, set the parameter 0, as well as set kRefCh the pixel number. (better to keep in the header file for the record of each PMTs.) /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ Once you set all the parameters above, then [].L PlotScurvesAll-diffFit.C []PlotScurve() 8) Repeat until you define all the parameters above. The parameters you could have to tune are: • fit_min_scurve, fit_max_scurve (kFitMinS, kFitMaxS): define the range of s-curve fitting. Search proper values by yourself with running root program a few times. /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ Looking 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. /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ Once you choose the reference pixel, set the parameter checkAve = 0, as well as set kRefCh the pixel number. (better to keep in the header file for the record of each PMTs.) /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ But how should we choose this pixel whose gain will remain 64? /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ /?\ Quit root: % .q 8bis) You can also run the with root the App PlotScurvesAllMain as follow: % ../../src/PlotScurvesAllMain It will also produce the .data file described at step 9). You have to go directly to step 10) then. However you will have to "make clean" & "make" after changing fitting parameters etc. 9) Now we chose the header parameters we can make the new gain table. Run: % root -l > tmp.data [].L PlotScurvesAll-diffFit.C []PlotScurve() [].q Do the same instructions for an other ASIC (D one for example). 10) 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 : % cd ../ % open ../src/makeGainTable.sh After modification has been done run in the work directory: % ../src/makeGainTable.sh