This info is only available via the TMinuit fitter (pointed by gMinuit).
You can access directly the public TMinuit member TString fCstatu, eg
test the value of gMinuit.fCstatu.Data();
If the fit converged, this should contain the string "CONVERGED"
Otherwise, it will contain values such as "CALL LIMIT", etc
Rene Brun
Huaizhang Deng wrote:
>
> My question is how I can know whether the fit status is "failed", "converged"
> or "call limited"
> without checking the value of parameters.
>
> Rene Brun wrote:
>
> > If you have an histogram hist fitted with the function func (below "gaus"),
> > you can do the following:
> >
> > hist->Fit("gaus");
> > TF1 *func = hist->GetFunction("gaus");
> > func->GetChisquare();
> > func->GetParameter(i);
> > func->GetParError(i);
> > func->GetNDF();
> > etc... see TF1.h
> >
> > You can also access the status of the fitter via
> > TVirtualFitter *fitter = TVirtualFitter(hist);
> > fitter->PrintResults(3,1.);
> > fitter->...
> >
> > Rene Brun
> >
> > Huaizhang Deng wrote:
> > >
> > > Hi:
> > >
> > > After I fit a histogram, is there any function or variable which tells
> > > me the status of the fit?
> > >
> > > --
> > > Huaizhang Deng
> > > 516-344-5731
> > > P. O. Box 426
> > > Upton, NY 11973
>
> --
> Huaizhang Deng
> 516-344-5731
> P. O. Box 426
> Upton, NY 11973
>
>
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:27 MET