Re: [ROOT] Fitting in TGraphError

From: Alberto Pulvirenti (alberto.pulvirenti@ct.infn.it)
Date: Wed May 19 2004 - 09:44:27 MEST


Thanks for the answer, I read the documentation and I fount answer to
all question, except one:

I have understood that the LeastSquareLinearFit() method does a straight
line fit through the data.
But, it does not take into account the errors, because a common TGraph
has not errors in its points.

In the case of a TGrapErrors object, does it perform the linear fit
weighting all points with its error, or not?

Cheers,
	Alberto

On Thu, 2004-05-06 at 15:09, Rene Brun wrote:
> Hi Alberto,
> 
> see the documentation of TGraph and TGraph::Fit, etc at:
> 
> http://root.cern.ch/root/htmldoc/TGraph.html
> http://root.cern.ch/root/htmldoc/TGraph.html#TGraph:Fit
> http://root.cern.ch/root/htmldoc/TGraph.html#TGraph:LeastSquareLinearFit
> 
> Rene Brun
> 
> Alberto Pulvirenti wrote:
> > 
> > Sorry, I forgot to put a topic in the email, and maybe many of you could
> > have deleted it as spam.
> > Here it is again.
> > 
> > Cheers,
> >         Alberto
> > 
> > On Wed, 2004-05-05 at 15:38, Alberto Pulvirenti wrote:
> > > Dear ROOTers,
> > >
> > > I have seen that it is possible to fit a TGraphErrors object with a
> > > given TF1.
> > >
> > > My question is: does this fit take into account the errors which I pass
> > > to this object, or not?
> > > Maybe, must I specify something in order to accomplish this task?
> > >
> > > Another question: I saw in the class definition a method called
> > >
> > > virtual void LeastSquareLinearFit(Int_t n, Double_t& a0, Double_t& a1,
> > > Int_t& ifail, Int_t first, Int_t last)
> > >
> > > Does it fit (according to parameters names) to which of the following?
> > > 1) a0 + a1*x
> > > 2) a0*x + a1
> > >
> > > What does 'ifail' mean?
> > >
> > > Thanks for all.
> 



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:08 MET