Re: TH1 fit("gaus")

From: Rene Brun <Rene.Brun_at_cern.ch>
Date: Sun, 20 Dec 2009 08:24:53 +0100


When fitting with a TF1 function, the fit is performed by default using the current histogram range.
By default the histogram range include all bins defined at creation time. The histogram range can be changed by calling

    h.GetXaxis()->SetRange(binmin,binmax) or

    h.GetXaxis()->SetRangeUser(xmin,xmax)

When you fit fit the option "R" the fit is performed on the range defined by the function.

Rene Brun

Marc Escalier wrote:
> Dear rootters,
>
> would somebody know what is the range considered by default when one
> do a fit using the default "gaus" fit on a TH1, without specifying the
> ranges of the fit : is is the range of the histogram ?
>
> thanks
>
Received on Sun Dec 20 2009 - 08:24:59 CET

This archive was generated by hypermail 2.2.0 : Sun Dec 20 2009 - 17:50:01 CET