40using namespace std::string_literals;
65 auto &par = pars.back();
71 par.min = std::to_string(min);
72 par.max = std::to_string(max);
74 if ((min >= max) && ((min != 0) || (max != 0)))
84 if (func->
GetNpar() != (
int) pars.size()) {
85 ::Error(
"RFitFuncParsList::SetParameters",
"Mismatch in parameters numbers");
91 ::Error(
"RFitFuncParsList::SetParameters",
"Mismatch in parameter %d name %s %s",
n, pars[
n].
name.c_str(), func->
GetParName(
n));
101 double min = std::stod(pars[
n].min);
102 double max = std::stod(pars[
n].max);
121 if (hist && (
fDim > 0)) {
125 if (hist && (
fDim > 1)) {
212 {0,
kFP_MIGRAD,
"MIGRAD"}, {0,
kFP_SIMPLX,
"SIMPLEX"}, {0,
kFP_SCAN,
"SCAN"}, {0,
kFP_COMBINATION,
"Combination"},
213 {1,
kFP_MIGRAD,
"MIGRAD"}, {1,
kFP_SIMPLX,
"SIMPLEX"}, {1,
kFP_FUMILI2,
"FUMILI"}, {1,
kFP_SCAN,
"SCAN"}, {1,
kFP_COMBINATION,
"Combination"},
216 {3,
kFP_GSLFR,
"Fletcher-Reeves conjugate gradient"},
217 {3,
kFP_GSLPR,
"Polak-Ribiere conjugate gradient"},
218 {3,
kFP_BFGS,
"BFGS conjugate gradient"},
219 {3,
kFP_BFGS2,
"BFGS conjugate gradient (Version 2)"},
309 auto checkid = [&](std::string &
id,
const std::string &dflt) {
310 if (!res) {
id.clear();
return; }
312 if (item.key ==
id)
return;
317 for (
unsigned n = 0;
n < res->
NPar(); ++
n)
362 bool fChangedParams =
false;
363 if (fChangedParams) {
365 fChangedParams =
false;
371 fitOpts.
Plus =
false;
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize id
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
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 during a fit operation.
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 lower and upper 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 for a fit operation The specified value will be used in the fit and the ...
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
const char * GetName() const override
Returns name of object.
TPluginHandler * FindHandler(const char *base, const char *uri=nullptr)
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()