ROOT logo
ROOT » HIST » HIST » ROOT::Math::WrappedTF1

class ROOT::Math::WrappedTF1: public ROOT::Math::IParametricGradFunctionOneDim, public ROOT::Math::IGradientOneDim

Function Members (Methods)

public:
virtual~WrappedTF1()
virtual ROOT::Math::IGenFunction*Clone() const
doubleROOT::Math::IGradientOneDim::Derivative(double x) const
doubleROOT::Math::IGradientOneDim::Derivative(const double* x) const
virtual voidFdF(double x, double& f, double& deriv) const
static doubleGetDerivPrecision()
voidROOT::Math::IGradientOneDim::Gradient(const double* x, double* g) const
virtual unsigned intNPar() const
doubleROOT::Math::IParametricFunctionOneDim::operator()(double x, const double* p) const
doubleROOT::Math::IParametricFunctionOneDim::operator()(const double* x, const double* p) const
ROOT::Math::WrappedTF1&operator=(const ROOT::Math::WrappedTF1& rhs)
doubleROOT::Math::IParametricGradFunctionOneDim::ParameterDerivative(double x, unsigned int ipar = 0) const
doubleROOT::Math::IParametricGradFunctionOneDim::ParameterDerivative(const double* x, unsigned int ipar = 0) const
doubleROOT::Math::IParametricGradFunctionOneDim::ParameterDerivative(double x, const double* p, unsigned int ipar = 0) const
doubleROOT::Math::IParametricGradFunctionOneDim::ParameterDerivative(const double* x, const double* p, unsigned int ipar = 0) const
virtual voidParameterGradient(double x, const double* par, double* grad) const
virtual stringParameterName(unsigned int i) const
virtual const double*Parameters() const
static voidSetDerivPrecision(double eps)
virtual voidSetParameters(const double* p)
ROOT::Math::WrappedTF1WrappedTF1(TF1& f)
ROOT::Math::WrappedTF1WrappedTF1(const ROOT::Math::WrappedTF1& rhs)
private:
virtual doubleDoDerivative(double x) const
virtual doubleDoEval(double x) const
virtual doubleDoEvalPar(double x, const double* p) const
virtual doubleDoParameterDerivative(double x, const double* p, unsigned int ipar) const

Data Members

private:
TF1*fFuncpointer to ROOT function
boolfLinearflag for linear functions
vector<double>fParamscached vector with parameter values
boolfPolynomialflag for polynomial functions
doublefX[1]! cached vector for x value (needed for TF1::EvalPar signature)
static doublefgEpsepsilon used in derivative calculation h ~ eps |x|

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

WrappedTF1(TF1& f)
      constructor from a TF1 function pointer.

virtual ~WrappedTF1()
      Destructor (no operations). TF1 Function pointer is not owned

{}
WrappedTF1(TF1& f)
      Copy constructor

ROOT::Math::IGenFunction * Clone() const
 @name interface inherited from IFunction 

       Clone the wrapper but not the original function

const double * Parameters() const
 @name interface inherited from IParamFunction 
 get the parameter values (return values cachen inside, those inside TF1 might be different)
void SetParameters(const double* p)
 set parameter values (only the cached one in this class,leave unchanges those of TF1)
unsigned int NPar() const
 return number of parameters
std::string ParameterName(unsigned int i) const
 return parameter name (this is stored in TF1)
void ParameterGradient(double x, const double* par, double* grad) const
 evaluate the derivative of the function with respect to the parameters
void FdF(double x, double& f, double& deriv) const
 calculate function and derivative at same time (required by IGradient interface)
void SetDerivPrecision(double eps)
 precision value used for calculating the derivative step-size
 h = eps * |x|. The default is 0.001, give a smaller in case function changes rapidly
double GetDerivPrecision()
 get precision value used for calculating the derivative step-size
double DoEvalPar(double x, const double* p) const
 evaluate function passing coordinates x and vector of parameters
double DoEval(double x) const
 evaluate function using the cached parameter values of this class (not of TF1)
 re-implement for better efficiency
double DoDerivative(double x) const
 return the function derivatives w.r.t. x
double DoParameterDerivative(double x, const double* p, unsigned int ipar) const
 evaluate the derivative of the function with respect to the parameters