A modification of the code is needed for fitting the Scurve width. The lower bound on the fit of this parameter p1 and initial guess are changed.
Description
Previously the lower bound was set to be self.calDAC2Q_m[vfat]*(256)+self.calDAC2Q_b[vfat], which has a couple issues. First, it allows for negative values of sigma, which are unphysical. Second, in some cases, it actually sets the lower bound much higher than what the true width would be.
With regard to the latter, consider a VFAT with cal_m of -0.244127 and cal_b of 84.0276, as seen with VFAT14 in current testing on the chambers GE11-X-S-CERN-0012 and GE11-X-S-INDIA-0004. In this case, the lower bound for p1 is 21.53, and so a fit is attempted with a width no less than this number, as seen in the top attached screenshot. This is clearly a poor fit, which does not allow for a good mean to be chosen either.
Changing the lower bound allows the fit to converge to the result shown in the second screenshot.
Types of changes
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Motivation and Context
Some VFATs with particular cal_m and cal_b values were unable to be fit using the current procedure.
How Has This Been Tested?
Fitting code was run on Scurve data. Screenshots provided below demonstrate differences.
Screenshots (if appropriate):
Checklist:
[x] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
A modification of the code is needed for fitting the Scurve width. The lower bound on the fit of this parameter
p1
and initial guess are changed.Description
Previously the lower bound was set to be
self.calDAC2Q_m[vfat]*(256)+self.calDAC2Q_b[vfat]
, which has a couple issues. First, it allows for negative values of sigma, which are unphysical. Second, in some cases, it actually sets the lower bound much higher than what the true width would be.With regard to the latter, consider a VFAT with
cal_m
of -0.244127 andcal_b
of 84.0276, as seen with VFAT14 in current testing on the chambersGE11-X-S-CERN-0012
andGE11-X-S-INDIA-0004
. In this case, the lower bound forp1
is 21.53, and so a fit is attempted with a width no less than this number, as seen in the top attached screenshot. This is clearly a poor fit, which does not allow for a good mean to be chosen either.Changing the lower bound allows the fit to converge to the result shown in the second screenshot.
Types of changes
Motivation and Context
Some VFATs with particular
cal_m
andcal_b
values were unable to be fit using the current procedure.How Has This Been Tested?
Fitting code was run on Scurve data. Screenshots provided below demonstrate differences.
Screenshots (if appropriate):
Checklist: