27 TF2 *
f2 =
new TF2(
"f2",
"1000*(([0]*sin(x)/x)*([1]*sin(y)/y))+200",
38 z = f2->
Eval(x,y)*(1+rnd);
45 "#splitline{Difference between Original}{#splitline{function and Function}{with noise}}",
48 "#splitline{Difference between Original}{#splitline{function and Delaunay triangles}{interpolation}}",
51 "#splitline{Difference between Original}{function and Minuit fit}",
64 z = f2->
Eval(x,y)*(1+rnd);
74 f2->
SetTitle(
"Original function with Graph2D points on top");
83 dt->
SetTitle(
"Histogram produced with Delaunay interpolation");
87 fit2->
SetTitle(
"Minuit fit result on the Graph2D points");
94 c->
cd(2); h1->
Fit(
"gaus",
"Q") ; h1->
Draw();
95 c->
cd(4); h2->
Fit(
"gaus",
"Q") ; h2->
Draw();
96 c->
cd(6); h3->
Fit(
"gaus",
"Q") ; h3->
Draw();
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
virtual TObject * FindObject(const char *name) const
search object named name in the list of functions
virtual void SetParameters(const Double_t *params)
virtual void Draw(Option_t *option="")
Draw this function with its current attributes.
virtual void Draw(Option_t *option="")
Specific drawing options can be used to paint a TGraph2D:
virtual Double_t Rndm(Int_t i=0)
Machine independent random number generator.
R__EXTERN TStyle * gStyle
void SetMargin(Double_t m=0.1)
Sets the extra space (in %) around interpolated area for the 2D histogram.
TVirtualPad * cd(Int_t subpadnumber=0)
Set current canvas & pad.
virtual TFitResultPtr Fit(const char *formula, Option_t *option="", Option_t *goption="")
Fits this graph with function with name fname Predefined functions such as gaus, expo and poln are au...
virtual void SetTitle(const char *title="")
Sets graph title.
This is the base class for the ROOT Random number generators.
virtual void Draw(Option_t *option="")
Draw this histogram with options.
virtual void SetFillColor(Color_t fcolor)
void SetOptFit(Int_t fit=1)
The type of information about fit parameters printed in the histogram statistics box can be selected ...
Double_t Interpolate(Double_t x, Double_t y)
Finds the z value at the position (x,y) thanks to the Delaunay interpolation.
void SetHistTopMargin(Double_t hmax=0.05)
A 2-Dim function with parameters.
1-D histogram with a double per channel (see TH1 documentation)}
virtual void SetMaximum(Double_t maximum=-1111)
Set the maximum value along Y for this function In case the function is already drawn, set also the maximum in the helper histogram.
virtual void SetTitle(const char *title="")
Set function title if title has the form "fffffff;xxxx;yyyy", it is assumed that the function title i...
virtual void SetPoint(Int_t point, Double_t x, Double_t y, Double_t z)
Sets point number n.
virtual void GetRandom2(Double_t &xrandom, Double_t &yrandom)
Return 2 random numbers following this function shape.
virtual void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0)
Automatic pad generation by division.
virtual Double_t Eval(Double_t x, Double_t y=0, Double_t z=0, Double_t t=0) const
Evaluate this function.
void SetOptStat(Int_t stat=1)
The type of information printed in the histogram statistics box can be selected via the parameter mod...
Graphics object made of three arrays X, Y and Z with the same number of points each.
virtual TFitResultPtr Fit(const char *formula, Option_t *option="", Option_t *goption="", Double_t xmin=0, Double_t xmax=0)
Fit histogram with function fname.
void SetPalette(Int_t ncolors=kBird, Int_t *colors=0, Float_t alpha=1.)
See TColor::SetPalette.