TH1 questions/problems

From: Tom Roberts <tjrob_at_fnal.gov>
Date: Sat, 14 Jul 2007 23:31:30 -0500


Two questions/problems about TH1-s:

  1. The errorbars are wrong. They are displayed as sqrt(sum of weights) but they should be (sum of weights)/sqrt(N) where N is the number of entries in the bin. The workaround of using a TGraphErrors and doing it myself is quite cumbersome.... And worse, it would prevent the user from using the canvas editor to manipulate it as usual. I realize this requires an additional int per bin -- do we need another class (analogous to TGraphErrors)? Or better, a new function AccumulateErrorbars(bool) that allocates the additional array and causes Fill() to fill it and Draw("E?") to draw errorbars correctly (and if never called things can work as they do now).
  2. The option to Draw "E1 X0" still draws the X errorbars. But gStyle->SetErrorX(0) does remove them.

I'm using a TH1D if it matters (probably not). This is Root 5.12 on Linux.

Tom Roberts Received on Sun Jul 15 2007 - 06:31:35 CEST

This archive was generated by hypermail 2.2.0 : Sun Jul 15 2007 - 11:50:02 CEST