Closed AndrewLevin closed 5 years ago
So in addition to the comments I've put above I've listed this as "blocked" and "on hold" @jsturdy has requested that PR's should be first discussed in issues and algorithm's outlined before submitting a PR. There have been several changes here that where not originally outlined in the issue.
Before making the PR it would have been good to see a thorough comparison of these plots (at the very least on the same TPad
) not to mention something more indepth (e.g. how do pull's/residuals between data & fit behave) and then some plan to attempt to compare trimming before/after this change.
I found that in two cases (vfat1 and vfat2 in slide 8 of https://indico.cern.ch/event/837005/contributions/3509259/attachments/1884624/3106257/ALevin_calibrateThrDac_SWDevMeeting_23Jul2019.pdf), after applying the channel masks, a Gaussian fit was performed on a TGraph which was constructed from a single channel, which resulted in an unphysical negative Gaussian sigma. These points were already excluded from the fit, but they were still shown as non-zero points on the plot. Now, I have added protection against this by requiring that at least 10 channels are unmasked, otherwise the Gaussian fit is not attempted. The effect of this change can be seen below for the same example as in the slides (GE11-X-S-PAK-0007):
Before:
After:
Looks like this needs a rebase
.
Please let us know when this is done and it's ready for re-review.
It is ready for re-review. I have uploaded some slides for tomorrow's meeting: https://indico.cern.ch/event/838248/contributions/3515801/attachments/1887448/3111845/ALevin_calibrateThrDac_SWDevMeeting_30Jul2019.pdf
All of your requested changes have been implemented.
So following feedback from SW Dev meeting we agreed (@jsturdy, myself and @AndrewLevin) to:
I have made those changes in the last two commits.
TGraphs with zeroed points removed:
Bad channel summary information printout:
| vfatN | armDacVal | Dead Chan | High Noise | High Eff Ped | Fit At Init Val |
| :---: | :-------: | :-------: | :--------: | :----------: | :-------------: |
| -1 | 17 | 48 | 1671 | 2935 | 48 |
| -1 | 20 | 47 | 1974 | 2934 | 47 |
| -1 | 23 | 48 | 2211 | 2936 | 48 |
| -1 | 25 | 46 | 2272 | 2927 | 46 |
| -1 | 30 | 49 | 596 | 1563 | 49 |
| -1 | 40 | 48 | 349 | 803 | 48 |
| -1 | 50 | 49 | 308 | 481 | 49 |
| -1 | 60 | 48 | 282 | 360 | 48 |
| -1 | 70 | 49 | 254 | 271 | 49 |
| -1 | 80 | 48 | 240 | 161 | 48 |
| -1 | 100 | 50 | 222 | 72 | 50 |
| -1 | 125 | 49 | 228 | 55 | 49 |
| -1 | 150 | 49 | 196 | 49 | 49 |
| -1 | 175 | 77 | 210 | 77 | 77 |
| 0 | 17 | 0 | 57 | 128 | 0 |
| 0 | 20 | 0 | 80 | 128 | 0 |
| 0 | 23 | 0 | 76 | 128 | 0 |
| 0 | 25 | 0 | 72 | 128 | 0 |
| 0 | 30 | 0 | 3 | 38 | 0 |
| 0 | 40 | 0 | 1 | 15 | 0 |
| 0 | 50 | 0 | 1 | 7 | 0 |
| 0 | 60 | 0 | 1 | 7 | 0 |
| 0 | 70 | 0 | 1 | 7 | 0 |
| 0 | 80 | 0 | 1 | 2 | 0 |
| 0 | 100 | 0 | 1 | 0 | 0 |
| 0 | 125 | 0 | 1 | 0 | 0 |
| 0 | 150 | 0 | 1 | 0 | 0 |
| 0 | 175 | 0 | 1 | 0 | 0 |
| 1 | 17 | 0 | 45 | 128 | 0 |
| 1 | 20 | 0 | 52 | 128 | 0 |
| 1 | 23 | 0 | 54 | 128 | 0 |
| 1 | 25 | 0 | 58 | 128 | 0 |
| 1 | 30 | 0 | 1 | 36 | 0 |
| 1 | 40 | 0 | 1 | 9 | 0 |
| 1 | 50 | 0 | 1 | 7 | 0 |
| 1 | 60 | 0 | 1 | 9 | 0 |
| 1 | 70 | 0 | 1 | 8 | 0 |
| 1 | 80 | 0 | 1 | 0 | 0 |
| 1 | 100 | 0 | 1 | 0 | 0 |
| 1 | 125 | 0 | 1 | 0 | 0 |
| 1 | 150 | 0 | 1 | 0 | 0 |
| 1 | 175 | 0 | 1 | 0 | 0 |
...
I don't understand the table; I expect one entry per VFAT (ah, one per VFAT per DAC point), no VFATs indexed as -1
, and at most a value of 128 in each of the columns.
If more than one link is possible by this tool, then as many additional fields as necessary to make the results unique (shelf
/AMC
/link
)
The tool handles a single detector at a time.
vfatN = -1 is collective information for all VFATs
vfatN = -1 is collective information for all VFATs
For this case instead of reporting -1
I would report All
in that column in this case.
Done:
| vfatN | armDacVal | Dead Chan | High Noise | High Eff Ped | Fit At Init Val |
| :---: | :-------: | :-------: | :--------: | :----------: | :-------------: |
| All | 17 | 48 | 1671 | 2935 | 48 |
| All | 20 | 47 | 1974 | 2934 | 47 |
| All | 23 | 48 | 2211 | 2936 | 48 |
| All | 25 | 46 | 2272 | 2927 | 46 |
| All | 30 | 49 | 596 | 1563 | 49 |
| All | 40 | 48 | 349 | 803 | 48 |
| All | 50 | 49 | 308 | 481 | 49 |
| All | 60 | 48 | 282 | 360 | 48 |
| All | 70 | 49 | 254 | 271 | 49 |
| All | 80 | 48 | 240 | 161 | 48 |
| All | 100 | 50 | 222 | 72 | 50 |
| All | 125 | 49 | 228 | 55 | 49 |
| All | 150 | 49 | 196 | 49 | 49 |
| All | 175 | 77 | 210 | 77 | 77 |
| 0 | 17 | 0 | 57 | 128 | 0 |
| 0 | 20 | 0 | 80 | 128 | 0 |
| 0 | 23 | 0 | 76 | 128 | 0 |
| 0 | 25 | 0 | 72 | 128 | 0 |
| 0 | 30 | 0 | 3 | 38 | 0 |
| 0 | 40 | 0 | 1 | 15 | 0 |
| 0 | 50 | 0 | 1 | 7 | 0 |
| 0 | 60 | 0 | 1 | 7 | 0 |
| 0 | 70 | 0 | 1 | 7 | 0 |
| 0 | 80 | 0 | 1 | 2 | 0 |
| 0 | 100 | 0 | 1 | 0 | 0 |
| 0 | 125 | 0 | 1 | 0 | 0 |
| 0 | 150 | 0 | 1 | 0 | 0 |
| 0 | 175 | 0 | 1 | 0 | 0 |
| 1 | 17 | 0 | 45 | 128 | 0 |
| 1 | 20 | 0 | 52 | 128 | 0 |
| 1 | 23 | 0 | 54 | 128 | 0 |
| 1 | 25 | 0 | 58 | 128 | 0 |
| 1 | 30 | 0 | 1 | 36 | 0 |
| 1 | 40 | 0 | 1 | 9 | 0 |
| 1 | 50 | 0 | 1 | 7 | 0 |
| 1 | 60 | 0 | 1 | 9 | 0 |
| 1 | 70 | 0 | 1 | 8 | 0 |
| 1 | 80 | 0 | 1 | 0 | 0 |
| 1 | 100 | 0 | 1 | 0 | 0 |
| 1 | 125 | 0 | 1 | 0 | 0 |
| 1 | 150 | 0 | 1 | 0 | 0 |
| 1 | 175 | 0 | 1 | 0 | 0 |
...
Applies quality cuts to the scurve fits that are used in the ARM DAC calibration with configurable cut values.
Description
This pull request makes the following changes:
anaInfo.py
. The default values were taken from https://github.com/cms-gem-daq-project/sw_utils/blob/develop/scripts/calibrateArmDac.sh, not from the default values set are currently set in theargparse
argument construction.argparse
block associated with these cut values intoanaoptions.py
.Types of changes
Motivation and Context
Intended to resolve issue https://github.com/cms-gem-daq-project/gem-plotting-tools/issues/235
How Has This Been Tested?
Yes, I tested both the updated scurve analysis and the ARM DAC calibration on previously collected ARM DAC calibration data from the detector GE11-X-S-CERN-0010. The "canvScurveMeanVsThrDac_Summary" ARM DAC calibration plots are shown below.
With the head of develop:
With this pull request:
There are slight changes to the plots e.g. VFATs 5, 6, and 10. I would conclude that these changes are improvements, given that Gaussian fits to the scurveMean distribution that previously failed are now succeeding, and some of large error bars are reduced.
Checklist: