27double fitf(
double *
x,
double *par)
30 if (par[2] != 0) arg = (
x[0] - par[1])/par[2];
32 double fitval = par[0]*std::exp(-0.5*arg*arg);
42 if (!hsimpleFile)
return;
49 TF1 *func =
new TF1(
"fitf",fitf,-2,2,3);
59 printf(
"Integral of function = %g\n",func->
Integral(-2,2));
TObject * Get(const char *namecycle) override
Return pointer to object identified by namecycle.
virtual Double_t Integral(Double_t a, Double_t b, Double_t epsrel=1.e-12)
IntegralOneDim or analytical integral.
virtual void SetParNames(const char *name0="", const char *name1="", const char *name2="", const char *name3="", const char *name4="", const char *name5="", const char *name6="", const char *name7="", const char *name8="", const char *name9="", const char *name10="")
Set up to 10 parameter names.
virtual void SetParameters(const Double_t *params)
A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
1-D histogram with a float per channel (see TH1 documentation)
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.
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
TString & Append(const char *cs)