39using namespace std::string_literals;
64 auto &par = pars.back();
70 par.min = std::to_string(min);
71 par.max = std::to_string(max);
73 if ((min >= max) && ((min != 0) || (max != 0)))
83 if (func->
GetNpar() != (
int) pars.size()) {
84 ::Error(
"RFitFuncParsList::SetParameters",
"Mismatch in parameters numbers");
90 ::Error(
"RFitFuncParsList::SetParameters",
"Mismatch in parameter %d name %s %s",
n, pars[
n].
name.c_str(), func->
GetParName(
n));
100 double min = std::stod(pars[
n].min);
101 double max = std::stod(pars[
n].max);
120 if (hist && (
fDim > 0)) {
124 if (hist && (
fDim > 1)) {
211 {0,
kFP_MIGRAD,
"MIGRAD"}, {0,
kFP_SIMPLX,
"SIMPLEX"}, {0,
kFP_SCAN,
"SCAN"}, {0,
kFP_COMBINATION,
"Combination"},
212 {1,
kFP_MIGRAD,
"MIGRAD"}, {1,
kFP_SIMPLX,
"SIMPLEX"}, {1,
kFP_FUMILI2,
"FUMILI"}, {1,
kFP_SCAN,
"SCAN"}, {1,
kFP_COMBINATION,
"Combination"},
215 {3,
kFP_GSLFR,
"Fletcher-Reeves conjugate gradient"},
216 {3,
kFP_GSLPR,
"Polak-Ribiere conjugate gradient"},
217 {3,
kFP_BFGS,
"BFGS conjugate gradient"},
218 {3,
kFP_BFGS2,
"BFGS conjugate gradient (Version 2)"},
308 auto checkid = [&](std::string &
id,
const std::string &dflt) {
309 if (!res) {
id.clear();
return; }
311 if (item.key ==
id)
return;
316 for (
unsigned n = 0;
n < res->
NPar(); ++
n)
361 bool fChangedParams =
false;
362 if (fChangedParams) {
364 fChangedParams =
false;
370 fitOpts.
Plus =
false;
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
R__EXTERN TPluginManager * gPluginMgr
A log configuration for a channel, e.g.
class describing the range in the coordinates it supports multiple range in a coordinate.
void AddRange(unsigned int icoord, double xmin, double xmax)
add a range [xmin,xmax] for the new coordinate icoord Adding a range does not delete existing one,...
unsigned int NPar() const
total number of parameters (abbreviation)
std::string ParName(unsigned int i) const
name of the parameter
void SetMaxFunctionCalls(unsigned int maxfcn)
set maximum of function calls
void SetMaxIterations(unsigned int maxiter)
set maximum iterations (one iteration can have many function calls)
void SetMinimizerType(const char *type)
set minimizer type
void SetErrorDef(double err)
set error def
void SetMinimizerAlgorithm(const char *type)
set minimizer algorithm
void SetTolerance(double tol)
set the tolerance
virtual void ReleaseParameter(Int_t ipar)
Release parameter number ipar If used in a fit, the parameter can vary freely.
virtual void SetParError(Int_t ipar, Double_t error)
Set error for parameter number ipar.
virtual void GetParLimits(Int_t ipar, Double_t &parmin, Double_t &parmax) const
Return limits for parameter ipar.
virtual Double_t GetParError(Int_t ipar) const
Return value of parameter number ipar.
virtual Int_t GetNpar() const
virtual const char * GetParName(Int_t ipar) const
virtual void SetParLimits(Int_t ipar, Double_t parmin, Double_t parmax)
Set limits for parameter ipar.
virtual void SetParameter(Int_t param, Double_t value)
virtual void FixParameter(Int_t ipar, Double_t value)
Fix the value of a parameter The specified value will be used in a fit operation.
virtual Double_t GetParameter(Int_t ipar) const
Extends the ROOT::Fit::Result class with a TNamed inheritance providing easy possibility for I/O.
TH1 is the base class of all histogram classes in ROOT.
virtual Int_t GetDimension() const
TAxis * GetXaxis()
Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more informat...
virtual const char * GetName() const
Returns name of object.
TPluginHandler * FindHandler(const char *base, const char *uri=0)
Returns the handler if there exists a handler for the specified URI.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
RLogChannel & FitPanelLog()
Log channel for FitPanel diagnostics.
void Clear()
Clear list of patameters.
std::vector< RFuncPar > pars
parameters
std::string name
display name
void GetParameters(TF1 *f1)
Extract TF1 parameters, used in editor on client sides.
std::string id
function id in the FitPanel
void SetParameters(TF1 *f1)
Set parameters to TF1.
std::string fContourPar1Id
std::vector< RItemInfo > fFuncList
all available fit functions
EFitObjectType fDataType
selected object type, provided by server
RFuncParsList fFuncPars
Parameters.
int fLibrary
selected minimization library
TString GetDrawOption()
Retrun draw option - dummy now.
ROOT::Math::MinimizerOptions GetMinimizerOptions()
Provide initialized ROOT::Math::MinimizerOptions instance.
void Initialize()
Initialize model - set some meaningful default values.
std::vector< RComboBoxItem > fAdvancedPars
std::string fContourPar2Id
std::string fSelectedData
selected data
bool HasFunction(const std::string &id)
Check if function id is exists.
bool fHasAdvanced
Advanced Options.
std::string fSelectedFunc
id of selected fit function like dflt::gaus
void UpdateAdvanced(TFitResult *res)
Update advanced parameters associated with fit function.
void SelectedFunc(const std::string &name, TF1 *func)
Select function.
std::string fSelectedTab
key of selected tab, useful for drawing
void UpdateRange(TH1 *hist)
Update range values.
int fFitMethod
selected fit method
void SetObjectKind(EFitObjectType kind)
Update setting dependent from object type.
Foption_t GetFitOptions()
Provide initialized Foption_t instance.
std::string fContourColor
std::vector< RMinimezerAlgorithm > fMethodMinAll
all items for all methods
std::string fConfidenceColor
Confidence sub-tab.
int fDim
number of dimensions in selected data object
std::vector< RMethodInfo > fFitMethods
all supported for selected data
bool fHasGenetics
is genetics available
int fContourPoints
Contour sub-tab.
ROOT::Fit::DataRange GetRanges()