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 =
nullptr);
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void on
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
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 indices for which the Minos Error will be computed
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
vector with the parameter indices for running Minos
void SetMinimizer(const char *type, const char *algo=nullptr)
set minimizer type
void SetMinosErrors(bool on=true)
set Minos erros computation to be performed after fitting
bool fNormErrors
flag for error normalization
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)
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 indices 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 matrix computation
unsigned int NPar() const
number of parameters settings
void SetUpdateAfterFit(bool on=true)
Update configuration after a fit using the FitResult.
void SetParamsSettings(unsigned int npar, const double *params, const double *vstep=nullptr)
set the parameter settings from number of parameters and a vector of values and optionally step value...
std::vector< ROOT::Fit::ParameterSettings > fSettings
vector with the parameter settings
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)
bool fParabErrors
get correct parabolic errors estimate (call Hesse after minimizing)
ROOT::Math::MinimizerOptions fMinimizerOpts
minimizer control parameters including name and algo type
ROOT::Math::Minimizer * CreateMinimizer()
create a new minimizer according to chosen configuration
void SetParabErrors(bool on=true)
set parabolic erros
bool fMinosErrors
do full error analysis using Minos
static void SetDefaultMinimizer(const char *type, const char *algo=nullptr)
static function to control default minimizer type and algorithm
void SetFromFitResult(const FitResult &rhs)
void CreateParamsSettings(const ROOT::Math::IParamMultiFunctionTempl< T > &func)
set the parameter settings from a model function.
const std::string & MinimizerType() const
return type of minimizer package
bool fWeightCorr
apply correction to errors for weights fits
const ParameterSettings & ParSettings(unsigned int i) const
get the parameter settings for the i-th parameter (const method)
bool fUpdateAfterFit
update the configuration after a fit using the result
FitConfig & operator=(const FitConfig &rhs)
ROOT::Math::MinimizerOptions & MinimizerOptions()
access to the minimizer control parameter (non const method)
bool MinosErrors() const
do minos errors analysis on the parameters
class containing 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 parametric functions It is a d...
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=nullptr)
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.
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.