-
Notifications
You must be signed in to change notification settings - Fork 21
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
negative yerr not handled by cabinetry.visualize.data_mc #388
Comments
This looks to be happening in the ratio panel, where the |
Thank you @alexander-held!
No the model prediction is not expected to be negative, but I see in the prefit yield table that for one specific region the total is indeed negative :/ We have to go back to the inputs then..
For this error above I used the latest stable version of cabinetry, custom modifiers are not included. |
I made it work, it was indeed a consequence of initial paramater values not having suitable values. For my signal I changed the NormFactors:
- Name: "Signal_norm"
Samples: "LQ"
Nominal: 1
Bounds: [0, 30] to NormFactors:
- Name: "Signal_norm"
Samples: "LQ"
Nominal: 0
Bounds: [0, 30] This then also sets my signal LQ to 0.00 in the yields resulting the total to be positive. |
Is the signal sample predicting a negative number of events? I do not see how otherwise the nominal value of |
Yes they are negative interference terms. The yield table for the mention region for sample rec_smim_vs_Nbjet_HighMassOSs2thh_1bjets
---------- ------------------------------------------
LQ 0.00 ± 0.00
Wjets 0.15 ± 0.02
Zll 0.00 ± 0.00
Ztautau 0.66 ± 0.07
multiboson 0.05 ± 0.00
singletop 0.44 ± 0.04
ttbar 2.31 ± 0.92
total 3.61 ± 0.92
data 3.61 while for sample rec_smim_vs_Nbjet_HighMassOSs2thh_1bjets
---------- ------------------------------------------
LQ -7.97 ± 0.16
Wjets 0.15 ± 0.02
Zll 0.00 ± 0.00
Ztautau 0.66 ± 0.07
multiboson 0.05 ± 0.00
singletop 0.44 ± 0.04
ttbar 2.31 ± 0.92
total -4.36 ± 0.93
data 3.61 It's the only region where the total drops below 0, for other regions there is enough background to stay in the positive. For my understanding, is it wrong to use |
Hi @rmnmllr, sorry I forgot to reply here earlier: |
hey @alexander-held, no worries -- thanks for taking the time! After a while we have a new set of inputs and now again I stumble upon the
Now for fixing this, I took the absolute value of yerr=template["stdev"] / abs(nominal_histo["yields"]), which makes it work. Do you see any dealbreaker by doing this? At least now I can get some plots, |
This probably comes from #390. I have an idea of how to fix that, so hopefully I can get that done soon and release a new version. Fixing the negative error issue by taking the absolute value at that point seems reasonable to me. Please feel free to submit a PR with this change (perhaps with |
Probably a minor issue and more of a error handling request, but while trying to visualize the prefit plots I receive an error from matplotlib that
yerr
can't contain negative values:This is probably related to few statistics in the selected region, but can this be logged and or be catched somewhere?
The text was updated successfully, but these errors were encountered: