Re: [ROOT] User specified fitting algorithm

From: Rene Brun (Rene.Brun@cern.ch)
Date: Tue Jul 04 2000 - 09:32:18 MEST


You can see an example of fitting function in the original function
GraphFitChisquare of the class TGraph.

Rene Brun

Aihong Tang wrote:
> 
> Hi,
> 
> The documentation of TGraph::Fit says:
> 
> option="U" Use a User specified fitting algorithm (via SetFCN)
> 
>    =============================
>   By default the fitting function GraphFitChisquare is used.
>   To specify a User defined fitting function, specify option "U" and
>   call the following functions:
>     TVirtualFitter::Fitter(mygraph)->SetFCN(MyFittingFunction)
>   where MyFittingFunction is of type:
>   extern void MyFittingFunction(Int_t &npar, Double_t *gin, Double_t &f,
> Double_t *u, Int_t flag);            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ~~~~~~~~~~~~~~~~~~~~~~~~
> 
> But it is not clear to me, what does the arguments of MyFittingFunction
> mean? How does it work?  Is there an example showing how to customize
> TGraph::Fitting?
> 
> Thanks!
> 
> Aihong



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