56 template <
class PtrObj,
typename MemFn>
58 TF1(name,p,memFn,xmin,xmax,npar,ndim),
59 fYmin(ymin), fYmax(ymax), fNpy(30), fContour(0)
64 template <
class PtrObj,
typename MemFn>
66 TF1(name,p,memFn,xmin,xmax,npar,2),
67 fYmin(ymin), fYmax(ymax), fNpy(30), fContour(0)
74 template <
typename Func>
76 TF1(name,f,xmin,xmax,npar,ndim),
77 fYmin(ymin), fYmax(ymax), fNpy(30), fContour(0)
82 template <
typename Func>
84 TF1(name,f,xmin,xmax,npar,2),
85 fYmin(ymin), fYmax(ymax), fNpy(30), fContour(0)
139 virtual Double_t Mean2X(
Double_t ax,
Double_t bx,
Double_t ay,
Double_t by,
Double_t epsilon=0.000001) {
return Moment2(1,ax,bx,0,ay,by,
epsilon);}
140 virtual Double_t Mean2Y(
Double_t ax,
Double_t bx,
Double_t ay,
Double_t by,
Double_t epsilon=0.000001) {
return Moment2(0,ax,bx,1,ay,by,
epsilon);}
142 virtual Double_t Variance2X(
Double_t ax,
Double_t bx,
Double_t ay,
Double_t by,
Double_t epsilon=0.000001) {
return CentralMoment2(2,ax,bx,0,ay,by,
epsilon);}
143 virtual Double_t Variance2Y(
Double_t ax,
Double_t bx,
Double_t ay,
Double_t by,
Double_t epsilon=0.000001) {
return CentralMoment2(0,ax,bx,2,ay,by,
epsilon);}
145 virtual Double_t Covariance2XY(
Double_t ax,
Double_t bx,
Double_t ay,
Double_t by,
Double_t epsilon=0.000001) {
return CentralMoment2(1,ax,bx,1,ay,by,
epsilon);}
157 {
SetRange(xmin, ymin, xmax, ymax); }
virtual Double_t GetMaximum(Double_t xmin=0, Double_t xmax=0, Double_t epsilon=1.E-10, Int_t maxiter=100, Bool_t logx=false) const
Returns the maximum value of the function.
virtual void Draw(Option_t *option="")
Draw this function with its current attributes.
virtual Double_t GetContourLevel(Int_t level) const
Return the number of contour levels.
virtual Double_t Moment2(Double_t nx, Double_t ax, Double_t bx, Double_t ny, Double_t ay, Double_t by, Double_t epsilon=0.000001)
Return x^nx * y^ny moment of a 2d function in range [ax,bx],[ay,by].
TF2(const char *name, const PtrObj &p, MemFn memFn, Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Int_t npar, Int_t ndim=2)
virtual Double_t GetMinimum(Double_t *x) const
Return minimum/maximum value of the function.
virtual void SetRange(Double_t xmin, Double_t xmax)
Initialize the upper and lower bounds to draw the function.
TF2(const char *name, Func f, Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Int_t npar, Int_t ndim=2)
virtual void GetRange(Double_t &xmin, Double_t &ymin, Double_t &xmax, Double_t &ymax) const
Return range of a 2-D function.
virtual Double_t GetYmax() const
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a function.
virtual Double_t Integral(Double_t a, Double_t b, Double_t epsrel=1.e-12)
IntegralOneDim or analytical integral.
virtual Bool_t IsInside(const Double_t *x) const
Return kTRUE is the point is inside the function range.
virtual Double_t Integral(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t epsrel=1.e-6)
Return Integral of a 2d function in range [ax,bx],[ay,by] with desired relative accuracy (default val...
virtual Double_t Mean2X(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t epsilon=0.000001)
virtual void SetContourLevel(Int_t level, Double_t value)
Set value for one contour level.
virtual Double_t GetYmin() const
#define ClassDef(name, id)
virtual void Copy(TObject &f2) const
Copy this F2 to a new F2.
virtual char * GetObjectInfo(Int_t px, Int_t py) const
Redefines TObject::GetObjectInfo.
virtual Double_t GetMaximumXY(Double_t &x, Double_t &y) const
Compute the X and Y values corresponding to the maximum value of the function.
virtual TH1 * CreateHistogram()
Create a histogram from function.
virtual Double_t Variance2X(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t epsilon=0.000001)
virtual Int_t GetContour(Double_t *levels=0)
Return contour values into array levels.
virtual Double_t GetMinimum(Double_t xmin=0, Double_t xmax=0, Double_t epsilon=1.E-10, Int_t maxiter=100, Bool_t logx=false) const
Returns the minimum value of the function on the (xmin, xmax) interval.
IParamFunction interface (abstract class) describing multi-dimensional parameteric functions It is a ...
virtual Double_t Variance2Y(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t epsilon=0.000001)
Double_t GetRandom()
Return a random number following this function shape.
TF2()
TF2 default constructor.
virtual Double_t FindMinMax(Double_t *x, bool findmax) const
Return minimum/maximum value of the function.
virtual ~TF2()
F2 default destructor.
virtual Double_t Covariance2XY(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t epsilon=0.000001)
virtual void SetNpy(Int_t npy=100)
Set the number of points used to draw the function.
A 2-Dim function with parameters.
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
TF2 & operator=(const TF2 &rhs)
Operator =.
virtual void SetRange(Double_t xmin, Double_t xmax)
Initialize the upper and lower bounds to draw the function.
virtual void GetRandom2(Double_t &xrandom, Double_t &yrandom)
Return 2 random numbers following this function shape.
virtual TF1 * DrawCopy(Option_t *option="") const
Draw a copy of this function with its current attributes-*.
virtual void SetContour(Int_t nlevels=20, const Double_t *levels=0)
Set the number and values of contour levels.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
virtual void Paint(Option_t *option="")
Paint this 2-D function with its current attributes.
Array of doubles (64 bits per element).
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream out.
Mother of all ROOT objects.
TF2(const char *name, const PtrObj &p, MemFn memFn, Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Int_t npar, const char *, const char *)
backward compatible ctor
virtual Double_t Mean2Y(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t epsilon=0.000001)
TF2(const char *name, Func f, Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Int_t npar, const char *)
backward compatible ctor
double f2(const double *x)
virtual void GetRange(Double_t *xmin, Double_t *xmax) const
Return range of a generic N-D function.
virtual Double_t GetSave(const Double_t *x)
Get value corresponding to X in array of fSave values.
Param Functor class for Multidimensional functions.
virtual TObject * DrawIntegral(Option_t *="al")
Draw integral of this function.
virtual Double_t GetMaximum(Double_t *x) const
Return maximum value of the function See TF2::GetMinimum.
virtual Double_t GetMinimumXY(Double_t &x, Double_t &y) const
Compute the X and Y values corresponding to the minimum value of the function.
virtual void Save(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax)
Save values of function in array fSave.
virtual Double_t CentralMoment2(Double_t nx, Double_t ax, Double_t bx, Double_t ny, Double_t ay, Double_t by, Double_t epsilon=0.000001)
Return x^nx * y^ny central moment of a 2d function in range [ax,bx],[ay,by].
virtual TObject * DrawDerivative(Option_t *="al")
Draw derivative of this function.