13 #ifndef ROOT_Fit_FitConfig 14 #define ROOT_Fit_FitConfig 32 class MinimizerOptions;
85 const std::vector<ROOT::Fit::ParameterSettings> &
ParamsSettings()
const {
return fSettings; }
90 std::vector<ROOT::Fit::ParameterSettings> &
ParamsSettings() {
return fSettings; }
95 unsigned int NPar()
const {
return fSettings.size(); }
100 std::vector<double> ParamsValues()
const;
111 unsigned int npar = func.
NPar();
114 fSettings = std::vector<ParameterSettings>(npar);
119 fSettings.reserve(npar);
120 const double *end = begin + npar;
122 for (
const double *ipar = begin; ipar != end; ++ipar) {
124 double step = 0.3 *
fabs(val);
126 if (val == 0) step = 0.3;
130 std::cout <<
"FitConfig: add parameter " << func.
ParameterName(i) <<
" val = " << val << std::endl;
139 void SetParamsSettings(
unsigned int npar,
const double * params,
const double * vstep = 0);
152 void SetFromFitResult (
const FitResult & rhs);
169 #ifndef __CINT__ // this method fails on Windows 181 if (type) fMinimizerOpts.SetMinimizerType(type);
182 if (algo) fMinimizerOpts.SetMinimizerAlgorithm(algo);
188 const std::string &
MinimizerType()
const {
return fMinimizerOpts.MinimizerType(); }
215 const std::vector<unsigned int> &
MinosParams()
const {
return fMinosParams; }
236 fMinosParams = paramInd;
246 static void SetDefaultMinimizer(
const char * type,
const char * algo = 0);
void SetMinosErrors(const std::vector< unsigned int > ¶mInd)
set parameter indeces for running Minos this can be used for running Minos on a subset of parameters ...
virtual const double * Parameters() const =0
Access the parameter values.
Namespace for new ROOT classes and functions.
void SetUpdateAfterFit(bool on=true)
Update configuration after a fit using the FitResult.
Class, describing value, limits and step size of the parameters Provides functionality also to set/re...
bool NormalizeErrors() const
flag to check if resulting errors are be normalized according to chi2/ndf
const std::vector< unsigned int > & MinosParams() const
return vector of parameter indeces for which the Minos Error will be computed
unsigned int NPar() const
number of parameters settings
ROOT::Math::MinimizerOptions fMinimizerOpts
ROOT::Math::MinimizerOptions & MinimizerOptions()
access to the minimizer control parameter (non const method)
const ParameterSettings & ParSettings(unsigned int i) const
get the parameter settings for the i-th parameter (const method)
void CreateParamsSettings(const ROOT::Math::IParamMultiFunctionTempl< T > &func)
set the parameter settings from a model function.
bool UseWeightCorrection() const
Apply Weight correction for error matrix computation.
Abstract Minimizer class, defining the interface for the various minimizer (like Minuit2, Minuit, GSL, etc..) Plug-in's exist in ROOT to be able to instantiate the derived classes like ROOT::Math::GSLMinimizer or ROOT::Math::Minuit2Minimizer via the plug-in manager.
bool UpdateAfterFit() const
Update configuration after a fit using the FitResult.
bool ParabErrors() const
do analysis for parabolic errors
ParameterSettings & ParSettings(unsigned int i)
get the parameter settings for the i-th parameter (non-const method)
void SetMinosErrors(bool on=true)
set Minos erros computation to be performed after fitting
virtual unsigned int NPar() const =0
Return the number of Parameters.
VecExpr< UnaryOp< Fabs< T >, VecExpr< A, T, D >, T >, T, D > fabs(const VecExpr< A, T, D > &rhs)
void SetMinimizer(const char *type, const char *algo=0)
set minimizer type
const std::vector< ROOT::Fit::ParameterSettings > & ParamsSettings() const
get the vector of parameter settings (const method)
IParamFunction interface (abstract class) describing multi-dimensional parameteric functions It is a ...
class containg the result of the fit and all the related information (fitted parameter values...
void SetWeightCorrection(bool on=true)
apply the weight correction for error matric computation
const std::string & MinimizerType() const
return type of minimizer package
std::vector< ROOT::Fit::ParameterSettings > & ParamsSettings()
get the vector of parameter settings (non-const method)
Namespace for new Math classes and functions.
bool MinosErrors() const
do minos errros analysis on the parameters
void SetParamsSettings(const std::vector< ROOT::Fit::ParameterSettings > &pars)
void SetNormErrors(bool on=true)
set the option to normalize the error on the result according to chi2/ndf
std::vector< ROOT::Fit::ParameterSettings > fSettings
virtual std::string ParameterName(unsigned int i) const
Return the name of the i-th parameter (starting from zero) Overwrite if want to avoid the default nam...
void SetParabErrors(bool on=true)
set parabolic erros
std::vector< unsigned int > fMinosParams
Class describing the configuration of the fit, options and parameter settings using the ROOT::Fit::Pa...
const std::string & MinimizerAlgoType() const
return type of minimizer algorithms