Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Fit::FitConfig Class Reference

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

Definition at line 47 of file FitConfig.h.

Public Member Functions

 FitConfig (const FitConfig &rhs)
 
 FitConfig (unsigned int npar=0)
 Default constructor.
 
 ~FitConfig ()
 Destructor.
 
ROOT::Math::MinimizerCreateMinimizer ()
 create a new minimizer according to chosen configuration
 
template<class T >
void CreateParamsSettings (const ROOT::Math::IParamMultiFunctionTempl< T > &func)
 set the parameter settings from a model function.
 
const std::string & MinimizerAlgoType () const
 return type of minimizer algorithms
 
std::string MinimizerName () const
 return Minimizer full name (type / algorithm)
 
ROOT::Math::MinimizerOptionsMinimizerOptions ()
 access to the minimizer control parameter (non const method)
 
const std::string & MinimizerType () const
 return type of minimizer package
 
bool MinosErrors () const
 do minos errros analysis on the parameters
 
const std::vector< unsigned int > & MinosParams () const
 return vector of parameter indeces for which the Minos Error will be computed
 
bool NormalizeErrors () const
 flag to check if resulting errors are be normalized according to chi2/ndf
 
unsigned int NPar () const
 number of parameters settings
 
FitConfigoperator= (const FitConfig &rhs)
 
bool ParabErrors () const
 do analysis for parabolic errors
 
std::vector< ROOT::Fit::ParameterSettings > & ParamsSettings ()
 get the vector of parameter settings (non-const method)
 
const std::vector< ROOT::Fit::ParameterSettings > & ParamsSettings () const
 get the vector of parameter settings (const method)
 
std::vector< doubleParamsValues () const
 return a vector of stored parameter values (i.e initial fit parameters)
 
ParameterSettingsParSettings (unsigned int i)
 get the parameter settings for the i-th parameter (non-const method)
 
const ParameterSettingsParSettings (unsigned int i) const
 get the parameter settings for the i-th parameter (const method)
 
void SetFromFitResult (const FitResult &rhs)
 
void SetMinimizer (const char *type, const char *algo=0)
 set minimizer type
 
void SetMinimizerOptions (const ROOT::Math::MinimizerOptions &minopt)
 set all the minimizer options using class MinimizerOptions
 
void SetMinosErrors (bool on=true)
 set Minos erros computation to be performed after fitting
 
