HV balancing

A. Kazantsev 12.2004
stkav@rcf.rhic.bnl.gov
This package was developed for HV adjustment which is used for setting our gains (HG) to 0.4 MeV/ADC. Such balancing is important for ERT trigger and partially for lvl2 filtering. /home/phnxpbgl/stkav/HV_balancing/ To start the adjustment procedure:
  1. Edit file log - remove everything below dashed line and edit other fields if necessary
  2. Start go
  3. Take a LED run and input its name
  4. Wait for the end of iteration (until it ask for a new file) and repeat step 3
  5. After procedure finished edit hivoc_write and start it.
  6. All summary histos will be in file summary.root
Steps description

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.

Last update:
Andrey Kazantsev