52 template <
class PtrObj,
typename MemFn>
60 template <
class PtrObj,
typename MemFn>
70 template <
typename Func>
78 template <
typename Func>
135 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);}
136 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);}
138 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);}
139 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);}
141 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);}
#define ClassDef(name, id)
Param Functor class for Multidimensional functions.
Array of doubles (64 bits per element).
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.
virtual void SetRange(Double_t xmin, Double_t xmax)
Initialize the upper and lower bounds to draw the function.
virtual Double_t Integral(Double_t a, Double_t b, Double_t epsrel=1.e-12)
IntegralOneDim or analytical integral.
virtual void GetRange(Double_t *xmin, Double_t *xmax) const
Return range of a generic N-D function.
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.
A 2-Dim function with parameters.
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 Double_t FindMinMax(Double_t *x, bool findmax) const
Return minimum/maximum value of the function.
virtual Double_t GetMinimum(Double_t *x) const
Return minimum/maximum value of the function.
virtual void Paint(Option_t *option="")
Paint this 2-D function with its current attributes.
virtual void GetRandom2(Double_t &xrandom, Double_t &yrandom, TRandom *rng=nullptr)
Return 2 random numbers following this function shape.
virtual Double_t Mean2X(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t epsilon=0.000001)
virtual Bool_t IsInside(const Double_t *x) const
Return kTRUE is the point is inside the function range.
virtual Double_t Variance2X(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t epsilon=0.000001)
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 void SetNpy(Int_t npy=100)
Set the number of points used to draw the function.
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].
virtual Double_t Mean2Y(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t epsilon=0.000001)
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 Int_t GetContour(Double_t *levels=0)
Return contour values into array levels.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream out.
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 GetYmax() const
virtual Double_t Covariance2XY(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t epsilon=0.000001)
virtual Double_t GetYmin() const
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
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 TObject * DrawIntegral(Option_t *="al")
Draw integral of this function.
virtual Double_t GetSave(const Double_t *x)
Get value corresponding to X in array of fSave values.
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)
TF2 & operator=(const TF2 &rhs)
Operator =.
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 TF1 * DrawCopy(Option_t *option="") const
Draw a copy of this function with its current attributes-*.
virtual TObject * DrawDerivative(Option_t *="al")
Draw derivative of this function.
virtual Double_t Variance2Y(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t epsilon=0.000001)
virtual char * GetObjectInfo(Int_t px, Int_t py) const
Redefines TObject::GetObjectInfo.
Double_t GetRandom(TRandom *rng=nullptr, Option_t *opt=nullptr)
Return a random number following this function shape.
virtual Double_t GetContourLevel(Int_t level) const
Return the number of contour levels.
virtual ~TF2()
F2 default destructor.
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a function.
virtual void Copy(TObject &f2) const
Copy this F2 to a new F2.
virtual void SetRange(Double_t xmin, Double_t xmax)
Initialize the upper and lower bounds to draw the function.
virtual void GetRange(Double_t &xmin, Double_t &ymin, Double_t &xmax, Double_t &ymax) const
Return range of a 2-D function.
virtual void SetContour(Int_t nlevels=20, const Double_t *levels=0)
Set the number and values of contour levels.
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 void SetContourLevel(Int_t level, Double_t value)
Set value for one contour level.
TF2()
TF2 default constructor.
virtual Double_t GetMaximum(Double_t *x) const
Return maximum value of the function See TF2::GetMinimum.
virtual TH1 * CreateHistogram()
Create a histogram from function.
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
TH1 is the base class of all histogram classes in ROOT.
Mother of all ROOT objects.
This is the base class for the ROOT Random number generators.