Roofit Variable binning

Hello!!

I’m plotting a weighted distribution based on a yield fixed at 100 using sPlot. I’m choosing a binning with
RooBinning bins(8.5, 108.5);
bins.addUniform(1, 8.5, 28.5);
bins.addUniform(4, 28.5, 108.5);
(all bins have a with of 20) and I’m getting a very normal result with the total number of events being 100 (see attachment with 5 bins).

When I’m changing to variable binning
RooBinning bins(8.5, 108.5);
bins.addUniform(1, 8.5, 28.5);
bins.addUniform(2, 28.5, 108.5);
the total number of events only for the first bin has 140 entries!

Any thoughts?? Am I doing something wrong?

Many thanks!!

Stefanos




I guess no one has ever encountered it before ??? :slight_smile:

I played a bit with the code of the tutorial file rf108. I’m attaching both the code and the result. The problem I’m having is very clear in the bottom two plots…

Many thanks again,
Stefanos
rf108_plotbinning.C (5.02 KB)


I’ve also used addBoundary instead of addUniform and I still see the same problem…

Is it something obvious that I’m missing ??

Any advice would be great :slight_smile:

I’m attaching a newer/simpler code that illustrates the problem.

Cheers,
Stefanos
rf108_plotbinning.C (2.65 KB)
variable binning.eps (46.5 KB)

Hello All!

We also have a RooDataSet and we do our unbinned fits, etc - all is fine, number of events in normalization region matches that in data that we read in. When we plot the RooDataSet in a frame in ONE bin or with equidistant binning - everything is again fine, i.e. we count as many events as we see in data.
However, when we do variable binning - we see a huge excess of events (total 3905 vs 1795) in all bins. Here’s a snippet:

version one:

RooBinning b(stMin,stMax);
b.addBoundary(stNorm);
b.addBoundary(stNorm+200);
b.addBoundary(stNorm+500);
b.addBoundary(stNorm+900);
b.addBoundary(stNorm+1400);
b.addBoundary(stMax);

version two:

b.addUniform(1, stMin, stNorm);
b.addUniform(1, stNorm, stNorm + 200.0);
b.addUniform(1, stNorm + 200.0, stNorm + 500.0);
b.addUniform(1, stNorm + 500.0, stNorm + 900.0);
b.addUniform(1, stNorm + 900.0, stNorm + 1400.0);
b.addUniform(1, stNorm + 1400.0, stMax)

Plot:

dsr_norm.plotOn(normFrame, Binning (b));

=========

Thanks for any advice!
Alexey