Re: TMinuit

From: Faouzi Attallah (attallah@gsi.de)
Date: Thu May 06 1999 - 11:30:29 MEST


Hi Seng,

To control the fit quality in my programs I am using the following :

/* see Minuit doc */
 gMinuit->mnstat(amin, edm, errdef, nvpar, nparx, istatus); 

 int migrad = getFitStatus((char *)gMinuit->fCstatu.Data())  ;


/*****/
int getFitStatus (char *Migrad) 
  /*****/
{
  /* Transforming the MIGRAD char[]-status to a int-status 
   *
   ***********************************************************/
  int i ;
  char Status[][12]={"FAILED","PROBLEMS","CONVERGED","SUCCESSFUL"} ;

  for(i=0 ; i < 5 ; i++) 
    if (strstr(Migrad,Status[i]) != NULL) return i ;

  return -1  ;
}


Cheers,
Faouzi

 F. Attallah 
GSI mbH 
Planckstr 1
D-64291 Darmstadt 
  Tel: +49 (0)6159 71 2743
  Fax: +49 (0)6159 71 2901
Email: F.Attallah@gsi.de

On Tue, 4 May 1999, Woon-Seng Choong wrote:

> 
> Hi,
>   I used TH1:Fit to fit my histogram. How can I get the error return code
> to check whether the fit converged or not? I tried using
> gMinuit->GetStatus() but it always give me zero whether the fit converged
> or
> not.
> 
> 	Seng
> 
> 
> 



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:32 MET