18 void graph2derrorsfit()
27 TF2 *
f2 =
new TF2(
"f2",
"1000*(([0]*sin(x)/x)*([1]*sin(y)/y))+200",-6,6,-6,6);
33 for (
Int_t i=0; i<nd; i++) {
36 z = f2->
Eval(x,y)*(1+rnd);
48 fit2->
SetTitle(
"Minuit fit result on the Graph2DErrors points");
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
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
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...
This is the base class for the ROOT Random number generators.
virtual void SetPointError(Int_t i, Double_t ex, Double_t ey, Double_t ez)
Set ex, ey and ez values for point number i.
virtual Double_t Rndm()
Machine independent random number generator.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
void SetHistTopMargin(Double_t hmax=0.05)
A 2-Dim function with parameters.
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 i, Double_t x, Double_t y, Double_t z)
Set x, y and z values for point number i.
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
virtual Double_t Uniform(Double_t x1=1)
Returns a uniform deviate on the interval (0, x1).
you should not use this method at all Int_t Int_t z
double f2(const double *x)
Graph 2D class with errors.