[ROOT] A couple TH1 troubles

From: Gerco Onderwater (onderwat@nialas.npl.uiuc.edu)
Date: Tue Apr 18 2000 - 23:40:45 MEST


Hi Rooters,

A few remarks:

(1) TH1::GetMaximum() returns the maximum bincontent as long as
    TH1::SetMaximum() has not been used to set an upper limit on the
    drawing range.  It would be handy to have the drawing range and
    the actual min/max of the histogram content to be decoupled.  The
    present behaviour is especially annoying if one tries to set the
    drawing range by hand more than once.  The function
    TH1::GetMaximumStored() seems to be intended to do just this, but
    only returns -1111 in my version of root.

(2) TH1::SetMaximum() takes a Float_t as an argument, even for a TH1D. 
    Likewise, TH1::GetMaximum() returns a Float_t.  That leads to
    trouble for large values in a TH1D.

(3) related to (2).  Actually having Double_t values in a TH1D (say
    1e200), results in an undrawable histogram. The same holds for TF1.

(4) if TH1::SetMaximum() has been used to set a maximum, drawing a 2D
    histogram with the surf option ignores that maximum.  The "lego"
    option works fine.

(5) after filling a histogram with TH1::Eval(TF1* f1), switching on
    the weighted error calculation using TH1::Sumw2() does not work. 
    Also, setting TH1::Sumw2() before using TH1::Eval() has no effect. 
    This is inconsistent with the normal behaviour.

(6) it would be very handy if TH1::Eval(TF1* f1, Option_t *option)
    would also facilitate subtraction, multiplication and division and
    not just addition.  An possible application is fitting a function
    and then calculating the residuals, or dividing out phasespace.

(7) having the "I" option (for integration) in TH1::Eval(TF1* f1) to
    store the integrated function would be nice.

(8) TH1::GetXaxis()->Set(Int_t nbins, Axis_t xmin, Axis_t xmax) allows
    one to change the number of bins on the axis, without actually
    changing the number of histogram bins.  Filling non-exisitent bins
    will soon lead to a seg-fault.  This should either be implemented
    properly, or somehow be prevented.  Although I have to admit that
    I wouldn't know a legitimate reason to change the number of bins,
    changing the upper and lower limit has many usefull applications.

I'm using version 2.23/12.

That's it for now,

-- Gerco

Dr. C.J.G. Onderwater
Nuclear Physics Laboratory
312 Loomis Laboratory of Physics
University of Illinois at Urbana-Champaign
1110 West Green Street
Urbana, IL 61801-3080     
Phone : (217) 244-7363
Fax   : (217) 333-1215  
E-mail: onderwat@uiuc.edu



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:24 MET