ROOT logo
ROOT » MATH » MATHCORE » ROOT::Fit::FitConfig

class ROOT::Fit::FitConfig


   Class describing the configuration of the fit, options and parameter settings
   using the ROOT::Fit::ParameterSettings class

   @ingroup FitMain

Function Members (Methods)

public:
~FitConfig()
ROOT::Math::Minimizer*CreateMinimizer()
voidCreateParamsSettings(const ROOT::Math::IParamMultiFunction& func)
ROOT::Fit::FitConfigFitConfig(unsigned int npar = 0)
ROOT::Fit::FitConfigFitConfig(const ROOT::Fit::FitConfig& rhs)
const string&MinimizerAlgoType() const
ROOT::Math::MinimizerOptions&MinimizerOptions()
const string&MinimizerType() const
boolMinosErrors() const
const vector<unsigned int>&MinosParams() const
boolNormalizeErrors() const
unsigned intNPar() const
ROOT::Fit::FitConfig&operator=(const ROOT::Fit::FitConfig& rhs)
boolParabErrors() const
const vector<ROOT::Fit::ParameterSettings>&ParamsSettings() const
vector<ROOT::Fit::ParameterSettings>&ParamsSettings()
const ROOT::Fit::ParameterSettings&ParSettings(unsigned int i) const
ROOT::Fit::ParameterSettings&ParSettings(unsigned int i)
static voidSetDefaultMinimizer(const char* type, const char* algo = 0)
voidSetFromFitResult(const ROOT::Fit::FitResult& rhs)
voidSetMinimizer(const char* type, const char* algo = 0)
voidSetMinosErrors(bool on = true)
voidSetMinosErrors(const vector<unsigned int>& paramInd)
voidSetNormErrors(bool on = true)
voidSetParabErrors(bool on = true)
voidSetParamsSettings(const vector<ROOT::Fit::ParameterSettings>& pars)
voidSetParamsSettings(unsigned int npar, const double* params, const double* vstep = 0)
voidSetUpdateAfterFit(bool on = true)
voidSetWeightCorrection(bool on = true)
boolUpdateAfterFit() const
boolUseWeightCorrection() const

Data Members

private:
ROOT::Math::MinimizerOptionsfMinimizerOptsminimizer control parameters including name and algo type
boolfMinosErrorsdo full error analysis using Minos
vector<unsigned int>fMinosParamsvector with the parameter indeces for running Minos
boolfNormErrorsflag for error normalization
boolfParabErrorsget correct parabolic errors estimate (call Hesse after minimizing)
vector<ROOT::Fit::ParameterSettings>fSettingsvector with the parameter settings
boolfUpdateAfterFitupdate the configuration after a fit using the result
boolfWeightCorrapply correction to errors for weights fits

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

FitConfig(unsigned int npar = 0)
      Default constructor

FitConfig(const ROOT::Fit::FitConfig& rhs)
     Copy constructor

~FitConfig()
      Destructor

FitConfig & operator=(const ROOT::Fit::FitConfig& rhs)
     Assignment operator

const ParameterSettings & ParSettings(unsigned int i) const
      get the parameter settings for the i-th parameter (const method)

{ return fSettings.at(i); }
ParameterSettings & ParSettings(unsigned int i)
      get the parameter settings for the i-th parameter (non-const method)

{ return fSettings.at(i); }
const std::vector<ROOT::Fit::ParameterSettings> & ParamsSettings() const
      get the vector of parameter settings  (const method)

{ return fSettings; }
std::vector<ROOT::Fit::ParameterSettings> & ParamsSettings()
      get the vector of parameter settings  (non-const method)

{ return fSettings; }
unsigned int NPar() const
      number of parameters settings

{ return fSettings.size(); }
void CreateParamsSettings(const ROOT::Math::IParamMultiFunction& func)
      set the parameter settings from a model function.
      Create always new parameter setting list from a given model function

void SetParamsSettings(unsigned int npar, const double* params, const double* vstep = 0)
      set the parameter settings from number of parameters and a vector of values and optionally step values. If there are not existing or number of parameters does not match existing one, create a new parameter setting list.

void SetParamsSettings(const vector<ROOT::Fit::ParameterSettings>& pars)
     Set the parameter settings from a vector of parameter settings

void SetFromFitResult(const ROOT::Fit::FitResult& rhs)
     Set the parameter settings from a fit Result

ROOT::Math::Minimizer * CreateMinimizer()
      create a new minimizer according to chosen configuration

void SetMinimizer(const char* type, const char* algo = 0)
      set minimizer type

const std::string & MinimizerType() const
      return type of minimizer package

const std::string & MinimizerAlgoType() const
      return type of minimizer algorithms

bool NormalizeErrors() const
      flag to check if resulting errors are be normalized according to chi2/ndf

{ return fNormErrors; }
bool ParabErrors() const
do analysis for parabolic errors
{ return fParabErrors; }
bool MinosErrors() const
do minos errros analysis on the  parameters
{ return fMinosErrors; }
bool UpdateAfterFit() const
Update configuration after a fit using the FitResult
{ return fUpdateAfterFit; }
bool UseWeightCorrection() const
Apply Weight correction for error matrix computation
{ return fWeightCorr; }
const std::vector<unsigned int> & MinosParams() const
 return vector of parameter indeces for which the Minos Error will be computed
{ return fMinosParams; }
void SetNormErrors(bool on = true)
      set the option to normalize the error on the result  according to chi2/ndf

{ fNormErrors= on; }
void SetParabErrors(bool on = true)
set parabolic erros
{ fParabErrors = on; }
void SetMinosErrors(bool on = true)
set Minos erros computation to be performed after fitting
{ fMinosErrors = on; }
void SetWeightCorrection(bool on = true)
apply the weight correction for error matric computation
{ fWeightCorr = on; }
void SetMinosErrors(const vector<unsigned int>& paramInd)
 set parameter indeces for running Minos
 this can be used for running Minos on a subset of parameters - otherwise is run on all of them
 if MinosErrors() is set
void SetUpdateAfterFit(bool on = true)
Update configuration after a fit using the FitResult
{ fUpdateAfterFit = on; }
void SetDefaultMinimizer(const char* type, const char* algo = 0)
      static function to control default minimizer type and algorithm