ROOT » HIST » HIST » TF2

class TF2: public TF1


 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

Function Members (Methods)

public:
virtual~TF2()
voidTObject::AbstractMethod(const char* method) const
static voidTF1::AbsValue(Bool_t reject = kTRUE)
virtual voidTF1::AddParameter(const TString& name, Double_t value)
virtual Bool_tTF1::AddToGlobalList(Bool_t on = kTRUE)
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTF1::Browse(TBrowser* b)
static voidTF1::CalcGaussLegendreSamplingPoints(Int_t num, Double_t* x, Double_t* w, Double_t eps = 3.0E-11)
virtual Double_tTF1::CentralMoment(Double_t n, Double_t a, Double_t b, const Double_t* params = 0, Double_t epsilon = 9.9999999999999995E-7)
virtual Double_tCentralMoment2(Double_t nx, Double_t ax, Double_t bx, Double_t ny, Double_t ay, Double_t by, Double_t epsilon = 9.9999999999999995E-7)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidCopy(TObject& f2) const
virtual Double_tCovariance2XY(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t epsilon = 9.9999999999999995E-7)
virtual TH1*CreateHistogram()
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Double_tTF1::Derivative(Double_t x, Double_t* params = 0, Double_t epsilon = 0.001) const
virtual Double_tTF1::Derivative2(Double_t x, Double_t* params = 0, Double_t epsilon = 0.001) const
virtual Double_tTF1::Derivative3(Double_t x, Double_t* params = 0, Double_t epsilon = 0.001) const
static Double_tTF1::DerivativeError()
Int_tTAttLine::DistancetoLine(Int_t px, Int_t py, Double_t xp1, Double_t yp1, Double_t xp2, Double_t yp2)
virtual Int_tDistancetoPrimitive(Int_t px, Int_t py)
virtual voidDraw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual TF1*DrawCopy(Option_t* option = "") const
virtual TObject*DrawDerivative(Option_t* = "al")
virtual voidTF1::DrawF1(Double_t xmin, Double_t xmax, Option_t* option = "")
virtual TObject*DrawIntegral(Option_t* = "al")
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual Double_tTF1::Eval(Double_t x, Double_t y = 0, Double_t z = 0, Double_t t = 0) const
virtual Double_tTF1::EvalPar(const Double_t* x, const Double_t* params = 0)
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual voidTNamed::FillBuffer(char*& buffer)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual voidTF1::FixParameter(Int_t ipar, Double_t value)
Double_tTF1::GetChisquare() const
virtual Int_tGetContour(Double_t* levels = 0)
virtual Double_tGetContourLevel(Int_t level) const
static TF1*TF1::GetCurrent()
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual TStringTF1::GetExpFormula(Option_t* option = "") const
virtual Color_tTAttFill::GetFillColor() const
virtual Style_tTAttFill::GetFillStyle() const
virtual TFormula*TF1::GetFormula()
virtual const TFormula*TF1::GetFormula() const
virtual TH1*TF1::GetHistogram() const
virtual const char*TObject::GetIconName() const
virtual const TObject*TF1::GetLinearPart(Int_t i) const
virtual Color_tTAttLine::GetLineColor() const
virtual Style_tTAttLine::GetLineStyle() const
virtual Width_tTAttLine::GetLineWidth() const
virtual Color_tTAttMarker::GetMarkerColor() const
virtual Size_tTAttMarker::GetMarkerSize() const
virtual Style_tTAttMarker::GetMarkerStyle() const
virtual Double_tGetMaximum(Double_t* x) const
virtual Double_tTF1::GetMaximumStored() const
virtual Double_tTF1::GetMaximumX(Double_t xmin = 0, Double_t xmax = 0, Double_t epsilon = 1.0E-10, Int_t maxiter = 100, Bool_t logx = false) const
virtual Double_tGetMaximumXY(Double_t& x, Double_t& y) const
TMethodCall*TF1::GetMethodCall() const
virtual Double_tGetMinimum(Double_t* x) const
virtual Double_tTF1::GetMinimumStored() const
virtual Double_tTF1::GetMinimumX(Double_t xmin = 0, Double_t xmax = 0, Double_t epsilon = 1.0E-10, Int_t maxiter = 100, Bool_t logx = false) const
virtual Double_tGetMinimumXY(Double_t& x, Double_t& y) const
virtual const char*TNamed::GetName() const
virtual Int_tTF1::GetNDF() const
virtual Int_tTF1::GetNdim() const
virtual Int_tTF1::GetNpar() const
virtual Int_tTF1::GetNpx() const
Int_tGetNpy() const
virtual Int_tTF1::GetNumber() const
virtual Int_tTF1::GetNumberFitPoints() const
virtual Int_tTF1::GetNumberFreeParameters() const
virtual char*GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual Double_tTF1::GetParameter(Int_t ipar) const
virtual Double_tTF1::GetParameter(const TString& name) const
virtual Double_t*TF1::GetParameters() const
virtual voidTF1::GetParameters(Double_t* params)
TObject*TF1::GetParent() const
virtual Double_tTF1::GetParError(Int_t ipar) const
virtual const Double_t*TF1::GetParErrors() const
virtual voidTF1::GetParLimits(Int_t ipar, Double_t& parmin, Double_t& parmax) const
virtual const char*TF1::GetParName(Int_t ipar) const
virtual Int_tTF1::GetParNumber(const char* name) const
virtual Double_tTF1::GetProb() const
virtual Int_tTF1::GetQuantiles(Int_t nprobSum, Double_t* q, const Double_t* probSum)
virtual Double_tGetRandom()
virtual Double_tGetRandom(Double_t xmin, Double_t xmax)
virtual voidGetRandom2(Double_t& xrandom, Double_t& yrandom)
virtual voidGetRange(Double_t& xmin, Double_t& ymin, Double_t& xmax, Double_t& ymax) const
virtual voidGetRange(Double_t& xmin, Double_t& ymin, Double_t& zmin, Double_t& xmax, Double_t& ymax, Double_t& zmax) const
virtual Double_tGetSave(const Double_t* x)
virtual const char*TNamed::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Double_tTF1::GetVariable(const TString& name)
virtual Double_tTF1::GetX(Double_t y, Double_t xmin = 0, Double_t xmax = 0, Double_t epsilon = 1.0E-10, Int_t maxiter = 100, Bool_t logx = false) const
TAxis*TF1::GetXaxis() const
virtual Double_tTF1::GetXmax() const
virtual Double_tTF1::GetXmin() const
TAxis*TF1::GetYaxis() const
virtual Double_tGetYmax() const
virtual Double_tGetYmin() const
TAxis*TF1::GetZaxis() const
virtual Double_tTF1::GradientPar(Int_t ipar, const Double_t* x, Double_t eps = 0.01)
virtual voidTF1::GradientPar(const Double_t* x, Double_t* grad, Double_t eps = 0.01)
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTF1::InitArgs(const Double_t* x, const Double_t* params)
static voidTF1::InitStandardFunctions()
virtual voidTObject::Inspect() constMENU
virtual Double_tIntegral(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t epsrel = 9.9999999999999995E-7)
virtual Double_tTF1::IntegralError(Double_t a, Double_t b, const Double_t* params = 0, const Double_t* covmat = 0, Double_t epsilon = 0.01)
virtual Double_tTF1::IntegralError(Int_t n, const Double_t* a, const Double_t* b, const Double_t* params = 0, const Double_t* covmat = 0, Double_t epsilon = 0.01)
virtual Double_tTF1::IntegralFast(Int_t num, Double_t* x, Double_t* w, Double_t a, Double_t b, Double_t* params = 0, Double_t epsilon = 9.9999999999999998E-13)
virtual Double_tTF1::IntegralMultiple(Int_t n, const Double_t* a, const Double_t* b, Double_t epsrel, Double_t& relerr)
virtual Double_tTF1::IntegralMultiple(Int_t n, const Double_t* a, const Double_t* b, Int_t maxpts, Double_t epsrel, Double_t epsabs, Double_t& relerr, Int_t& nfnevl, Int_t& ifail)
virtual Double_tTF1::IntegralMultiple(Int_t n, const Double_t* a, const Double_t* b, Int_t, Int_t maxpts, Double_t epsrel, Double_t& relerr, Int_t& nfnevl, Int_t& ifail)
virtual Double_tTF1::IntegralOneDim(Double_t a, Double_t b, Double_t epsrel, Double_t epsabs, Double_t& err)
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTF1::IsEvalNormalized() const
virtual Bool_tTObject::IsFolder() const
virtual Bool_tIsInside(const Double_t* x) const
virtual Bool_tTF1::IsLinear() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTNamed::IsSortable() const
virtual Bool_tTAttFill::IsTransparent() const
virtual Bool_tTF1::IsValid() const
Bool_tTObject::IsZombie() const
virtual voidTNamed::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Double_tTF1::Mean(Double_t a, Double_t b, const Double_t* params = 0, Double_t epsilon = 9.9999999999999995E-7)
virtual Double_tMean2X(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t epsilon = 9.9999999999999995E-7)
virtual Double_tMean2Y(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t epsilon = 9.9999999999999995E-7)
virtual voidTAttLine::Modify()
virtual Double_tTF1::Moment(Double_t n, Double_t a, Double_t b, const Double_t* params = 0, Double_t epsilon = 9.9999999999999995E-7)
virtual Double_tMoment2(Double_t nx, Double_t ax, Double_t bx, Double_t ny, Double_t ay, Double_t by, Double_t epsilon = 9.9999999999999995E-7)
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
voidTObject::operator delete(void* ptr)
voidTObject::operator delete(void* ptr, void* vp)
voidTObject::operator delete[](void* ptr)
voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
virtual Double_tTF1::operator()(const Double_t* x, const Double_t* params = 0)
virtual Double_tTF1::operator()(Double_t x, Double_t y = 0, Double_t z = 0, Double_t t = 0) const
TF2&operator=(const TF2& rhs)
virtual voidPaint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTF1::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
static Bool_tTF1::RejectedPoint()
static voidTF1::RejectPoint(Bool_t reject = kTRUE)
virtual voidTF1::ReleaseParameter(Int_t ipar)
virtual voidTAttFill::ResetAttFill(Option_t* option = "")
virtual voidTAttLine::ResetAttLine(Option_t* option = "")
virtual voidTAttMarker::ResetAttMarker(Option_t* toption = "")
voidTObject::ResetBit(UInt_t f)
virtual voidSave(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTAttFill::SaveFillAttributes(ostream& out, const char* name, Int_t coldef = 1, Int_t stydef = 1001)
virtual voidTAttLine::SaveLineAttributes(ostream& out, const char* name, Int_t coldef = 1, Int_t stydef = 1, Int_t widdef = 1)
virtual voidTAttMarker::SaveMarkerAttributes(ostream& out, const char* name, Int_t coldef = 1, Int_t stydef = 1, Int_t sizdef = 1)
virtual voidSavePrimitive(ostream& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTF1::SetChisquare(Double_t chi2)
virtual voidSetContour(Int_t nlevels = 20, const Double_t* levels = 0)
virtual voidSetContourLevel(Int_t level, Double_t value)
static voidTF1::SetCurrent(TF1* f1)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
virtual voidTAttFill::SetFillAttributes()MENU
virtual voidTAttFill::SetFillColor(Color_t fcolor)
virtual voidTAttFill::SetFillColorAlpha(Color_t fcolor, Float_t falpha)
virtual voidTAttFill::SetFillStyle(Style_t fstyle)
virtual voidTF1::SetFitResult(const ROOT::Fit::FitResult& result, const Int_t* indpar = 0)
virtual voidTAttLine::SetLineAttributes()MENU
virtual voidTAttLine::SetLineColor(Color_t lcolor)
virtual voidTAttLine::SetLineColorAlpha(Color_t lcolor, Float_t lalpha)
virtual voidTAttLine::SetLineStyle(Style_t lstyle)
virtual voidTAttLine::SetLineWidth(Width_t lwidth)
virtual voidTAttMarker::SetMarkerAttributes()MENU
virtual voidTAttMarker::SetMarkerColor(Color_t mcolor = 1)
virtual voidTAttMarker::SetMarkerColorAlpha(Color_t mcolor, Float_t malpha)
virtual voidTAttMarker::SetMarkerSize(Size_t msize = 1)
virtual voidTAttMarker::SetMarkerStyle(Style_t mstyle = 1)
virtual voidTF1::SetMaximum(Double_t maximum = -1111)MENU
virtual voidTF1::SetMinimum(Double_t minimum = -1111)MENU
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
virtual voidTF1::SetNDF(Int_t ndf)
virtual voidTF1::SetNormalized(Bool_t flag)
virtual voidTF1::SetNpx(Int_t npx = 100)MENU
virtual voidSetNpy(Int_t npy = 100)MENU
virtual voidTF1::SetNumberFitPoints(Int_t npfits)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTF1::SetParameter(Int_t param, Double_t value)
virtual voidTF1::SetParameter(const TString& name, Double_t value)
virtual voidTF1::SetParameters(const Double_t* params)
virtual voidTF1::SetParameters(Double_t p0, Double_t p1, Double_t p2 = 0, Double_t p3 = 0, Double_t p4 = 0, Double_t p5 = 0, Double_t p6 = 0, Double_t p7 = 0, Double_t p8 = 0, Double_t p9 = 0, Double_t p10 = 0)MENU
virtual voidTF1::SetParent(TObject* p = 0)
virtual voidTF1::SetParError(Int_t ipar, Double_t error)
virtual voidTF1::SetParErrors(const Double_t* errors)
virtual voidTF1::SetParLimits(Int_t ipar, Double_t parmin, Double_t parmax)
virtual voidTF1::SetParName(Int_t ipar, const char* name)
virtual voidTF1::SetParNames(const char* name0 = "p0", const char* name1 = "p1", const char* name2 = "p2", const char* name3 = "p3", const char* name4 = "p4", const char* name5 = "p5", const char* name6 = "p6", const char* name7 = "p7", const char* name8 = "p8", const char* name9 = "p9", const char* name10 = "p10")MENU
virtual voidSetRange(Double_t xmin, Double_t xmax)
virtual voidSetRange(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax)MENU
virtual voidSetRange(Double_t xmin, Double_t ymin, Double_t zmin, Double_t xmax, Double_t ymax, Double_t zmax)
virtual voidTF1::SetSavedPoint(Int_t point, Double_t value)
virtual voidTF1::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp) const
virtual Int_tTNamed::Sizeof() const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
TF2()
TF2(const TF2& f2)
TF2(const char* name, const char* formula, Double_t xmin = 0, Double_t xmax = 1, Double_t ymin = 0, Double_t ymax = 1)
TF2(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, Int_t npar = 0, Int_t ndim = 2)
TF2(const char* name, Double_t(*)(const Double_t*,const Double_t*) fcn, Double_t xmin = 0, Double_t xmax = 1, Double_t ymin = 0, Double_t ymax = 1, Int_t npar = 0, Int_t ndim = 2)
TF2(const char* name, ROOT::Math::ParamFunctor f, Double_t xmin = 0, Double_t xmax = 1, Double_t ymin = 0, Double_t ymax = 1, Int_t npar = 0, Int_t ndim = 2)
virtual voidTF1::Update()
virtual voidTObject::UseCurrentStyle()
virtual Double_tTF1::Variance(Double_t a, Double_t b, const Double_t* params = 0, Double_t epsilon = 9.9999999999999995E-7)
virtual Double_tVariance2X(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t epsilon = 9.9999999999999995E-7)
virtual Double_tVariance2Y(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t epsilon = 9.9999999999999995E-7)
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual TH1*TF1::DoCreateHistogram(Double_t xmin, Double_t xmax, Bool_t recreate = kFALSE)
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTF1::DoInitialize()
virtual Double_tFindMinMax(Double_t* x, bool findmax) const
virtual Double_tTF1::GetMinMaxNDim(Double_t* x, Bool_t findmax, Double_t epsilon = 0, Int_t maxiter = 0) const
voidTF1::IntegrateForNormalization()
voidTObject::MakeZombie()

Data Members

public:
static TObject::(anonymous)TObject::kBitMask
static TObject::EStatusBitsTObject::kCanDelete
static TObject::EStatusBitsTObject::kCannotPick
static TObject::EStatusBitsTObject::kHasUUID
static TObject::EStatusBitsTObject::kInvalidObject
static TObject::(anonymous)TObject::kIsOnHeap
static TObject::EStatusBitsTObject::kIsReferenced
static TObject::EStatusBitsTObject::kMustCleanup
static TObject::EStatusBitsTObject::kNoContextMenu
static TObject::(anonymous)TObject::kNotDeleted
static TF1::(anonymous)TF1::kNotDraw
static TObject::EStatusBitsTObject::kObjInCanvas
static TObject::(anonymous)TObject::kOverwrite
static TObject::(anonymous)TObject::kSingleKey
static TObject::(anonymous)TObject::kWriteDelete
static TObject::(anonymous)TObject::kZombie
protected:
vector<Double_t>TF1::fAlpha!Array alpha. for each bin in x the deconvolution r of fIntegral
vector<Double_t>TF1::fBeta!Array beta. is approximated by x = alpha +beta*r *gamma*r**2
Double_tTF1::fChisquareFunction fit chisquare
TArrayDfContourArray to display contour levels
Color_tTAttFill::fFillColorfill area color
Style_tTAttFill::fFillStylefill area style
TFormula*TF1::fFormulaPointer to TFormula in case when user define formula
ROOT::Math::ParamFunctorTF1::fFunctor! Functor object to wrap any C++ callable object
vector<Double_t>TF1::fGamma!Array gamma.
TH1*TF1::fHistogram!Pointer to histogram used for visualisation
vector<Double_t>TF1::fIntegral!Integral of function binned on fNpx bins
Color_tTAttLine::fLineColorline color
Style_tTAttLine::fLineStyleline style
Width_tTAttLine::fLineWidthline width
Color_tTAttMarker::fMarkerColorMarker color index
Size_tTAttMarker::fMarkerSizeMarker size
Style_tTAttMarker::fMarkerStyleMarker style
Double_tTF1::fMaximumMaximum value for plotting
TMethodCall*TF1::fMethodCall!Pointer to MethodCall in case of interpreted function
Double_tTF1::fMinimumMinimum value for plotting
Int_tTF1::fNDFNumber of degrees of freedom in the fit
TStringTNamed::fNameobject identifier
Int_tTF1::fNdimFunction dimension
Double_tTF1::fNormIntegralIntegral of the function before being normalized
Bool_tTF1::fNormalizedNormalization option (false by default)
Int_tTF1::fNparNumber of parameters
Int_tTF1::fNpfitsNumber of points used in the fit
Int_tTF1::fNpxNumber of points used for the graphical representation
Int_tfNpyNumber of points along y used for the graphical representation
vector<Double_t>TF1::fParErrorsArray of errors of the fNpar parameters
vector<Double_t>TF1::fParMaxArray of upper limits of the fNpar parameters
vector<Double_t>TF1::fParMinArray of lower limits of the fNpar parameters
TF1Parameters*TF1::fParamsPointer to Function parameters object (exusts only for not-formula functions)
TObject*TF1::fParent!Parent object hooking this function (if one)
vector<Double_t>TF1::fSaveArray of fNsave function values
TStringTNamed::fTitleobject title
Int_tTF1::fType(=0 for standard functions, 1 if pointer to function)
Double_tTF1::fXmaxUpper bounds for the range
Double_tTF1::fXminLower bounds for the range
Double_tfYmaxUpper bound for the range in y
Double_tfYminLower bound for the range in y
static Bool_tTF1::fgAbsValueuse absolute value of function when computing integral
static Bool_tTF1::fgAddToGlobListTrue if we want to register the function in the global list
static TF1*TF1::fgCurrentpointer to current function being processed
static Bool_tTF1::fgRejectPointTrue if point must be rejected in a fit
static TF1::(anonymous)TF1::kNotGlobal

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TF2()
F2 default constructor*-*-*-*-*-*-
*-*                  ======================
TF2(const char* name, const char* formula, Double_t xmin = 0, Double_t xmax = 1, Double_t ymin = 0, Double_t ymax = 1)
 F2 constructor using a formula definition

  See TFormula constructor for explanation of the formula syntax.

  if formula has the form "fffffff;xxxx;yyyy", it is assumed that
  the formula string is "fffffff" and "xxxx" and "yyyy" are the
  titles for the X and Y axis respectively.
TF2(const char *name, Double_t (*fcn)(Double_t *, Double_t *), Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Int_t npar, Int_t ndim)
-*-*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.
-
*-* WARNING! A function created with this constructor cannot be Cloned.
-
-
TF2(const char *name, Double_t (*fcn)(const Double_t *, const Double_t *), Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Int_t npar, Int_t ndim)
-*-*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.
-
*-* WARNING! A function created with this constructor cannot be Cloned.
-
-
TF2(const char* name, ROOT::Math::ParamFunctor f, Double_t xmin = 0, Double_t xmax = 1, Double_t ymin = 0, Double_t ymax = 1, Int_t npar = 0, Int_t ndim = 2)
*-*-*-*-*-*-*F2 constructor using a ParamFunctor,
*-*          a functor class implementing operator() (double *, double *)
-
*-*   npar is the number of free parameters used by the function
-
*-* WARNING! A function created with this constructor cannot be Cloned.
-
TF2& operator=(const TF2& rhs)
 Operator =
~TF2()
F2 default destructor*-*-*-*-*-*-
*-*                  =====================
TF2(const TF2& f2)
 Copy constructor.
void Copy(TObject& f2) const
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.
*
TF1 * DrawCopy(Option_t* option = "") const
-*-*-*-*-*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 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
-
*
Int_t GetContour(Double_t* levels = 0)
Return contour values into array levels*-*-
*-*            =======================================
-
*-*  The number of contour levels can be returned by getContourLevel
-
*
Double_t GetContourLevel(Int_t level) const
Return the number of contour levels*-*-*-*-*-
*-*            ===================================
Double_t FindMinMax(Double_t* x, bool findmax) const
 return minimum/maximum value of the function
 To find the minimum on a range, first set this range via the SetRange function
 If a vector x of coordinate is passed it will be used as starting point for the minimum.
 In addition on exit x will contain the coordinate values at the minimuma
 If x is NULL or x is inifinity or NaN, first, a grid search is performed to find the initial estimate of the
 minimum location. The range of the function is divided into fNpx and fNpy
 sub-ranges. If the function is "good" (or "bad"), these values can be changed
 by SetNpx and SetNpy functions
 Then, a minimization is used with starting values found by the grid search
 The minimizer algorithm used (by default Minuit) can be changed by callinga
  ROOT::Math::Minimizer::SetDefaultMinimizerType("..")
 Other option for the minimizer can be set using the static method of the MinimizerOptions class
Double_t GetMinimumXY(Double_t& x, Double_t& y) const
 Compute the X and Y values corresponding to the minimum value of the function
 Return the minimum value of the function
 To find the minimum on a range, first set this range via the SetRange function
 Method:
   First, a grid search is performed to find the initial estimate of the
   minimum location. The range of the function is divided into fNpx and fNpy
   sub-ranges. If the function is "good" (or "bad"), these values can be changed
   by SetNpx and SetNpy functions
   Then, a minimization is used with starting values found by the grid search
   The minimizer algorithm used (by default Minuit) can be changed by callinga
   ROOT::Math::Minimizer::SetDefaultMinimizerType("..")
   Other option for the minimizer can be set using the static method of the MinimizerOptions class

   Note that this method will always do first a grid search in contrast to GetMinimum
Double_t GetMaximumXY(Double_t& x, Double_t& y) const
 Compute the X and Y values corresponding to the maximum value of the function
 Return the maximum value of the function
  See TF2::GetMinimumXY
Double_t GetMinimum(Double_t* x) const
 return minimum/maximum value of the function
 To find the minimum on a range, first set this range via the SetRange function
 If a vector x of coordinate is passed it will be used as starting point for the minimum.
 In addition on exit x will contain the coordinate values at the minimuma
 If x is NULL or x is inifinity or NaN, first, a grid search is performed to find the initial estimate of the
 minimum location. The range of the function is divided into fNpx and fNpy
 sub-ranges. If the function is "good" (or "bad"), these values can be changed
 by SetNpx and SetNpy functions
 Then, a minimization is used with starting values found by the grid search
 The minimizer algorithm used (by default Minuit) can be changed by callinga
  ROOT::Math::Minimizer::SetDefaultMinimizerType("..")
 Other option for the minimizer can be set using the static method of the MinimizerOptions class
Double_t GetMaximum(Double_t* x) const
 return maximum value of the function
 See TF2::GetMinimum
char * GetObjectInfo(Int_t px, Int_t py) const
   Redefines TObject::GetObjectInfo.
   Displays the function value
   corresponding to cursor position px,py

Double_t GetRandom()
Return a random number following this function shape*-
*-*        ====================================================
-
Double_t GetRandom(Double_t xmin, Double_t xmax)
Return a random number following this function shape*-
*-*        ====================================================
-
void GetRandom2(Double_t& xrandom, Double_t& yrandom)
Return 2 random numbers following this function shape
*-*        =====================================================
-
*-*   The distribution contained in this TF2 function is integrated
*-*   over the cell contents.
*-*   It is normalized to 1.
*-*   Getting the two 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
-
-
*-*  IMPORTANT NOTE
*-*  The integral of the function is computed at fNpx * fNpy points.
*-*  If the function has sharp peaks, you should increase the number of
*-*  points (SetNpx, SetNpy) such that the peak is correctly tabulated
*-*  at several points.
void GetRange(Double_t& xmin, Double_t& ymin, Double_t& xmax, Double_t& ymax) const
Return range of a 2-D function*-*-
*-*                  ==============================
void GetRange(Double_t& xmin, Double_t& ymin, Double_t& zmin, Double_t& xmax, Double_t& ymax, Double_t& zmax) const
Return range of function*-*-*-*-
*-*                  ========================
Double_t GetSave(const Double_t* x)
 Get value corresponding to X in array of fSave values
Double_t Integral(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t epsrel = 9.9999999999999995E-7)
 Return Integral of a 2d function in range [ax,bx],[ay,by]
 with desired relative accuracy (default value of eps is 1.e-9)

Bool_t IsInside(const Double_t* x) const
 Return kTRUE is the point is inside the function range
TH1* CreateHistogram()
 Create a histogram from function.
 always created it, even if it is already existing
void Paint(Option_t* option = "")
-*-*-*-*Paint this 2-D function with its current attributes
*-*              ===================================================
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
void SavePrimitive(ostream& out, Option_t* option = "")
 Save primitive as a C++ statement(s) on output stream out
void SetContour(Int_t nlevels = 20, const Double_t* levels = 0)
Set the number and values of contour levels*-
*-*            ===========================================

  By default the number of contour levels is set to 20.

  if argument levels = 0 or missing, equidistant contours are computed

void SetContourLevel(Int_t level, Double_t value)
Set value for one contour level*-
*-*                  ===============================
void SetNpy(Int_t npy = 100)
 Set the number of points used to draw the function

 The default number of points along x is 30 for 2-d/3-d functions.
 You can increase this value to get a better resolution when drawing
 pictures with sharp peaks or to get a better result when using TF2::GetRandom2
 the minimum number of points is 4, the maximum is 10000 for 2-d/3-d functions
void SetRange(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax)
-*-*Initialize the upper and lower bounds to draw the function
*-*        ==========================================================
void Streamer(TBuffer& )
 Stream an object of class TF2.
Double_t Moment2(Double_t nx, Double_t ax, Double_t bx, Double_t ny, Double_t ay, Double_t by, Double_t epsilon = 9.9999999999999995E-7)
 Return x^nx * y^ny moment of a 2d function in range [ax,bx],[ay,by]
   Author: Gene Van Buren <gene@bnl.gov>
Double_t CentralMoment2(Double_t nx, Double_t ax, Double_t bx, Double_t ny, Double_t ay, Double_t by, Double_t epsilon = 9.9999999999999995E-7)
 Return x^nx * y^ny central moment of a 2d function in range [ax,bx],[ay,by]
   Author: Gene Van Buren <gene@bnl.gov>
void SetRange(Double_t xmin, Double_t xmax)
{ TF1::SetRange(xmin, xmax); }
void SetRange(Double_t xmin, Double_t ymin, Double_t zmin, Double_t xmax, Double_t ymax, Double_t zmax)
{ SetRange(xmin, ymin, xmax, ymax); }
TObject * DrawDerivative(Option_t* = "al")
{return 0;}
TObject * DrawIntegral(Option_t* = "al")
virtual void     DrawF2(const char *formula, Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Option_t *option="");
{return 0;}
Int_t GetNpy() const
{return fNpy;}
Double_t GetYmin() const
{return fYmin;}
Double_t GetYmax() const
{return fYmax;}
Double_t Mean2X(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t epsilon = 9.9999999999999995E-7)
{return Moment2(1,ax,bx,0,ay,by,epsilon);}
Double_t Mean2Y(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t epsilon = 9.9999999999999995E-7)
{return Moment2(0,ax,bx,1,ay,by,epsilon);}
Double_t Variance2X(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t epsilon = 9.9999999999999995E-7)
{return CentralMoment2(2,ax,bx,0,ay,by,epsilon);}
Double_t Variance2Y(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t epsilon = 9.9999999999999995E-7)
{return CentralMoment2(0,ax,bx,2,ay,by,epsilon);}
Double_t Covariance2XY(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t epsilon = 9.9999999999999995E-7)
{return CentralMoment2(1,ax,bx,1,ay,by,epsilon);}