BCAL Gain Calibration
This procedure uses pi0 events from beam data to improve the energy resolution in the BCAL by using a pi0 width minimization routine. We adopted a procedure that was used to calibrate the planar calorimeter in RADPHI, details at http://gryphn.phys.uconn.edu/radphi/nim-2-2004/NIM-5-2006/pubcopy.pdf. The BCAL gain calibration procedure and how to run the code is explained at https://halldweb.jlab.org/DocDB/0029/002901/003/bcal_calib.pdf.
- We run the plugin /sim-recon/src/plugins/Calibration/BCAL_gainmatrix/ using the hd_root command to produce a root file that contains a channel x channel matrix expressed as a histogram that will be used for the calibration, 3 column vectors expressed as histograms that will be used for calibration, the number of photon shower hits plotted vs channel number that are used in the calibration to keep track of our total statistics, and a root tree that is used to plot the 2 gamma invariant mass.
- We use a script called /work/halld/home/wmcginle/Gain_Calib/MakeEigenSystem/ to decompose the channel x channel matrix into its eigenvalues and eigenvectors and output these as histograms in a rootfile called C_Eigenstystem.root by default.
- Then we use the script, /work/halld/home/wmcginle/Gain_Calib/CalcGainFactors/, to compute our new gain factors and output a root and text file (GainFactorIter1.root and GainFactorIter1.txt by default). The gain factors in the text file are multiplied into our previous gain factors which are then added to the ccdb table /BCAL/ADC_gains in a local sqlite file.
- Once we have our new gain factors we repeat the process by running the BCAL_gainmatrix plugin with the new gain factors in the ccdb file and keep iterating through until the change in gain factors converges to 1.