Re: [ROOT] Chi2 from fit

From: Rene Brun (Rene.Brun@cern.ch)
Date: Fri Dec 15 2000 - 10:04:54 MET


Hi Til, Eddy,
Fitting and access to the fit results is described in the Users Guide.
I have added more information also to:

http://root.cern.ch/root/htmldoc/TH1.html#TH1:Fit
http://root.cern.ch/root/htmldoc/TGraph.html#TGraph:Fit

Rene Brun

Eddy Offermann wrote:
> 
> Til,
> 
> Something along the following lines:
> 
> histo->Fit("myfunc");
> TF1 *f = histo->GetFunction("myfunc");
> Double_t chi2 = f->GetChisquare();
> 
> >
> >
> > Hi,
> >
> > doing a simple fit with histo->fit() I would like to access the value of
> > the chi2 afterwards. If I have understood right this is just the value
> > printed onto the screen as FCN=... in the case of the default chi2
> > fit, so in principle this piece of information is there. Is there any
> > method to access it or do I have to calculate it on my own from the data
> > points and the fit params?
> >
> > Thanks in advance,
> >
> > Til
> >
> >



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