cp3-llbb / CommonTools

Utilities to mass create histograms, flat trees, and more
2 stars 9 forks source link

Different results in histFactory and from drawing in a TBrowser #26

Closed swertz closed 8 years ago

swertz commented 8 years ago

I'm having something weird when using histFactory... I'm drawing the invariant mass of my first pair of leptons, asking the cut Mll > 20 to be satisfied.

When I draw this variable in a TBrowser, I get this result: fromtbrowser2

But using histFactory I get this (note that the first bins are not empty as they should): fromhistfactory

You can check that the draw strings are the same on the top of the picture. The number of entries correspond, which is reassuring. Am I missing something here?

delaere commented 8 years ago

Hi,

It looks like the weights are maybe not applied in the second plot (histFactory).

I guess you changed the post since then, but the email I received points to that plot: https://cloud.githubusercontent.com/assets/8058274/10715980/f97d4a9a-7b28-11e5-8602-4be91e0bf702.png where one can see some negative entry that is apparently not present in the second plot.

Impossible to be sure from what I see, but that's something to investigate, I think, especially since the number of entries is the same.

swertz commented 8 years ago

Hi Christophe,

I changed the first plot to have the same binning as the one from histFactory (this makes the negative entries disappear). For the second plot, if you look around M=600 you can see a negative entry (and the y-axis range extends below zero), so it looks like weights are applied. Besides, this would not affect the fact that the first bins are not empty while they should be, would it?

What's weird is that the third, fourth and fifth non-empty bins of the TBrowser plot look very similar to the corresponding ones in the histFactory plot (even if the number of entries are not the same)...

delaere commented 8 years ago

That could be just luck: the absolute values are different.

blinkseb commented 8 years ago

Investigating...