-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use likelihood fit instead of chi-square fit in DQMServices slice fits #43106
Conversation
The DQM plots use the `TH2::FitSlicesY()` function to fit some Gaussians. However, some of the fits are failing. This was not resulting in errors so far, but with the switch to Minuit2 by default in ROOT 6.30 it will. The problem is that it uses chi-square fits to fit slices with many empty bins, which is not appropriate. Doing a likelihood fit with the `"l"` option is one way to fix the problem, because it can better deal with empty bins. Closes #42979.
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-43106/37349
|
A new Pull Request was created by @guitargeek (Jonas Rembser) for master. It involves the following packages:
@tjavaid, @syuvivida, @rvenditti, @nothingface0, @cmsbuild, @antoniovagnerini can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
test parameters:
|
please test for CMSSW_13_3_ROOT630_X |
please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-3e8a50/35411/summary.html Comparison SummarySummary:
|
please test There are too many comparison differences, so lets re-run based on latest IB |
I would not be surprised if there are real differences, given that the DQM Histograms are now fit without the chi-square approximation |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-3e8a50/35417/summary.html Comparison SummarySummary:
|
by naively looking into some of the histograms changed (e.g. https://tinyurl.com/yo6kah8c or https://tinyurl.com/ywu9hhm2) the fit quality looks better now. |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-3e8a50/35409/summary.html Comparison SummarySummary:
|
@cms-sw/dqm-l2 can you please review it. This fixes the Relvals failures for ROOT 6.28/30 IBs |
@rappoccio @antoniovilela can we merge this for 11h00 IB so thatit can go in ROOT 6.28/30 builds too |
+1 |
@smuzaffar |
For the records this PR is the cause of some failures in the 13_3_0_pre5 given the worsening of track/muons resolutions. E.g.: |
Can you maybe post some plots here for non-CMS members like me? 🙂 |
Thanks David! Indeed neither fit looks appropriate here, maybe better just take the std. dev from the histogram or as as you said fit only the central region. |
Yes, it's more a problem related to the way we calculate the resolution itself rather than directly originating from this PR (that basically highlights the issue). Still one could argue that red is still better than green since the likelihood gives more importance to the tails, in the specific case posted here and elsewhere. Therefore the failure reports. |
Relying on accidental properties of the chi2 fit is quite a random way to discount the tails. @AdrianoDee, what to you thing about Davids suggestion to only fit the central region (which could then be done with either chi2 or likelihood)? |
chiming in my (unrequested) 2 cents:
|
How should we proceed here? Does the <= 13_3_0_pre4 behavior need to be restored by 14_0_0_pre3 (last open prerelease)? If yes, are the improvements in I guess, in principle, a possible "quick fix" would be to revert to ROOT 6.26 and the chi2 based fitting (while the improvements are being worked on), but I see that only as the last resort. |
there seems to be already something that does limited range fits:
perhaps it's just a matter of adjusting configurations. @cms-sw/tracking-pog-l2 @cms-sw/muon-pog-l2 for your consideration. |
@guitargeek , during offline release planning meeting today, we discussed if it is possible to use the old Minuit (instead of new default Minit2 ). Do you know if it is possible and how? |
In which scope? All of CMSSW? |
yes all cmssw ( e.g. may be build root to use old Minuit as default) |
From root-project/root#13661 and root-project/root#13852 it seem like ROOT::Math::MinimizerOptions::SetDefaultMinimizer("Minuit");
// or
ROOT::Math::MinimizerOptions::SetDefaultMinimizer("Minuit", "Migrad"); would do the job. I suppose this function is thread-unsafe, so maybe the Then in the meanwhile @cms-sw/dqm-l2 @cms-sw/tracking-pog-l2 @cms-sw/muon-pog-l2 could look into restricting the fit ranges along #43106 (comment). After that we could try again to move the |
I found these cmssw/DQM/SiStripCommissioningAnalysis/src/CalibrationAlgorithm.cc Lines 88 to 90 in 10b8a60
I guess (hope) these components are not run in standard workflows. |
IIRC, indeed they aren't. @rgerosa might confirm |
Hi @mmusich yes I confirm these are just run in the analysis of tracker local-runs of type calibration scan |
The issue is here #43722 . I suggest to move all subsequent discussion on the topic there. |
The DQM plots use the
TH2::FitSlicesY()
function to fit some Gaussians. However, some of the fits are failing. This was not resulting in errors so far, but with the switch to Minuit2 by default in ROOT 6.30 it will.The problem is that it uses chi-square fits to fit slices with many empty bins, which is not appropriate. Doing a likelihood fit with the
"l"
option is one way to fix the problem, because it can better deal with empty bins.Thanks to @lmoneta for this suggestion!
See root-project/root#13852
Closes #42979.
@smuzaffar, needs to be tested with ROOT master or 6.30 if possible.