13#ifndef ROOT_Fit_FitConfig
14#define ROOT_Fit_FitConfig
33 class MinimizerOptions;
112 unsigned int npar = func.
NPar();
115 fSettings = std::vector<ParameterSettings>(npar);
121 const double *end = begin + npar;
123 for (
const double *ipar = begin; ipar != end; ++ipar) {
125 double step = 0.3 * fabs(val);
127 if (val == 0) step = 0.3;
131 std::cout <<
"FitConfig: add parameter " << func.
ParameterName(i) <<
" val = " << val << std::endl;
140 void SetParamsSettings(
unsigned int npar,
const double * params,
const double * vstep = 0);
Class describing the configuration of the fit, options and parameter settings using the ROOT::Fit::Pa...
const std::vector< unsigned int > & MinosParams() const
return vector of parameter indeces for which the Minos Error will be computed
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 value...
ParameterSettings & ParSettings(unsigned int i)
get the parameter settings for the i-th parameter (non-const method)
bool UpdateAfterFit() const
Update configuration after a fit using the FitResult.
std::vector< unsigned int > fMinosParams
void SetMinosErrors(bool on=true)
set Minos erros computation to be performed after fitting
std::vector< double > ParamsValues() const
return a vector of stored parameter values (i.e initial fit parameters)
const std::string & MinimizerAlgoType() const
return type of minimizer algorithms
std::vector< ROOT::Fit::ParameterSettings > & ParamsSettings()
get the vector of parameter settings (non-const method)
void SetNormErrors(bool on=true)
set the option to normalize the error on the result according to chi2/ndf
void SetParamsSettings(const std::vector< ROOT::Fit::ParameterSettings > &pars)
void SetMinimizer(const char *type, const char *algo=0)
set minimizer type
bool NormalizeErrors() const
flag to check if resulting errors are be normalized according to chi2/ndf
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 ...
bool ParabErrors() const
do analysis for parabolic errors
void SetMinimizerOptions(const ROOT::Math::MinimizerOptions &minopt)
set all the minimizer options using class MinimizerOptions
void SetWeightCorrection(bool on=true)
apply the weight correction for error matric computation
unsigned int NPar() const
number of parameters settings
void SetUpdateAfterFit(bool on=true)
Update configuration after a fit using the FitResult.
std::vector< ROOT::Fit::ParameterSettings > fSettings
std::string MinimizerName() const
return Minimizer full name (type / algorithm)
bool UseWeightCorrection() const
Apply Weight correction for error matrix computation.
const std::vector< ROOT::Fit::ParameterSettings > & ParamsSettings() const
get the vector of parameter settings (const method)
ROOT::Math::MinimizerOptions fMinimizerOpts
ROOT::Math::Minimizer * CreateMinimizer()
create a new minimizer according to chosen configuration
void SetParabErrors(bool on=true)
set parabolic erros
void SetFromFitResult(const FitResult &rhs)
void CreateParamsSettings(const ROOT::Math::IParamMultiFunctionTempl< T > &func)
set the parameter settings from a model function.
static void SetDefaultMinimizer(const char *type, const char *algo=0)
static function to control default minimizer type and algorithm
const std::string & MinimizerType() const
return type of minimizer package
const ParameterSettings & ParSettings(unsigned int i) const
get the parameter settings for the i-th parameter (const method)
FitConfig & operator=(const FitConfig &rhs)
ROOT::Math::MinimizerOptions & MinimizerOptions()
access to the minimizer control parameter (non const method)
bool MinosErrors() const
do minos errros analysis on the parameters
class containg the result of the fit and all the related information (fitted parameter values,...
Class, describing value, limits and step size of the parameters Provides functionality also to set/re...
virtual const double * Parameters() const =0
Access the parameter values.
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...
virtual unsigned int NPar() const =0
Return the number of Parameters.
IParamFunction interface (abstract class) describing multi-dimensional parameteric functions It is a ...
void SetMinimizerType(const char *type)
set minimizer type
const std::string & MinimizerAlgorithm() const
type of algorithm
const std::string & MinimizerType() const
type of minimizer
void SetMinimizerAlgorithm(const char *type)
set minimizer algorithm
Abstract Minimizer class, defining the interface for the various minimizer (like Minuit2,...
RooCmdArg Minimizer(const char *type, const char *alg=0)
TFitResultPtr Fit(FitObject *h1, TF1 *f1, Foption_t &option, const ROOT::Math::MinimizerOptions &moption, const char *goption, ROOT::Fit::DataRange &range)
Namespace for new Math classes and functions.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...