Here I describe how to adjust the gains for the various spectrometer PMTs: Files: o pmt_database contains all necessary info about the PMTs (for now): Index# Serial# Date Tested LedBox WeightInfo o pmt_map.dat contains a map from the pmt# to the NX,NY scheme on the detectors. The numbering is: BPCn: NX1-15 and NY1-16 correspond to 1-31 BPCs: NX1-11 and NY1-16 correspond to 32-58 o relative_response.dat contains the relative response (a factor) with respect to a std PMT at HV=800 LED(V)=4V. The first row is the PMT index number. o powerlaw.dat contains the powerlaw info for each PMT: first row= index# secondrow= par(1) third row= par(2) The power law is given by: ADC = (HV/par(1))**(par(2)) (1) Actions: I chose the mean of the PMT response distribution (look at file relative_response.dat) in order to set all PMTs to equally respond. This is factor=1.3 The user needs to enter the PMT index number in order to get an answer at what value to set the high voltage. To do this one has to call "adjust_hv.kumac" The macro reads relative_response.dat and powerlaw.dat. Then, it divides the response by the mean of all responses. If the results is say ... 1.2 (i.e. 20% higher than the mean) then the powerlaw function has to be used to find where to set the HV in order to get 20% reduction in the ADC. From (1) HV=par(1)*(ADC/1.2)**(1/par(2)) The ADC used here is for a particular HVmean=800V for example. Important: To examine how the entries of the powerlaw.dat dbase were calculated look at: findpowerlaw.kumac