void SetMinosErrors (const std::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 SetNormErrors (bool on=true)
 set the option to normalize the error on the result according to chi2/ndf
 
void SetParabErrors (bool on=true)
 set parabolic erros
 
void SetParamsSettings (const std::vector< ROOT::Fit::ParameterSettings > &pars)
 
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.
 
void SetUpdateAfterFit (bool on=true)
 Update configuration after a fit using the FitResult.
 
void SetWeightCorrection (bool on=true)
 apply the weight correction for error matric computation
 
bool UpdateAfterFit () const
 Update configuration after a fit using the FitResult.
 
bool UseWeightCorrection () const
 Apply Weight correction for error matrix computation.
 

Static Public Member Functions

static void SetDefaultMinimizer (const char *type, const char *algo=0)
 static function to control default minimizer type and algorithm
 

Private Attributes

ROOT::Math::MinimizerOptions fMinimizerOpts
 
bool fMinosErrors
 
std::vector< unsigned intfMinosParams
 
bool fNormErrors
 
bool fParabErrors
 
std::vector< ROOT::Fit::ParameterSettingsfSettings
 
bool fUpdateAfterFit
 
bool fWeightCorr
 

#include <Fit/FitConfig.h>

Constructor & Destructor Documentation

◆ FitConfig() [1/2]

ROOT::Fit::FitConfig::FitConfig ( unsigned int  npar = 0)

Default constructor.

Definition at line 40 of file FitConfig.cxx.

◆ FitConfig() [2/2]

ROOT::Fit::FitConfig::FitConfig ( const FitConfig rhs)

Definition at line 57 of file FitConfig.cxx.

◆ ~FitConfig()

ROOT::Fit::FitConfig::~FitConfig ( )

Destructor.

Definition at line 52 of file FitConfig.cxx.

Member Function Documentation

◆ CreateMinimizer()

ROOT::Math::Minimizer * ROOT::Fit::FitConfig::CreateMinimizer ( )

create a new minimizer according to chosen configuration

Definition at line 173 of file FitConfig.cxx.

◆ CreateParamsSettings()

template<class T >
void ROOT::Fit::FitConfig::CreateParamsSettings ( const ROOT::Math::IParamMultiFunctionTempl< T > &  func)
inline

set the parameter settings from a model function.

Create always new parameter setting list from a given model function

Definition at line 109 of file FitConfig.h.

◆ MinimizerAlgoType()

const std::string & ROOT::Fit::FitConfig::MinimizerAlgoType ( ) const
inline

return type of minimizer algorithms

Definition at line 194 of file FitConfig.h.

◆ MinimizerName()

std::string ROOT::Fit::FitConfig::MinimizerName ( ) const

return Minimizer full name (type / algorithm)

Definition at line 239 of file FitConfig.cxx.

◆ MinimizerOptions()

ROOT::Math::MinimizerOptions & ROOT::Fit::FitConfig::MinimizerOptions ( )
inline

access to the minimizer control parameter (non const method)

Definition at line 167 of file FitConfig.h.

◆ MinimizerType()

const std::string & ROOT::Fit::FitConfig::MinimizerType ( ) const
inline

return type of minimizer package

Definition at line 189 of file FitConfig.h.

◆ MinosErrors()

bool ROOT::Fit::FitConfig::MinosErrors ( ) const
inline

do minos errros analysis on the parameters

Definition at line 210 of file FitConfig.h.

◆ MinosParams()

const std::vector< unsigned int > & ROOT::Fit::FitConfig::MinosParams ( ) const
inline

return vector of parameter indeces for which the Minos Error will be computed

Definition at line 220 of file FitConfig.h.

◆ NormalizeErrors()

bool ROOT::Fit::FitConfig::NormalizeErrors ( ) const
inline

flag to check if resulting errors are be normalized according to chi2/ndf

Definition at line 204 of file FitConfig.h.

◆ NPar()

unsigned int ROOT::Fit::FitConfig::NPar ( ) const
inline

number of parameters settings

Definition at line 96 of file FitConfig.h.

◆ operator=()

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

Definition at line 62 of file FitConfig.cxx.

◆ ParabErrors()

bool ROOT::Fit::FitConfig::ParabErrors ( ) const
inline

do analysis for parabolic errors

Definition at line 207 of file FitConfig.h.

◆ ParamsSettings() [1/2]

std::vector< ROOT::Fit::ParameterSettings > & ROOT::Fit::FitConfig::ParamsSettings ( )
inline

get the vector of parameter settings (non-const method)

Definition at line 91 of file FitConfig.h.

◆ ParamsSettings() [2/2]

const std::vector< ROOT::Fit::ParameterSettings > & ROOT::Fit::FitConfig::ParamsSettings ( ) const
inline

get the vector of parameter settings (const method)

Definition at line 86 of file FitConfig.h.

◆ ParamsValues()

std::vector< double > ROOT::Fit::FitConfig::ParamsValues ( ) const

return a vector of stored parameter values (i.e initial fit parameters)

Definition at line 262 of file FitConfig.cxx.

◆ ParSettings() [1/2]

ParameterSettings & ROOT::Fit::FitConfig::ParSettings ( unsigned int  i)
inline

get the parameter settings for the i-th parameter (non-const method)

Definition at line 81 of file FitConfig.h.

◆ ParSettings() [2/2]

const ParameterSettings & ROOT::Fit::FitConfig::ParSettings ( unsigned int  i) const
inline

get the parameter settings for the i-th parameter (const method)

Definition at line 76 of file FitConfig.h.

◆ SetDefaultMinimizer()

void ROOT::Fit::FitConfig::SetDefaultMinimizer ( const char *  type,
const char *  algo = 0 
)
static

static function to control default minimizer type and algorithm

Definition at line 252 of file FitConfig.cxx.

◆ SetFromFitResult()

void ROOT::Fit::FitConfig::SetFromFitResult ( const FitResult rhs)

Definition at line 80 of file FitConfig.cxx.

◆ SetMinimizer()

void ROOT::Fit::FitConfig::SetMinimizer ( const char *  type,
const char *  algo = 0 
)
inline

set minimizer type

Definition at line 181 of file FitConfig.h.

◆ SetMinimizerOptions()

void ROOT::Fit::FitConfig::SetMinimizerOptions ( const ROOT::Math::MinimizerOptions minopt)

set all the minimizer options using class MinimizerOptions

Definition at line 257 of file FitConfig.cxx.

◆ SetMinosErrors() [1/2]

void ROOT::Fit::FitConfig::SetMinosErrors ( bool  on = true)
inline

set Minos erros computation to be performed after fitting

Definition at line 231 of file FitConfig.h.

◆ SetMinosErrors() [2/2]

void ROOT::Fit::FitConfig::SetMinosErrors ( const std::vector< unsigned int > &  paramInd)
inline

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

Definition at line 239 of file FitConfig.h.

◆ SetNormErrors()

void ROOT::Fit::FitConfig::SetNormErrors ( bool  on = true)
inline

set the option to normalize the error on the result according to chi2/ndf

Definition at line 225 of file FitConfig.h.

◆ SetParabErrors()

void ROOT::Fit::FitConfig::SetParabErrors ( bool  on = true)
inline

set parabolic erros

Definition at line 228 of file FitConfig.h.

◆ SetParamsSettings() [1/2]

void ROOT::Fit::FitConfig::SetParamsSettings ( const std::vector< ROOT::Fit::ParameterSettings > &  pars)
inline

Definition at line 145 of file FitConfig.h.

◆ SetParamsSettings() [2/2]

void ROOT::Fit::FitConfig::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.

Definition at line 135 of file FitConfig.cxx.

◆ SetUpdateAfterFit()

void ROOT::Fit::FitConfig::SetUpdateAfterFit ( bool  on = true)
inline

Update configuration after a fit using the FitResult.

Definition at line 245 of file FitConfig.h.

◆ SetWeightCorrection()

void ROOT::Fit::FitConfig::SetWeightCorrection ( bool  on = true)
inline

apply the weight correction for error matric computation

Definition at line 234 of file FitConfig.h.

◆ UpdateAfterFit()

bool ROOT::Fit::FitConfig::UpdateAfterFit ( ) const
inline

Update configuration after a fit using the FitResult.

Definition at line 213 of file FitConfig.h.

◆ UseWeightCorrection()

bool ROOT::Fit::FitConfig::UseWeightCorrection ( ) const
inline

Apply Weight correction for error matrix computation.

Definition at line 216 of file FitConfig.h.

Member Data Documentation

◆ fMinimizerOpts

ROOT::Math::MinimizerOptions ROOT::Fit::FitConfig::fMinimizerOpts
private

Definition at line 270 of file FitConfig.h.

◆ fMinosErrors

bool ROOT::Fit::FitConfig::fMinosErrors
private

Definition at line 263 of file FitConfig.h.

◆ fMinosParams

std::vector<unsigned int> ROOT::Fit::FitConfig::fMinosParams
private

Definition at line 268 of file FitConfig.h.

◆ fNormErrors

bool ROOT::Fit::FitConfig::fNormErrors
private

Definition at line 261 of file FitConfig.h.

◆ fParabErrors

bool ROOT::Fit::FitConfig::fParabErrors
private

Definition at line 262 of file FitConfig.h.

◆ fSettings

std::vector<ROOT::Fit::ParameterSettings> ROOT::Fit::FitConfig::fSettings
private

Definition at line 267 of file FitConfig.h.

◆ fUpdateAfterFit

bool ROOT::Fit::FitConfig::fUpdateAfterFit
private

Definition at line 264 of file FitConfig.h.

◆ fWeightCorr

bool ROOT::Fit::FitConfig::fWeightCorr
private

Definition at line 265 of file FitConfig.h.

Libraries for ROOT::Fit::FitConfig:

The documentation for this class was generated from the following files: