35 TF2 *
f2 =
new TF2(
"f2",
"1000*(([0]*sin(x)/x)*([1]*sin(y)/y))+200",
46 z = f2->
Eval(x,y)*(1+rnd);
53 "#splitline{Difference between Original}{#splitline{function and Function}{with noise}}",
56 "#splitline{Difference between Original}{#splitline{function and Delaunay triangles}{interpolation}}",
59 "#splitline{Difference between Original}{function and Minuit fit}",
72 z = f2->
Eval(x,y)*(1+rnd);
81 f2->
SetTitle(
"Original function with Graph2D points on top");
90 dt->
SetTitle(
"Histogram produced with Delaunay interpolation");
94 fit2->
SetTitle(
"Minuit fit result on the Graph2D points");
101 c->
cd(2); h1->
Fit(
"gaus",
"Q") ; h1->
Draw();
102 c->
cd(4); h2->
Fit(
"gaus",
"Q") ; h2->
Draw();
103 c->
cd(6); h3->
Fit(
"gaus",
"Q") ; h3->
Draw();
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
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:
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 Double_t Rndm()
Machine independent random number generator.
virtual void Draw(Option_t *option="")
Draw this histogram with options.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
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.
tomato 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 TObject * FindObject(const char *name) const
search object named name in the list of functions
virtual Double_t Eval(Double_t x, Double_t y=0, Double_t z=0, Double_t t=0) const
Evaluate this function.
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.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
you should not use this method at all Int_t Int_t z
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.
double f2(const double *x)
void SetOptStat(Int_t stat=1)
The type of information printed in the histogram statistics box can be selected via the parameter mod...
THist< 1, double, THistStatContent, THistStatUncertainty > TH1D
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.