32 y1[i] = 3 + 2*x1[i] + x1[i]*x1[i] + r.
Gaus();
33 y2[i] = 3 + 2*x2[i] + x2[i]*x2[i] + r.
Gaus()*10;
37 y3[i] = 3 + 2*x3[i] + x3[i]*x3[i] + r.
Gaus()*20;
54 "TMultiGraph of 3 TGraphErrors");
60 "Fitting a MultiGraph of 3 TGraphErrors");
105 {xtotal[i]=x1[i]; ytotal[i]=y1[i]; etotal[i]=0.00001;}
106 for (i=n; i<2*
n; i++)
107 {xtotal[i] = x2[i-
n]; ytotal[i]=y2[i-
n]; etotal[i]=0.00001;}
108 for (i=2*n; i<3*
n; i++)
109 {xtotal[i] = x3[i-2*
n]; ytotal[i]=y3[i-2*
n]; etotal[i]=0.00001;}
125 grtotal->
Fit(
"gaus");
virtual TFitResultPtr Fit(const char *formula, Option_t *option="", Option_t *goption="", Axis_t xmin=0, Axis_t xmax=0)
Fit this graph with function with name fname.
virtual void SetLineWidth(Width_t lwidth)
virtual TFitResultPtr Fit(const char *formula, Option_t *option="", Option_t *goption="", Axis_t xmin=0, Axis_t xmax=0)
Fit this graph with function with name fname.
virtual Double_t Gaus(Double_t mean=0, Double_t sigma=1)
Samples a random number from the standard Normal (Gaussian) Distribution with the given mean and sigm...
A TMultiGraph is a collection of TGraph (or derived) objects.
static const double x2[5]
This is the base class for the ROOT Random number generators.
virtual void SetGrid(Int_t valuex=1, Int_t valuey=1)
virtual void Draw(Option_t *chopt="")
Draw this multigraph with its current attributes.
virtual void SetLineColor(Color_t lcolor)
virtual void SetFillColor(Color_t fcolor)
virtual void SetMarkerStyle(Style_t mstyle=1)
virtual void SetMarkerSize(Size_t msize=1)
Double_t Gaus(Double_t x, Double_t mean=0, Double_t sigma=1, Bool_t norm=kFALSE)
Calculate a gaussian function with mean and sigma.
static const double x1[5]
virtual Double_t Uniform(Double_t x1=1)
Returns a uniform deviate on the interval (0, x1).
A TGraphErrors is a TGraph with error bars.
virtual void Add(TGraph *graph, Option_t *chopt="")
Add a new graph to the list of graphs.
TF1 * GetFunction(const char *name) const
Return pointer to function with name.
static const double x3[11]