Which fit status is reliable?

we can get the fit status (integer, bool and string) as indicated in the following code.

TFitResultPtr r = h->Fit(myFunc,opt);
Int_t fitStatus = r;
TString minuit_status_string = gMinuit->fCstatu;
bool isValid = r->IsValid();

however, there are several situations where

  1. r=4140 (i believe it is a problem) but string=SUCCESSFUL
  2. r=4000', string=SUCCESSFUL` but plotting out the fit revealed it is problematic.
    as i am fitting alot of data, i cannot afford to check all the fits. I want a reliable way to tell if a particular fit is OK.

my question is: which one is the reliable one ?

TFitResultPtr is pointer to a class and should not be cast into an int. See its usage for instance here.

@Eddy_Offermann ROOT: TFitResultPtr Class Reference

I guess I am not reliable :sweat_smile:

sorry but let’s dont deviate from the topic…
i am not asking what is the reliable way to pull out the fit status.
what i am asking is “is there the most reliable fit status out of many fit status that we could possbily pull out after a fit is done”

@NgJunKai ROOT: TH1 Class Reference
See also: Search results for 'minuit status @moneta order:latest' - ROOT Forum

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.