37 xvalues1[i] = r.
Uniform(0.1, 5);
40 yvalues1[i] = 3 + 2*xvalues1[i] + xvalues1[i]*xvalues1[i] + r.
Gaus();
41 yvalues2[i] = 3 + 2*xvalues2[i] + xvalues2[i]*xvalues2[i] + r.
Gaus()*10;
45 yvalues3[i] = 3 + 2*xvalues3[i] + xvalues3[i]*xvalues3[i] + r.
Gaus()*20;
62 "TMultiGraph of 3 TGraphErrors");
68 "Fitting a MultiGraph of 3 TGraphErrors");
100 for (i=0; i<
n; i++) {
101 xvalues1[i] = r.
Uniform(-3, -1);
102 xvalues2[i] = r.
Uniform(-1, 1);
106 evalues1[i] = 0.00001;
107 evalues2[i] = 0.00001;
108 evalues3[i] = 0.00001;
112 {xtotal[i]=xvalues1[i]; ytotal[i]=yvalues1[i]; etotal[i]=0.00001;}
113 for (i=n; i<2*
n; i++)
114 {xtotal[i] = xvalues2[i-
n]; ytotal[i]=yvalues2[i-
n]; etotal[i]=0.00001;}
115 for (i=2*n; i<3*
n; i++)
116 {xtotal[i] = xvalues3[i-2*
n]; ytotal[i]=yvalues3[i-2*
n]; etotal[i]=0.00001;}
132 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)
Set the line width.
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.
TF1 * GetFunction(const char *name) const
Return pointer to function with name.
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.
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)
Set the line color.
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
virtual void SetMarkerSize(Size_t msize=1)
Set the marker size.
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.
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.