Re: [ROOT] how to get stats printed when using Minuit?

From: Rene Brun (Rene.Brun@cern.ch)
Date: Wed Aug 22 2001 - 17:20:31 MEST


Hi Bill,

We have two examples at the URL: http://root.cern.ch/root/HowtoFit.html
 - a macro fitexample.C fitting a histogram
 - a general example with TMinuit fitting a set of points (not a histogram)

In the tutorials section and also the Users Guide, we have many more
examples showing how to fit histograms.

The SetOptFit function in TStyle can be used to display the results
of TH1::Fit or TGraph::Fit. If you fit yourself your histogram with a different
algorithm, the resulting function and associated parameters is not saved
with the histogram data structure and not visible when you activate
the SetOptFit options.

Rene Brun

William Hanlon wrote:
> 
> Hi Rene,
> 
> I am using the the example "Fitting in general using the class
> TMinuit" line for line (expect the function func which is my own
> fitting algorithm) from http://root.cern.ch/root/HowtoFit.html. When I
> plot the histogram though, no fit information is displayed. I have
> used SetOptFit(1) and even used SetChiSquare(), SetParameter(),
> SetParError(), but still the fit information is missing.
> 
> >From what I gather, when a histogram is fitted a TF1 object is created
> and associated with that histogram. But using the TMinuit method on
> the web page you pointed me to, does not seem to do that. Am I missing
> something?
> 
> Bill
> 
> >>>>> "Rene" == Rene Brun <Rene.Brun@cern.ch> writes:
> 
>     Rene> Hi Bill,
> 
>     Rene> See the chaper of Fitting in the Users Guide or also:
> 
>     Rene> http://root.cern.ch/root/HowtoFit.html
> 
>     Rene> Rene Brun
> 
> --
> William Hanlon                       http://www.physics.rutgers.edu/~whanlon
> Rutgers University                   pgp fingerprint:85 68 43 55 9A 83 44 00
> Dept. of Physics and Astronomy                       CE 19 C0 B0 D9 DE D6 52
> office: (732) 445-5032               pager: (732) 343-5783



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:58 MET