The funny thing is that the canvas shows the right average value and a very small deviation, as it should, but it doesn’t show the right plot. With another file I wasn’t lucky enough to get the right result by plotting the difference but still the canvas was showing the right average. I hope this is simple to solve.
This is a problem of numerical stability. Since you have a series of double which have approximavely the value 20, TTree::Draw is trying to give you have much precision as possible. So in this case it dimension the histogram to range from 1.99999999999998690e+001 to 1.99999999999999930e+001
with 100 bins.
You can solve the problem by pre-dimensions the histogram, for example: