## Function Members (Methods)

public:
private:
 virtual double DoDerivative(double x) const virtual double DoEval(double x) const virtual double DoEvalPar(double x, const double* p) const virtual double DoParameterDerivative(double x, const double* p, unsigned int ipar) const

## Data Members

private:
 TF1* fFunc pointer to ROOT function bool fLinear flag for linear functions vector fParams cached vector with parameter values bool fPolynomial flag for polynomial functions double fX[1] ! cached vector for x value (needed for TF1::EvalPar signature) static double fgEps epsilon used in derivative calculation h ~ eps |x|

## Function documentation

WrappedTF1(TF1& f)
``` constructor from a TF1 function pointer.
```
WrappedTF1(TF1& f)
``` copy constructor
```
``` 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 (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 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 this class (not of TF1)
re-implement for better efficiency
```