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)))
85 ::Error(
"RFitFuncParsList::SetParameters",
"Mismatch in parameters numbers");
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)"},
225 if (
gPluginMgr->FindHandler(
"ROOT::Math::Minimizer",
"GAlibMin") ) {
229 if (
gPluginMgr->FindHandler(
"ROOT::Math::Minimizer",
"Genetic")) {
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;
Error("WriteTObject","The current directory (%s) is not associated with a file. The object (%s) has not been written.", GetName(), objname)
externTPluginManager * gPluginMgr
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
A log configuration for a channel, e.g.
virtual void SetParError(Int_t ipar, Double_t error)
virtual void GetParLimits(Int_t ipar, Double_t &parmin, Double_t &parmax) const
virtual Int_t GetNpar() const
virtual void SetParLimits(Int_t ipar, Double_t parmin, Double_t parmax)
virtual Double_t GetParError(Int_t ipar) const
virtual const char * GetParName(Int_t ipar) const
virtual void ReleaseParameter(Int_t ipar)
virtual void FixParameter(Int_t ipar, Double_t value)
virtual void SetParameter(Int_t param, Double_t value)
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.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
ROOT::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.
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()