Step1 |
Connects to the database and extracts calibration constants and calculates desired values of
PMT/PIN ratios for each channel. In the case of suspicious gains it sets desired value to
supermodule average. If something is changed in the database
access procedure this file must be modified. Related file - map.root. |
Step2 | This macro sets the prdf file name. Prdf file should be taken with LED trigger enabled only. Preferably without eventbuilder. |
Step3 |
Analyses prdf file and calculates average PMT/PIN values for each channel for given HV settings.
If the run was taken with eventbuilder you should edit main.cc and enable trigger check. Related files - Makefile, PbGlUtil.h, PbGlUtil.cc, Step3_GetPMTPINRatio.cc |
Step4 | Reads HV values from HIVOC. If the IP address for HIVOC machine changed you should update this macro. Actually this step is not necessary. So if you are going to improve the procedure you are welcome. |
Step5 |
Recalculates HV using simple liner approach. At first iteration it sets HV 100V lower
(relative to nominal). Next HV values are calculated using simple formula: hvnew=hv1+k(gainD-gain1)(hv1-hv0)/(gain1-gain0) where gainD is desired gain, gaini are gains obtained in previous iterations with voltages equal to hvi . k is a constant limiting increments. For 5 iterations the best value for k is 0.75. Also this macro loads these HV values directly to HIVOC bypassing usual software. If the IP address for HIVOC machine changed you should update this macro. |
Step6 | Calculates final values for HV and writes HV file and the file with summary histograms. It chooses the best HV value for each channel and if it differs for more than 10% from desired gain this macro tries to fix it. |