Tool for calibrating either the CFG_THR_ARM_DAC or the CFG_THR_ZCC_DAC register of a set of vfat3ASICs. The user should have taken a set of scurves at varying CFG_THR_X_DAC settings, for X={ARM,ZCC}. Then these scurves are expected to have been analyzed, including fitting, with anaUltraScurve.py. The correct CFG_CAL_DAC calibration must have been used during this analysis.
The input file is expected to be in the Three Column Format with the independent variable being CFG_THR_X_DAC. For each scandate in the input file the scruve gScurveMeanDist_* and gScurveSigmaDist_*TGraphErrors objects for each VFAT, and summary level, will be fit with a Gaussian distribution. The mean of this Gaussian will be plotted against the provided CFG_THR_X_DAC value with the Gaussian's sigma taken as the error on the mean. The resulting scurveMean(Sigma) vs. CFG_THR_X_DAC distribution will be fit with a pol1(pol0) function. The fit function for the scurveMean vs. CFG_THR_X_DAC gives the calibration of the THR DAC in terms of fC while the fit function for the scurveSigma vs. CFG_THR_X_DAC gives the horizontal asymptote of the average ENC across the vfat.
An output table will be produced at the end of the function call which shows the calibration information and ENC by VFAT position and overall (e.g. vfat position = All). Numerically the All case is assigned a value of -1.
Output files will be found $ELOG_PATH. The calFile_CFG_THR_X_DAC_<Det S/N>.txt file will be a text file specifying the CFG_THR_X_DAC calibration parameters (slope and intercept) by vfat position. Additionally all TObjects created during the analysis will be found in calFile_<Det S/N>_CFG_THR_X_DAC.root.
Types of changes
[ ] Bug fix (non-breaking change which fixes an issue)
[X] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Motivation and Context
Need calibration curve for CFG_THR_*_DAC in terms of fC for channel trimming. Here * = {ARM,ZCC}.
Description
Tool for calibrating either the
CFG_THR_ARM_DAC
or theCFG_THR_ZCC_DAC
register of a set ofvfat3
ASIC
s. The user should have taken a set of scurves at varyingCFG_THR_X_DAC
settings, forX={ARM,ZCC}
. Then these scurves are expected to have been analyzed, including fitting, withanaUltraScurve.py
. The correctCFG_CAL_DAC
calibration must have been used during this analysis.The input file is expected to be in the Three Column Format with the independent variable being
CFG_THR_X_DAC
. For each scandate in the input file the scruvegScurveMeanDist_*
andgScurveSigmaDist_*
TGraphErrors
objects for each VFAT, and summary level, will be fit with a Gaussian distribution. The mean of this Gaussian will be plotted against the providedCFG_THR_X_DAC
value with the Gaussian's sigma taken as the error on the mean. The resulting scurveMean(Sigma) vs.CFG_THR_X_DAC
distribution will be fit with apol1
(pol0
) function. The fit function for the scurveMean vs.CFG_THR_X_DAC
gives the calibration of the THR DAC in terms of fC while the fit function for the scurveSigma vs.CFG_THR_X_DAC
gives the horizontal asymptote of the average ENC across thevfat
.An output table will be produced at the end of the function call which shows the calibration information and ENC by VFAT position and overall (e.g. vfat position =
All
). Numerically theAll
case is assigned a value of-1
.Output files will be found
$ELOG_PATH
. ThecalFile_CFG_THR_X_DAC_<Det S/N>.txt
file will be a text file specifying theCFG_THR_X_DAC
calibration parameters (slope and intercept) by vfat position. Additionally allTObject
s created during the analysis will be found incalFile_<Det S/N>_CFG_THR_X_DAC.root
.Types of changes
Motivation and Context
Need calibration curve for
CFG_THR_*_DAC
in terms of fC for channel trimming. Here*
= {ARM
,ZCC
}.How Has This Been Tested?
Example call
Produces calibration file:
Note in the above
vfat's
12, 15, and 16 have no data due to hardware issues and thus are expected to have bad fit parameters.Screenshots (if appropriate):
Gaussian fits of scurve mean, example all case:
Gaussian fits of scurve sigma, specific vfat case:
Derived calibration curve for
CFG_THR_ARM_DAC
averaging over all vfats:Derived average ENC horizontal asymptote averaging over all vfats:
Checklist: