23 "Confidence intervals on the fitted function",1000, 500);
33 for (i=0; i<
ngr; i++){
40 fpol->SetLineWidth(2);
45 grint->SetTitle(
"Fitted line with .95 conf. band");
65 "Fitted Gaussian with .95 conf.band", 100, -3, 3);
66 h->FillRandom(
"gaus",
nh);
67 TF1 *
f =
new TF1(
"fgaus",
"gaus", -3, 3);
74 "Fitted Gaussian with .95 conf.band", 100, -3, 3);
78 hint->SetStats(
false);
79 hint->SetFillColor(2);
80 hint->Draw(
"e3 same");
87 gr2->SetName(
"Graph2DNoError");
89 "1000*(([0]*sin(x)/x)*([1]*sin(y)/y))+250",-6,6,-6,6);
91 for (i=0; i<
ngr2; i++){
96 gr2->SetPoint(i,
x,
y,z);
100 for (i=0; i<
ngr2; i++)
118 grint2->SetMarkerStyle(24);
119 grint2->SetMarkerSize(0.7);
123 grint2->SetTitle(
"Fitted 2d function with .95 error bars");
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
R__EXTERN TRandom * gRandom
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
virtual void SetMarkerSize(Size_t msize=1)
Set the marker size.
virtual void SetNpx(Int_t npx=100)
Set the number of points used to draw the function.
virtual void SetParameters(const Double_t *params)
virtual Double_t Eval(Double_t x, Double_t y=0, Double_t z=0, Double_t t=0) const
Evaluate this function.
A 2-Dim function with parameters.
virtual void GetRandom2(Double_t &xrandom, Double_t &yrandom, TRandom *rng=nullptr)
Return 2 random numbers following this function shape.
virtual void SetNpy(Int_t npy=100)
Set the number of points used to draw the function.
void Draw(Option_t *option="") override
Draw this function with its current attributes.
Graph 2D class with errors.
Graphics object made of three arrays X, Y and Z with the same number of points each.
A TGraphErrors is a TGraph with error bars.
A TGraph is an object made of two arrays X and Y with npoints each.
virtual void SetPoint(Int_t i, Double_t x, Double_t y)
Set x and y values for point number i.
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.
void SetName(const char *name="") override
Set graph name.
void Draw(Option_t *chopt="") override
Draw this graph with its current attributes.
1-D histogram with a double per channel (see TH1 documentation)
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...
Double_t Rndm() override
Machine independent random number generator.
virtual Double_t Uniform(Double_t x1=1)
Returns a uniform deviate on the interval (0, x1).
static TVirtualFitter * GetFitter()
static: return the current Fitter
bool GetConfidenceIntervals(const TH1 *h1, const ROOT::Fit::FitResult &r, TGraphErrors *gr, double cl=0.95)
compute confidence intervals at level cl for a fitted histogram h1 in a TGraphErrors gr