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
ROOT::Math::IBaseFunctionOneDimROOT::Math::IBaseFunctionOneDim::IBaseFunctionOneDim()
ROOT::Math::IBaseFunctionOneDimROOT::Math::IBaseFunctionOneDim::IBaseFunctionOneDim(const ROOT::Math::IBaseFunctionOneDim&)
ROOT::Math::IBaseParamROOT::Math::IBaseParam::IBaseParam()
ROOT::Math::IBaseParamROOT::Math::IBaseParam::IBaseParam(const ROOT::Math::IBaseParam&)
ROOT::Math::IGradientOneDimROOT::Math::IGradientOneDim::IGradientOneDim()
ROOT::Math::IGradientOneDimROOT::Math::IGradientOneDim::IGradientOneDim(const ROOT::Math::IGradientOneDim&)
ROOT::Math::IParametricFunctionOneDimROOT::Math::IParametricFunctionOneDim::IParametricFunctionOneDim()
ROOT::Math::IParametricFunctionOneDimROOT::Math::IParametricFunctionOneDim::IParametricFunctionOneDim(ROOT::Math::IParametricFunctionOneDim&&)
ROOT::Math::IParametricFunctionOneDimROOT::Math::IParametricFunctionOneDim::IParametricFunctionOneDim(const ROOT::Math::IParametricFunctionOneDim&)
ROOT::Math::IParametricGradFunctionOneDimROOT::Math::IParametricGradFunctionOneDim::IParametricGradFunctionOneDim()
ROOT::Math::IParametricGradFunctionOneDimROOT::Math::IParametricGradFunctionOneDim::IParametricGradFunctionOneDim(const ROOT::Math::IParametricGradFunctionOneDim&)
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
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)
fParams(f.GetParameters(),f.GetParameters()+f.GetNpar())
 constructor from a TF1 function pointer.
WrappedTF1(TF1& f)
fParams(rhs.fParams)
 copy constructor
void ParameterGradient(double x, const double* par, double* grad) const
 evaluate the derivative of the function with respect to the parameters
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
IMPORTANT NOTE: TF1::GradientPar returns 0 for fixed parameters to avoid computing useless derivatives
  BUT the TLinearFitter wants to have the derivatives also for fixed parameters.
  so in case of fLinear (or fPolynomial) a non-zero value will be returned for fixed parameters
void SetDerivPrecision(double eps)
{ fgEps = eps; }
double GetDerivPrecision()
{ return fgEps; }
virtual ~WrappedTF1()
      Destructor (no operations). TF1 Function pointer is not owned

{}
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
 need to call also SetParameters in TF1 in ace some other operations (re-normalizations) are needed
unsigned int NPar() const
 return number of parameters
std::string ParameterName(unsigned int i) const
 return parameter name (this is stored in TF1)
void FdF(double x, double& f, double& deriv) const
 calculate function and derivative at same time (required by IGradient interface)
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 TF1)
 re-implement for better efficiency