Home | News | Documentation | Download

TRatioPlot with small numbers

_ROOT Version: 6.16/00
Platform: Ubuntu 18.04
Compiler: gcc 7.4


Dear experts,

The TRootPlotter doesn’t work for me for small numbers, i.e. when
bin contents of histograms are of the order of 1.e-9 or low, then all such bins are ignore.

To illustrate the issue, I slightly modified the ratioplot1 example code, i.e. scaled histograms
with a small number.
Both the modified code and the output plot are attached.

Thank you,
Rafo

ratioplot1.cc (1.1 KB)

   // "pois", "divsym", "diff", "diffsig", "cp", ...
   TRatioPlot *rp = new TRatioPlot(h1, h2, "divsym");

Thank you for prompt replay.

That solved my issue.

Out of curiosity, why it didn’t work for the default case?
There are of course some bins should be skipped, where passed=0, or ratio> 1, but there are also
other bins that I would think should have worked.

Thank you,
Rafo

The default is “pois” and the “Poisson distribution” expects the “number of events” at least 1.

Thanks, but I see it happens when number of events get around 10e-9,
for example this is is also produced with a default optiion
auto rp = new TRatioPlot(h1, h2);
Number of events all are well below 1, however the ratioplot is successfully created.

@couet So I was wrong … it seems that there is somewhere a hardwired limit of the order of 1.e-7 (when the histograms’ contents goes below it, it “misbehaves”).

I suppose you also get the Warning:

Warning in <TGraphAsymmErrors::Divide>: Number of graph points is different than histogram bins - 50 points have been skipped

?

That is correct., I get it

Yes, for “h1->Scale(1.e-9); h2->Scale(1.e-9);” and below and no, for scaling with 1e-8 and above.

Well, another possible source of this problem could be that there is somewhere a “float” variable and the histograms’ contents is compared to 1 (then 1f+5e-8f=1f-2e-8f=1).

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