TF2
class description - source file - inheritance tree
class TF2 : public TF1
public:
TF2 TF2(char* name, char* formula, Float_t xmin = 0, Float_t xmax = 1, Float_t ymin = 0, Float_t ymax = 1)
TF2 TF2(char* name, void* fcn, Float_t xmin = 0, Float_t xmax = 1, Float_t ymin = 0, Float_t ymax = 1, Int_t npar = 0)
TF2 TF2()
TF2 TF2(char* name, Double_t (*)(Double_t*, Double_t*) fcn, Float_t xmin = 0, Float_t xmax = 1, Float_t ymin = 0, Float_t ymax = 1, Int_t npar = 0)
TF2 TF2(TF2& f2)
virtual void ~TF2()
TClass* Class()
virtual void Copy(TObject& f2)
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
virtual void Draw(Option_t* option)
virtual void DrawCopy(Option_t* option)
virtual void DrawF2(char* formula, Float_t xmin, Float_t xmax, Float_t ymin, Float_t ymax, Option_t* option)
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Int_t GetContour()
Int_t GetNpy()
virtual Double_t GetRandom()
virtual void GetRange(Float_t& xmin, Float_t& xmax)
virtual void GetRange(Float_t& xmin, Float_t& ymin, Float_t& zmin, Float_t& xmax, Float_t& ymax, Float_t& zmax)
virtual void GetRange(Float_t& xmin, Float_t& ymin, Float_t& xmax, Float_t& ymax)
virtual Float_t GetYmax()
virtual Float_t GetYmin()
virtual TClass* IsA()
virtual void Paint(Option_t* option)
virtual void SetContour(Int_t nl = 20)
virtual void SetNpy(Int_t npy = 100)
virtual void SetRange(Float_t xmin, Float_t ymin, Float_t xmax, Float_t ymax)
virtual void SetRange(Float_t xmin, Float_t xmax)
virtual void SetRange(Float_t xmin, Float_t ymin, Float_t zmin, Float_t xmax, Float_t ymax, Float_t zmax)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void Streamer(TBuffer& b)
protected:
Float_t fYmin Lower bound for the range in y
Float_t fYmax Upper bound for the range in y
Int_t fNpy Number of points along y used for the graphical representation
Int_t fNlevels Number of contour levels
See also
-
TF3
a 2-Dim function with parameters
TF2 graphics function is via the TH1 drawing functions.
Example of a function
TF2 *f2 = new TF2("f2","sin(x)*sin(y)/(x*y)",0,5,0,5);
f2->Draw();
/*
*/
See TF1 class for the list of functions formats
TF2(): TF1()
*-*-*-*-*-*-*-*-*-*-*F2 default constructor*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-* ======================
TF2(const char *name,const char *formula, Float_t xmin, Float_t xmax, Float_t ymin, Float_t ymax)
:TF1(name,formula,xmin,xmax)
*-*-*-*-*-*-*F2 constructor using a formula definition*-*-*-*-*-*-*-*-*-*-*
*-* =========================================
*-*
*-* See TFormula constructor for explanation of the formula syntax.
*-*
*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
TF2(const char *name, void *fcn, Float_t xmin, Float_t xmax, Float_t ymin, Float_t ymax, Int_t npar)
: TF1(name, fcn, xmin, xmax, npar)
*-*-*-*-*-*-*F2 constructor using a pointer to an interpreted function*-*-*
*-* =========================================================
*-*
*-* npar is the number of free parameters used by the function
*-*
*-* Creates a function of type C between xmin and xmax and ymin,ymax.
*-* The function is defined with npar parameters
*-* fcn must be a function of type:
*-* Double_t fcn(Double_t *x, Double_t *params)
*-*
*-* This constructor is called for functions of type C by CINT.
*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
TF2(const char *name, Double_t (*fcn)(Double_t *, Double_t *), Float_t xmin, Float_t xmax, Float_t ymin, Float_t ymax, Int_t npar)
: TF1(name, fcn, xmin, xmax, npar)
*-*-*-*-*-*-*F2 constructor using a pointer to a compiled function*-*-*-*-*
*-* =====================================================
*-*
*-* npar is the number of free parameters used by the function
*-*
*-* This constructor creates a function of type C when invoked
*-* with the normal C++ compiler.
*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
~TF2()
*-*-*-*-*-*-*-*-*-*-*F2 default destructor*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-* =====================
TF2(const TF2 &f2)
void Copy(TObject &obj)
*-*-*-*-*-*-*-*-*-*-*Copy this F2 to a new F2*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-* ========================
Int_t DistancetoPrimitive(Int_t px, Int_t py)
*-*-*-*-*-*-*-*-*-*-*Compute distance from point px,py to a function*-*-*-*-*
*-* ===============================================
*-* Compute the closest distance of approach from point px,py to this function.
*-* The distance is computed in pixels units.
*-*
*-* Algorithm:
*-*
*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
void Draw(Option_t *option)
*-*-*-*-*-*-*-*-*-*-*Draw this function with its current attributes*-*-*-*-*
*-* ==============================================
*-* NB. You must use DrawCopy if you want to draw several times the same
*-* function in the current canvas.
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
void DrawCopy(Option_t *option)
*-*-*-*-*-*-*-*Draw a copy of this function with its current attributes*-*-*
*-* ========================================================
*-*
*-* This function MUST be used instead of Draw when you want to draw
*-* the same function with different parameters settings in the same canvas.
*-*
*-* Possible option values are:
*-* "SAME" superimpose on top of existing picture
*-* "L" connect all computed points with a straight line
*-* "C" connect all computed points with a smooth curve.
*-*
*-* Note that the default value is "F". Therefore to draw on top
*-* of an existing picture, specify option "SL"
*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
void DrawF2(const char *formula, Float_t xmin, Float_t ymin, Float_t xmax, Float_t ymax, Option_t *option)
*-*-*-*-*-*-*-*-*-*Draw formula between xmin,ymin and xmax,ymax*-*-*-*-*-*-*-*
*-* ============================================
*-*
void ExecuteEvent(Int_t event, Int_t px, Int_t py)
*-*-*-*-*-*-*-*-*-*-*Execute action corresponding to one event*-*-*-*
*-* =========================================
*-* This member function is called when a F2 is clicked with the locator
*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Double_t GetRandom()
*-*-*-*-*-*Return a random number following this function shape*-*-*-*-*-*-*
*-* ====================================================
*-*
void GetRange(Float_t &xmin, Float_t &ymin, Float_t &xmax, Float_t &ymax)
*-*-*-*-*-*-*-*-*-*-*Return range of a 2-D function*-*-*-*-*-*-*-*-*-*-*-*-*
*-* ==============================
void GetRange(Float_t &xmin, Float_t &ymin, Float_t &zmin, Float_t &xmax, Float_t &ymax, Float_t &zmax)
*-*-*-*-*-*-*-*-*-*-*Return range of function*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-* ========================
void Paint(Option_t *option)
*-*-*-*-*-*-*-*-*Paint this 2-D function with its current attributes*-*-*-*-*
*-* ===================================================
void SetNpy(Int_t npy)
*-*-*-*-*-*-*-*Set the number of points used to draw the function*-*-*-*-*-*
*-* ==================================================
void SetRange(Float_t xmin, Float_t ymin, Float_t xmax, Float_t ymax)
*-*-*-*-*-*Initialize the upper and lower bounds to draw the function*-*-*-*
*-* ==========================================================
Inline Functions
Int_t GetContour()
Int_t GetNpy()
void GetRange(Float_t& xmin, Float_t& ymin, Float_t& zmin, Float_t& xmax, Float_t& ymax, Float_t& zmax)
Float_t GetYmin()
Float_t GetYmax()
void SetContour(Int_t nl = 20)
void SetRange(Float_t xmin, Float_t ymin, Float_t xmax, Float_t ymax)
void SetRange(Float_t xmin, Float_t ymin, Float_t zmin, Float_t xmax, Float_t ymax, Float_t zmax)
TClass* Class()
TClass* IsA()
void ShowMembers(TMemberInspector& insp, char* parent)
void Streamer(TBuffer& b)
Author: Rene Brun 23/08/95
Last update: 1.03/06 24/10/97 09.30.54 by Rene Brun
Copyright (c) 1995-1998, The ROOT System, All rights reserved. *
ROOT page - Class index - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.