cms-gem-daq-project / gem-plotting-tools

Repository for GEM commissioning plotting tools
GNU General Public License v3.0
1 stars 26 forks source link

Modification in fitting routine used in anaUltraScurve.py #147

Closed brentstone closed 6 years ago

brentstone commented 6 years ago

The analyzer script anaUltraScurve.py fits the Scurves with a class ScanDataFitter, defined in fitting/fitScanData.py. A modification is made with regard to the initial guess of the parameter p1, such that this guess will always fall within the prescribed bounds of the fit on p1.

Description

The choice of initial guess in the routine for p1 is a the absolute value of the product of CAL_DACm and a Gaussian random variable with mean 10 and sigma 5, which, in some cases, fell below the lower bound of the fit for VFAT3, especially if CAL_DACb is large. In these cases, the code would then enter an infinite while loop. The routine is modified such that the initial guess is now the value of the lower bound plus the previously prescribed guess: p1_guess --> p1_low + p1_guess.

Types of changes

Motivation and Context

When analyzing Scurves with v3 electronics, the fits on one vfat in particular would not converge and the code got caught in an infinite loop.

How Has This Been Tested?

This code was tested on 3 sets of Scurves from the following chambers: X-S-CERN-0012, X-S-CERN-0011, (both v3 chambers) and the v2b chamber VII-S-CERN-0001. The fits converge for all vfats in each case.

The fit results for X-S-CERN-0012 are located in /data/bigdisk/GEM-Data-Taking/GE11_QC8/GE11-X-S-CERN-0012/scurve/2018.08.08.09.35/SCurveData/.

The fit results for X-S-CERN-0011 are located in /data/bigdisk/GEM-Data-Taking/GE11_QC8/GE11-X-S-CERN-0011/scurve/2018.08.07.19.00/.

The fit results for VII-S-CERN-0001 are located in /afs/cern.ch/user/b/bstone/public/v2b_scurvefit_test/.

The Summary.png and fitSummary.png files can also be viewed on the Mattermost here: https://mattermost.web.cern.ch/cms-gem-ops/pl/4cm7xex58fnttmfn174q5z84th

Screenshots (if appropriate):

Checklist:

bdorney commented 6 years ago

Can you upload the png files to mattermost and then provide the hyperlink to the post here?

We would find:

Of interest.

bdorney commented 6 years ago

Also for historical reasons please provide the Mattermost links to the plots you uploaded either in your main message above or as a comment here illustrating the results of testing.