16#ifndef ROO_GRAD_MINIMIZER_FCN
17#define ROO_GRAD_MINIMIZER_FCN
45 inline unsigned int NDim()
const override {
return getNDim(); }
71 double DoEval(
const double *
x)
const override;
72 double DoDerivative(
const double *
x,
unsigned int icoord)
const override;
74 double *previous_g2,
double *previous_gstep)
const override;
79 mutable std::vector<ROOT::Minuit2::DerivatorElement>
_grad;
Interface (abstract class) for multi-dimensional functions providing a gradient calculation.
API class for defining three levels of strategies: low (0), medium (1), high (>=2); acts on: Migrad (...
void SetGradTolerance(double value)
void SetErrorLevel(double value)
void SetNCycles(unsigned int value)
void SetStepTolerance(double value)
virtual void constOptimizeTestStatistic(ConstOpCode opcode, Bool_t doAlsoTrackingOpt=kTRUE)
Interface function signaling a request to perform constant term optimization.
unsigned int getNDim() const
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
virtual void enableOffsetting(Bool_t)
void synchronizeGradientParameterSettings(std::vector< ROOT::Fit::ParameterSettings > ¶meter_settings) const
void setErrorLevel(double error_level) const
ROOT::Minuit2::MnStrategy getStrategy() const
double DoDerivativeWithPrevResult(const double *x, unsigned int i_component, double *previous_grad, double *previous_g2, double *previous_gstep) const override
bool none_have_been_calculated
Bool_t Synchronize(std::vector< ROOT::Fit::ParameterSettings > ¶meter_settings, Bool_t optConst, Bool_t verbose=kFALSE) override
Like synchronizeParameterSettings, Synchronize informs Minuit through its parameter_settings vector o...
unsigned int NDim() const override
Retrieve the dimension of the function.
void resetHasBeenCalculatedFlags() const
void setStrategy(int istrat)
void setNcycles(unsigned int ncycles) const
double getErrorDef() const
double DoEval(const double *x) const override
void setOffsetting(Bool_t flag) override
Enable or disable offsetting on the function to be minimized, which enhances numerical precision.
std::string getFunctionName() const override
RooMinimizer sometimes needs the name of the minimized function. Implement this in the derived class.
void setGradTolerance(double grad_tolerance) const
bool returnsInMinuit2ParameterSpace() const override
std::vector< bool > has_been_calculated
void runDerivator(unsigned int i_component) const
std::vector< double > _grad_params
std::string getFunctionTitle() const override
RooMinimizer sometimes needs the title of the minimized function. Implement this in the derived class...
void setStepTolerance(double step_tolerance) const
ROOT::Math::IMultiGradFunction * Clone() const override
Clone a function.
std::vector< ROOT::Minuit2::DerivatorElement > _grad
bool syncParameter(double x, std::size_t ix) const
ROOT::Minuit2::NumericalDerivator _gradf
bool syncParameters(const double *x) const
double DoDerivative(const double *x, unsigned int icoord) const override
void setOptimizeConstOnFunction(RooAbsArg::ConstOpCode opcode, Bool_t doAlsoTrackingOpt) override
This function must be overridden in the derived class to pass on constant term optimization configura...
RooMinimizer is a wrapper class around ROOT::Fit:Fitter that provides a seamless interface between th...
virtual const char * GetTitle() const
Returns title of object.
virtual const char * GetName() const
Returns name of object.