TF3


class description - source file - inheritance tree

class TF3 : public TF2


    public:
TF3 TF3() TF3 TF3(const char* name, const char* formula, Double_t xmin = 0, Double_t xmax = 1, Double_t ymin = 0, Double_t ymax = 1, Double_t zmin = 0, Double_t zmax = 1) TF3 TF3(const char* name, void* fcn, Double_t xmin = 0, Double_t xmax = 1, Double_t ymin = 0, Double_t ymax = 1, Double_t zmin = 0, Double_t zmax = 1, Int_t npar = 0) TF3 TF3(const char* name, Double_t (*)(Double_t*, Double_t*) fcn, Double_t xmin = 0, Double_t xmax = 1, Double_t ymin = 0, Double_t ymax = 1, Double_t zmin = 0, Double_t zmax = 1, Int_t npar = 0) TF3 TF3(const TF3& f3) virtual void ~TF3() static TClass* Class() virtual void Copy(TObject& f3) virtual Int_t DistancetoPrimitive(Int_t px, Int_t py) virtual void Draw(Option_t* option) virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py) Int_t GetNpz() virtual void GetRandom3(Double_t& xrandom, Double_t& yrandom, Double_t& zrandom) virtual void GetRange(Double_t& xmin, Double_t& xmax) virtual void GetRange(Double_t& xmin, Double_t& ymin, Double_t& xmax, Double_t& ymax) virtual void GetRange(Double_t& xmin, Double_t& ymin, Double_t& zmin, Double_t& xmax, Double_t& ymax, Double_t& zmax) virtual Double_t GetZmax() virtual Double_t GetZmin() virtual Double_t Integral(Double_t a, Double_t b, Double_t* params = 0, Double_t epsilon = 0.000001) virtual Double_t Integral(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t epsilon = 0.000001) virtual Double_t Integral(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t az, Double_t bz, Double_t epsilon = 0.000001) virtual TClass* IsA() const virtual void Paint(Option_t* option) virtual void SetNpz(Int_t npz = 30) virtual void SetRange(Double_t xmin, Double_t xmax) virtual void SetRange(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax) virtual void SetRange(Double_t xmin, Double_t ymin, Double_t zmin, Double_t xmax, Double_t ymax, Double_t zmax) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b)

Data Members

protected:
Double_t fZmin Lower bound for the range in z Double_t fZmax Upper bound for the range in z Int_t fNpz Number of points along z used for the graphical representation

Class Description

 a 3-Dim function with parameters


TF3(): TF2()
*-*-*-*-*-*-*-*-*-*-*F3 default constructor*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  ======================

TF3(const char *name,const char *formula, Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax) :TF2(name,formula,xmin,xmax,ymin,ymax)
*-*-*-*-*-*-*F3 constructor using a formula definition*-*-*-*-*-*-*-*-*-*-*
*-*          =========================================
*-*
*-*  See TFormula constructor for explanation of the formula syntax.
*-*
*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

TF3(const char *name,void *fcn, Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax, Int_t npar) :TF2(name,fcn,xmin,xmax,ymin,ymax,npar)
*-*-*-*-*-*-*F3 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.
*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

TF3(const char *name,Double_t (*fcn)(Double_t *, Double_t *), Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax, Int_t npar) :TF2(name,fcn,xmin,xmax,ymin,ymax,npar)
*-*-*-*-*-*-*F3 constructor using a pointer to real function*-*-*-*-*-*-*-*
*-*          ===============================================
*-*
*-*   npar is the number of free parameters used by the function
*-*
*-*  For example, for a 3-dim function with 3 parameters, the user function
*-*      looks like:
*-*    Double_t fun1(Double_t *x, Double_t *par)
*-*        return par[0]*x[2] + par[1]*exp(par[2]*x[0]*x[1]);
*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

~TF3()
*-*-*-*-*-*-*-*-*-*-*F3 default destructor*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  =====================

TF3(const TF3 &f3)

void Copy(TObject &obj)
*-*-*-*-*-*-*-*-*-*-*Copy this F3 to a new F3*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  ========================

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*-*-*-*-*
*-*                  ==============================================

void ExecuteEvent(Int_t event, Int_t px, Int_t py)
*-*-*-*-*-*-*-*-*-*-*Execute action corresponding to one event*-*-*-*
*-*                  =========================================
*-*  This member function is called when a F3 is clicked with the locator
*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

void GetRandom3(Double_t &xrandom, Double_t &yrandom, Double_t &zrandom)
*-*-*-*-*-*Return 3 random numbers following this function shape*-*-*-*-*-*
*-*        =====================================================
*-*
*-*   The distribution contained in this TF3 function is integrated
*-*   over the cell contents.
*-*   It is normalized to 1.
*-*   Getting the three random numbers implies:
*-*     - Generating a random number between 0 and 1 (say r1)
*-*     - Look in which cell in the normalized integral r1 corresponds to
*-*     - make a linear interpolation in the returned cell
*-*

void GetRange(Double_t &xmin, Double_t &ymin, Double_t &zmin, Double_t &xmax, Double_t &ymax, Double_t &zmax)
*-*-*-*-*-*-*-*-*-*-*Return range of function*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  ========================

Double_t Integral(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t az, Double_t bz, Double_t epsilon)
 Return Integral of a 3d function in range [ax,bx],[ay,by],[az,bz]


void Paint(Option_t *)
*-*-*-*-*-*-*-*-*Paint this 2-D function with its current attributes*-*-*-*-*
*-*              ===================================================

void SetNpz(Int_t npz)
*-*-*-*-*-*-*-*Set the number of points used to draw the function*-*-*-*-*-*
*-*            ==================================================

void SetRange(Double_t xmin, Double_t ymin, Double_t zmin, Double_t xmax, Double_t ymax, Double_t zmax)
*-*-*-*-*-*Initialize the upper and lower bounds to draw the function*-*-*-*
*-*        ==========================================================



Inline Functions


              Int_t GetNpz()
               void GetRange(Double_t& xmin, Double_t& ymin, Double_t& xmax, Double_t& ymax)
               void GetRange(Double_t& xmin, Double_t& ymin, Double_t& zmin, Double_t& xmax, Double_t& ymax, Double_t& zmax)
           Double_t GetZmin()
           Double_t GetZmax()
           Double_t Integral(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t epsilon = 0.000001)
           Double_t Integral(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t az, Double_t bz, Double_t epsilon = 0.000001)
               void SetRange(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax)
               void SetRange(Double_t xmin, Double_t ymin, Double_t zmin, Double_t xmax, Double_t ymax, Double_t zmax)
            TClass* Class()
            TClass* IsA() const
               void ShowMembers(TMemberInspector& insp, char* parent)
               void Streamer(TBuffer& b)


Author: Rene Brun 27/10/95
Last update: root/hist:$Name: $:$Id: TF3.cxx,v 1.2 2000/06/13 10:38:11 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


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.