57double f(
double *
x,
double *
p) {
67 double par[
NPAR] = { 3.14, 1.};
77 double integral =
fitFunc->Integral(0,1);
79 auto covMatrix = fitResult->GetCovarianceMatrix();
80 std::cout <<
"Covariance matrix from the fit ";
87 std::cout <<
"Integral = " << integral <<
" +/- " <<
sigma_integral
92 double *
p =
fitFunc->GetParameters();
93 double ic =
p[1]* (1-std::cos(
p[0]) )/
p[0];
94 double c0c =
p[1] * (std::cos(
p[0]) +
p[0]*std::sin(
p[0]) -1.)/
p[0]/
p[0];
95 double c1c = (1-std::cos(
p[0]) )/
p[0];
102 std::cout <<
" ERROR: test failed : different analytical integral : "
103 <<
ic <<
" +/- " <<
sic << std::endl;
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
winID h TVirtualViewer3D TVirtualGLPainter p
1-D histogram with a double per channel (see TH1 documentation)
virtual void FillRandom(TF1 *f1, Int_t ntimes=5000, TRandom *rng=nullptr)
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.
void Draw(Option_t *option="") override
Draw this histogram with options.
Double_t Sin(Double_t)
Returns the sine of an angle of x radians.