Plotting variable-bin-width RooHistPdf in range wrong normalization

Hey RooFitters,

I recently encountered a bug when plotting a RooHistPdf and thought it may be useful for others to know the fix.

  • Problem: when plotting a variable-bin-width RooHistPdf calling RooFit::Range(...) the normalization is off even if the range is the full range of the corresponding dataset
  • Solution: explicitly normalize the pdf using RooFit::Normalization(...)

Attached is a little script which demonstrates the problem and shows the fix when you toggle any one of the boolean values doNotCallRange, normalizeByHand, or convertToLinearBinning to true. The following screenshot shows the problem plot on the left and the fixed one on the right:

Cheers,
Etienne

plotHistPdf.C (1.9 KB)

Hello Etienne,

Thank you for reporting this issue. Could you please open also a bug in JIRA, ?
https://sft.its.cern.ch/jira/secure/CreateIssue.jspa?pid=10010&issuetype=1

Thank you

Lorenzo

Hi Lorenzo,

Done: https://sft.its.cern.ch/jira/browse/ROOT-9649

Cheers,
Etienne

Thank you very much !!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.