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
Plotting bug in diffNuisances.py
due to counting all parameters via regex flag --regex ".*"
#789
Comments
@vicha-w may have a comment, but it looks to me that |
Hi. I looked at the code again and noted that, if we want to revert back to setting the number of bins based on the size of The original idea behind So let me propose a fix: instead of counting NPs from Do you happen to know if this would work, or would there be a better solution for this? |
Hi, I didn't look into the details of this problem yet, but to clarify: nuisances_prefit will only contain those uncertainties with an associated constraint term (i.e. not rateParams or other unconstrained parameters associated with parametric models). In that sense, it will generally be a subset of the parameters in fit_s. Since nuisances_prefit is a RooArgSet, it should be possible to iterate through and run a regex on the name of each RooRealVar it contains. |
This issue occurs due to the changes introduced in commit cdc68c1, wherein the TH1Fs containing the nuisances and post-fit errors are artificially lengthened due to counting all parameters if the default
--regex ".*"
option is provided.Expected Behavior: Running
python diffNuisances.py fitDiagnosticsTest.root --abs -g nuisance_pulls.root
should produce a ROOT file containingnuisances
andpost_fit_errs
canvases with only the parameters that meet the default val and sig tolerances:Current Behavior: Instead, the two TH1Fs have a number of bins equal to the total number of parameters, even though not all parameters meet the criteria to be plotted:
This issue arises due to the introduction of the
np_count
variable on lines 103-115, which defines the number of bins in thenuisances
andpost_fit_errs
histograms. For instance, in the example I posted above, the totalnp_count
comes to 204 in my analysis, while the only parameters of interest are the ones shown in the expected behavior image. The expected behavior plots were derived by reverting the changes made in the previously mentioned commit.I'm not sure I understand the reasoning behind setting the number of bins to be
np_count
- wouldn't the original method of setting the number of bins based on the size of thenuisances_prefit
RooArgSet be the most general solution? Thank you!The text was updated successfully, but these errors were encountered: