66 GFunc(
const TF1*
function ,
double y ):fFunction(
function), fY0(y) {}
68 return fFunction->
Eval(x) - fY0;
76 GInverseFunc(
const TF1*
function):fFunction(
function) {}
79 return - fFunction->Eval(x);
83 class GInverseFuncNdim {
86 GInverseFuncNdim(
TF1*
function):fFunction(
function) {}
89 return - fFunction->EvalPar(x, (
Double_t*)0);
105 fFunc->InitArgs(fX, fPar);
106 if (par) fFunc->SetParameters(par);
111 TF1_EvalWrapper * f =
new TF1_EvalWrapper( *
this);
112 f->fFunc->InitArgs(f->fX, f->fPar);
119 Double_t fval = fFunc->EvalPar( fX, 0);
120 if (fAbsVal && fval < 0)
return -fval;
126 return fX[0] *
TMath::Abs( fFunc->EvalPar( fX, 0) );
386 TF1 *TF1::fgCurrent = 0;
394 fXmin(0), fXmax(0), fNpar(0), fNdim(0),
396 fNpfits(0), fNDF(0), fChisquare(0),
397 fMinimum(-1111), fMaximum(-1111),
398 fParent(0), fHistogram(0),
399 fMethodCall(0), fNormalized(
false), fNormIntegral(0),
400 fFormula(0), fParams(0)
423 fNpfits(0), fNDF(0), fChisquare(0),
424 fMinimum(-1111), fMaximum(-1111),
425 fParent(0), fHistogram(0),
426 fMethodCall(0), fNormalized(
false), fNormIntegral(0),
427 fFormula(0), fParams(0)
445 if (
fNdim > 1 && xmin < xmax) {
446 Error(
"TF1",
"function: %s/%s has dimension %d instead of 1",name,formula,
fNdim);
468 fXmin(xmin), fXmax(xmax),
469 fNpar(npar), fNdim(ndim),
471 fNpfits(0), fNDF(0), fChisquare(0),
472 fMinimum(-1111), fMaximum(-1111),
473 fParErrors(std::vector<
Double_t>(npar)),
474 fParMin(std::vector<
Double_t>(npar)),
475 fParMax(std::vector<
Double_t>(npar)),
476 fParent(0), fHistogram(0),
477 fMethodCall(0), fNormalized(
false), fNormIntegral(0),
482 Info(
"TF1",
"TF1 has name * - it is not well defined");
486 Error(
"TF1",
"requires a proper function name!");
494 Error(
"TF1",
"No function found with the signature %s(Double_t*,Double_t*)",name);
517 fXmin(xmin), fXmax(xmax),
518 fNpar(npar), fNdim(ndim),
520 fNpfits(0), fNDF(0), fChisquare(0),
521 fMinimum(-1111), fMaximum(-1111),
522 fParErrors(std::vector<
Double_t>(npar)),
523 fParMin(std::vector<
Double_t>(npar)),
524 fParMax(std::vector<
Double_t>(npar)),
525 fParent(0), fHistogram(0),
527 fNormalized(
false), fNormIntegral(0),
528 fFunctor(ROOT::Math::ParamFunctor(
fcn)),
551 fXmin(xmin), fXmax(xmax),
552 fNpar(npar), fNdim(ndim),
554 fNpfits(0), fNDF(0), fChisquare(0),
555 fMinimum(-1111), fMaximum(-1111),
556 fParErrors(std::vector<
Double_t>(npar)),
557 fParMin(std::vector<
Double_t>(npar)),
558 fParMax(std::vector<
Double_t>(npar)),
559 fParent(0), fHistogram(0),
561 fNormalized(
false), fNormIntegral(0),
562 fFunctor(ROOT::Math::ParamFunctor(
fcn)),
583 fXmin(xmin), fXmax(xmax),
584 fNpar(npar), fNdim(ndim),
586 fNpfits(0), fNDF(0), fChisquare(0),
587 fMinimum(-1111), fMaximum(-1111),
588 fParErrors(std::vector<
Double_t>(npar)),
589 fParMin(std::vector<
Double_t>(npar)),
590 fParMax(std::vector<
Double_t>(npar)),
591 fParent(0), fHistogram(0),
593 fNormalized(
false), fNormIntegral(0),
594 fFunctor(ROOT::Math::ParamFunctor(f)),
615 gROOT->GetListOfFunctions()->Remove(f1old);
616 gROOT->GetListOfFunctions()->Add(
this);
632 if (!
gROOT)
return false;
638 assert (
gROOT->GetListOfFunctions()->FindObject(
this) !=
nullptr);
644 gROOT->GetListOfFunctions()->Add(
this);
646 else if (prevStatus) {
650 Warning(
"AddToGlobalList",
"Function is supposed to be in the global list but it is not present");
653 gROOT->GetListOfFunctions()->Remove(
this);
682 if (
gROOT)
gROOT->GetListOfFunctions()->Remove(
this);
696 fXmin(0), fXmax(0), fNpar(0), fNdim(0),
698 fNpfits(0), fNDF(0), fChisquare(0),
699 fMinimum(-1111), fMaximum(-1111),
700 fParent(0), fHistogram(0),
702 fNormalized(
false), fNormIntegral(0),
703 fFormula(0), fParams(0)
705 ((
TF1&)f1).Copy(*
this);
738 delete ((
TF1&)obj).fHistogram;
739 delete ((
TF1&)obj).fMethodCall;
763 ((
TF1&)obj).fHistogram = 0;
764 ((
TF1&)obj).fMethodCall = 0;
767 ((
TF1&)obj).fFormula = 0;
776 ((
TF1&)obj).fMethodCall =
m;
781 if (formulaToCopy)
delete formulaToCopy;
784 ((
TF1&)obj).fFormula = formulaToCopy;
788 if (paramsToCopy) *paramsToCopy = *
fParams;
832 Warning(
"Derivative",
"Function dimension is larger than one");
840 if ( h <= 0 ) h = 0.001;
854 gErrorTF1 = rd.
Error();
898 Warning(
"Derivative2",
"Function dimension is larger than one");
906 if ( h <= 0 ) h = 0.001;
920 gErrorTF1 = rd.
Error();
964 Warning(
"Derivative3",
"Function dimension is larger than one");
972 if ( h <= 0 ) h = 0.001;
986 gErrorTF1 = rd.
Error();
1018 if (distance <= 1)
return distance;
1025 xx[0] =
gPad->PadtoX(x);
1110 if (padsav) padsav->
cd();
1135 if (padsav) padsav->
cd();
1168 ((
TF1*)
this)->InitArgs(xx,pp);
1170 return ((
TF1*)
this)->EvalPar(xx,pp);
1243 if (!
gPad->GetView()) {
1255 if (ipar < 0 || ipar >
GetNpar()-1)
return;
1280 const_cast<TF1*
>(
this)->
fHistogram = const_cast<TF1*>(
this)->CreateHistogram();
1306 if (xmin >= xmax) {xmin =
fXmin; xmax =
fXmax;}
1308 if (!logx &&
gPad != 0) logx =
gPad->GetLogx();
1311 GInverseFunc
g(
this);
1316 bm.
Minimize(maxiter, epsilon, epsilon );
1344 if (xmin >= xmax) {xmin =
fXmin; xmax =
fXmax;}
1346 if (!logx &&
gPad != 0) logx =
gPad->GetLogx();
1349 GInverseFunc
g(
this);
1354 bm.
Minimize(maxiter, epsilon, epsilon );
1382 if (xmin >= xmax) {xmin =
fXmin; xmax =
fXmax;}
1384 if (!logx &&
gPad != 0) logx =
gPad->GetLogx();
1391 bm.
Minimize(maxiter, epsilon, epsilon );
1410 Error(
"GetMinimumNDim",
"Function of dimension 0 - return Eval(x)");
1411 return (const_cast<TF1&>(*
this))(
x);
1420 Error(
"GetMinimumNDim",
"Error creating minimizer %s",minimName);
1431 GInverseFuncNdim invFunc(const_cast<TF1*>(
this));
1438 std::vector<double> rmin(ndim);
1439 std::vector<double> rmax(ndim);
1441 for (
int i = 0; i < ndim; ++i) {
1442 const char * xname = 0;
1443 double stepSize = 0.1;
1445 if (rmax[i] > rmin[i])
1446 stepSize = (rmax[i] - rmin[i])/100;
1448 stepSize = 0.1*x[i];
1467 if (rmin[i] < rmax[i] ) {
1478 Error(
"GetMinimumNDim",
"Error minimizing function %s",
GetName() );
1480 if (min->
X() ) std::copy (min->
X(), min->
X()+ndim,
x);
1484 return (findmax) ? -fmin : fmin;
1510 if (xmin >= xmax) {xmin =
fXmin; xmax =
fXmax;}
1517 bm.
Minimize(maxiter, epsilon, epsilon );
1547 if (xmin >= xmax) {xmin =
fXmin; xmax =
fXmax;}
1549 if (!logx &&
gPad != 0) logx =
gPad->GetLogx();
1557 brf.
Solve(maxiter, epsilon, epsilon);
1583 for (
Int_t i=0;i<nfree;i++) {
1584 ((
TF1*)
this)->GetParLimits(i,al,bl);
1585 if (al*bl != 0 && al >= bl) nfree--;
1598 static char info[64];
1600 snprintf(info,64,
"(x=%g, f=%g)",x,((
TF1*)
this)->
Eval(x));
1610 if (ipar < 0 || ipar >
GetNpar()-1)
return 0;
1624 if (ipar < 0 || ipar > n-1)
return;
1635 if (
fNDF <= 0)
return 0;
1677 const Double_t dx = (xMax-xMin)/npx;
1685 Int_t intNegative = 0;
1687 for (i = 0; i < npx; i++) {
1689 if (integ < 0) {intNegative++; integ = -integ;}
1690 integral[i+1] = integral[i] + integ;
1693 if (intNegative > 0)
1694 Warning(
"GetQuantiles",
"function:%s has %d negative values: abs assumed",
1696 if (integral[npx] == 0) {
1697 Error(
"GetQuantiles",
"Integral of function is zero");
1702 for (i = 1; i <= npx; i++) integral[i] /= total;
1706 for (i = 0; i < npx; i++) {
1708 const Double_t r2 = integral[i+1]-integral[i];
1710 gamma[i] = (2*r2-4*
r1)/(dx*dx);
1711 beta[i] = r2/dx-gamma[i]*dx;
1718 for (i = 0; i < nprobSum; i++) {
1727 const Double_t rr = r-integral[bin];
1730 const Double_t fac = -2.*gamma[bin]*rr/beta[bin]/beta[bin];
1731 if (fac != 0 && fac <= 1)
1732 xx = (-beta[bin]+
TMath::Sqrt(beta[bin]*beta[bin]+2*gamma[bin]*rr))/gamma[bin];
1733 else if (beta[bin] != 0.)
1735 q[i] = alpha[bin]+xx;
1738 if (integral[bin+1] == r) q[i] += dx;
1777 Int_t intNegative = 0;
1783 if (xmin > 0 && xmax/xmin> fNpx) {
1789 dx = (xmax-
xmin)/fNpx;
1792 for (i=0;i<
fNpx;i++) {
1796 for (i=0;i<
fNpx;i++) {
1802 if (integ < 0) {intNegative++; integ = -integ;}
1805 if (intNegative > 0) {
1806 Warning(
"GetRandom",
"function:%s has %d negative values: abs assumed",
GetName(),intNegative);
1810 Error(
"GetRandom",
"Integral of function is zero");
1814 for (i=1;i<=
fNpx;i++) {
1821 for (i=0;i<
fNpx;i++) {
1890 Int_t intNegative = 0;
1892 for (i=0;i<
fNpx;i++) {
1894 if (integ < 0) {intNegative++; integ = -integ;}
1897 if (intNegative > 0) {
1898 Warning(
"GetRandom",
"function:%s has %d negative values: abs assumed",
GetName(),intNegative);
1901 Error(
"GetRandom",
"Integral of function is zero");
1905 for (i=1;i<=
fNpx;i++) {
1912 for (i=0;i<
fNpx;i++) {
1929 if(nbinmax>fNpx) nbinmax=
fNpx;
1946 }
while(x<xmin || x>xmax);
1957 double xmin = 0,
ymin = 0, zmin = 0, xmax = 0,
ymax = 0, zmax = 0;
1959 for (
int i = 0; i < ndim; ++i) {
1967 rmin[2] = zmin; rmax[2] = zmax;
2018 if (
fSave.size() == 0)
return 0;
2020 int fNsave =
fSave.size();
2026 xmin =
fSave[fNsave-3];
2027 xmax =
fSave[fNsave-2];
2028 if (
fSave[fNsave-1] == xmax) {
2037 ylow =
fSave[bin-bin1];
2038 yup =
fSave[bin-bin1+1];
2042 ylow =
fSave[bin-bin1-1];
2043 yup =
fSave[bin-bin1];
2046 y = ((xup*ylow-xlow*yup) + x*(yup-ylow))/dx;
2053 dx = (xmax-
xmin)/np;
2054 if (x < xmin || x > xmax)
return 0;
2057 if (dx <= 0)
return 0;
2060 xlow = xmin + bin*dx;
2064 y = ((xup*ylow-xlow*yup) + x*(yup-ylow))/dx;
2121 if(eps< 1e-10 || eps > 1) {
2122 Warning(
"Derivative",
"parameter esp=%g out of allowed range[1e-10,1], reset to 0.01",eps);
2137 ((
TF1*)
this)->GetParLimits(ipar,al,bl);
2138 if (al*bl != 0 && al >= bl) {
2151 parameters[ipar] = par0 +
h; f1 = func->
EvalPar(x,parameters);
2152 parameters[ipar] = par0 -
h; f2 = func->
EvalPar(x,parameters);
2153 parameters[ipar] = par0 + h/2; g1 = func->
EvalPar(x,parameters);
2154 parameters[ipar] = par0 - h/2; g2 = func->
EvalPar(x,parameters);
2164 parameters[ipar] =
par0;
2185 if(eps< 1e-10 || eps > 1) {
2186 Warning(
"Derivative",
"parameter esp=%g out of allowed range[1e-10,1], reset to 0.01",eps);
2203 if (params) args[1] = (
Long_t)params;
2217 if (!
gROOT->GetListOfFunctions()->FindObject(
"gaus")) {
2223 for (
Int_t i=0;i<10;i++) {
2224 f1 =
new TF1(
Form(
"pol%d",i),
Form(
"pol%d",i),-1,1);
2254 Warning(
"analytical integral not available for %s - with number %d compute numerical integral",
GetName(),
GetNumber());
2347 error = iod.
Error();
2360 error = iod.
Error();
2365 Warning(
"IntegralOneDim",
"Error found in integrating function %s in [%f,%f] using %s. Result = %f +/- %f - status = %d",
GetName(),a,b,igName.c_str(),
result,error,
status);
2366 std::cout <<
"Function Parameters = { ";
2426 x1[0] =
a, x2[0] = b;
2507 Warning(
"IntegralMultiple",
"failed code=%d, ",ifail);
2566 nfnevl = aimd.
NEval();
2607 else if (
fType > 0) {
2614 printf(
"Function based on a list of points from a compiled based function: %s. Ndim = %d, Npar = %d, Npx = %d\n",
GetName(),
GetNpar(),
GetNdim(),
int(
fSave.size()));
2616 Warning(
"Print",
"Function %s is based on a list of points but list is empty",
GetName());
2624 printf(
"List of Parameters: \n");
2625 for (
int i = 0; i <
fNpar; ++i)
2628 if (!
fSave.empty() ) {
2630 printf(
"List of Saved points (N=%d): \n",
int(
fSave.size()));
2631 for (
auto & x :
fSave)
2638 printf(
"Contained histogram\n");
2660 pmin =
gPad->PadtoX(
gPad->GetUxmin());
2661 pmax =
gPad->PadtoX(
gPad->GetUxmax());
2664 if (xmax < pmin)
return;
2665 if (xmin > pmax)
return;
2666 if (xmin < pmin) xmin = pmin;
2667 if (xmax > pmax) xmax = pmax;
2676 if (minimum <= 0 && gPad && gPad->GetLogy()) minimum = -1111;
2679 if (minimum == -1111) {
2686 if (minimum == -1111) {
2688 if (optSAME &&
gPad) hmin =
gPad->GetUymin();
2693 if (optSAME &&
gPad) hmax =
gPad->GetUymax();
2695 hmin -= 0.05*(hmax-hmin);
2696 if (hmin < 0) hmin = 0;
2697 if (hmin <= 0 && gPad && gPad->GetLogy()) hmin = hminpos;
2704 if (maximum == -1111) {
2732 TH1 * histogram = 0;
2739 char *semicol = (
char*)strstr(
GetTitle(),
";");
2741 Int_t nxt = strlen(semicol);
2742 char *ctemp =
new char[nxt];
2743 strlcpy(ctemp,semicol+1,nxt);
2744 semicol = (
char*)strstr(ctemp,
";");
2766 if (xmin > 0 &&
gPad &&
gPad->GetLogx()) {
2771 for (i=0;i<=
fNpx;i++) {
2772 xbins[i] =
gPad->PadtoX(xlogmin+ i*dlogx);
2778 histogram =
new TH1D(
"Func",
GetTitle(),fNpx,xmin,xmax);
2792 for (i=1;i<=
fNpx;i++) {
2822 if (ipar < 0 || ipar >
GetNpar()-1)
return;
2840 int fNsave = bin2-bin1+4;
2842 fSave.resize(fNsave);
2846 for (
Int_t i=bin1;i<=bin2;i++) {
2856 int fNsave = fNpx+3;
2857 if (fNsave <= 3) {
return;}
2859 fSave.resize(fNsave);
2864 xmin =
fXmin +0.5*dx;
2865 xmax =
fXmax -0.5*dx;
2870 xv[0] = xmin + dx*i;
2887 if (strstr(option,
"cc")) {
2888 out <<
"double " <<
GetName() <<
"(double xv) {"<<std::endl;
2890 out <<
" double x[" << fNpx <<
"] = {" << std::endl;
2893 for (i=0; i<
fNpx; i++) {
2894 out <<
fXmin + dx*i ;
2895 if (i<fNpx-1) out <<
", ";
2896 if (n++ == 10) { out << std::endl; out <<
" "; n = 0;}
2899 out <<
" };" << std::endl;
2900 out <<
" double y[" << fNpx <<
"] = {" << std::endl;
2903 for (i=0; i<
fNpx; i++) {
2905 if (i<fNpx-1) out <<
", ";
2906 if (n++ == 10) { out << std::endl; out <<
" "; n = 0;}
2909 out <<
" };" << std::endl;
2910 out <<
" if (xv<x[0]) return y[0];" << std::endl;
2911 out <<
" if (xv>x[" << fNpx-1 <<
"]) return y[" << fNpx-1 <<
"];" << std::endl;
2912 out <<
" int i, j=0;" << std::endl;
2913 out <<
" for (i=1; i<" << fNpx <<
"; i++) { if (xv < x[i]) break; j++; }" << std::endl;
2914 out <<
" return y[j] + (y[j + 1] - y[j]) / (x[j + 1] - x[j]) * (xv - x[j]);" << std::endl;
2915 out <<
"}"<<std::endl;
2919 out<<
" "<<std::endl;
2922 static Int_t f1Number = 0;
2924 const char *
l = strstr(option,
"#");
2926 sscanf(&l[1],
"%d",&f1Number);
2933 out<<
" TF1 *"<<f1Name.
Data()<<
" = new TF1("<<quote<<
GetName()<<quote<<
","<<quote<<
GetTitle()<<quote<<
","<<
fXmin<<
","<<
fXmax<<
");"<<std::endl;
2935 out<<
" "<<f1Name.
Data()<<
"->SetNpx("<<fNpx<<
");"<<std::endl;
2939 out<<
" //The original function : "<<
GetTitle()<<
" had originally been created by:" <<std::endl;
2941 out<<
" "<<f1Name.
Data()<<
"->SetRange("<<
fXmin<<
","<<
fXmax<<
");"<<std::endl;
2942 out<<
" "<<f1Name.
Data()<<
"->SetName("<<quote<<
GetName()<<quote<<
");"<<std::endl;
2943 out<<
" "<<f1Name.
Data()<<
"->SetTitle("<<quote<<
GetTitle()<<quote<<
");"<<std::endl;
2945 out<<
" "<<f1Name.
Data()<<
"->SetNpx("<<fNpx<<
");"<<std::endl;
2951 for (i=0;i<=
fNpx;i++) {
2952 xv[0] =
fXmin + dx*i;
2954 out<<
" "<<f1Name.
Data()<<
"->SetSavedPoint("<<i<<
","<<save<<
");"<<std::endl;
2956 out<<
" "<<f1Name.
Data()<<
"->SetSavedPoint("<<fNpx+1<<
","<<
fXmin<<
");"<<std::endl;
2957 out<<
" "<<f1Name.
Data()<<
"->SetSavedPoint("<<fNpx+2<<
","<<
fXmax<<
");"<<std::endl;
2961 out<<
" "<<f1Name.
Data()<<
"->SetBit(TF1::kNotDraw);"<<std::endl;
2966 out<<
" "<<f1Name.
Data()<<
"->SetFillColor(ci);" << std::endl;
2968 out<<
" "<<f1Name.
Data()<<
"->SetFillColor("<<
GetFillColor()<<
");"<<std::endl;
2971 out<<
" "<<f1Name.
Data()<<
"->SetFillStyle("<<
GetFillStyle()<<
");"<<std::endl;
2976 out<<
" "<<f1Name.
Data()<<
"->SetMarkerColor(ci);" << std::endl;
2989 out<<
" "<<f1Name.
Data()<<
"->SetLineColor(ci);" << std::endl;
2991 out<<
" "<<f1Name.
Data()<<
"->SetLineColor("<<
GetLineColor()<<
");"<<std::endl;
2994 out<<
" "<<f1Name.
Data()<<
"->SetLineWidth("<<
GetLineWidth()<<
");"<<std::endl;
2997 out<<
" "<<f1Name.
Data()<<
"->SetLineStyle("<<
GetLineStyle()<<
");"<<std::endl;
3000 out<<
" "<<f1Name.
Data()<<
"->SetChisquare("<<
GetChisquare()<<
");"<<std::endl;
3001 out<<
" "<<f1Name.
Data()<<
"->SetNDF("<<
GetNDF()<<
");"<<std::endl;
3009 out<<
" "<<f1Name.
Data()<<
"->SetParameter("<<i<<
","<<
GetParameter(i)<<
");"<<std::endl;
3010 out<<
" "<<f1Name.
Data()<<
"->SetParError("<<i<<
","<<
GetParError(i)<<
");"<<std::endl;
3012 out<<
" "<<f1Name.
Data()<<
"->SetParLimits("<<i<<
","<<parmin<<
","<<parmax<<
");"<<std::endl;
3014 if (!strstr(option,
"nodraw")) {
3015 out<<
" "<<f1Name.
Data()<<
"->Draw("
3016 <<quote<<option<<quote<<
");"<<std::endl;
3042 Warning(
"SetFitResult",
"Empty Fit result - nathing is set in TF1");
3045 if (indpar == 0 && npar != (
int) result.
NPar() ) {
3046 Error(
"SetFitResult",
"Invalid Fit result passed - number of parameter is %d , different than TF1::GetNpar() = %d",npar,result.
NPar());
3049 if (result.
Chi2() > 0)
3058 for (
Int_t i = 0; i < npar; ++i) {
3059 Int_t ipar = (indpar != 0) ? indpar[i] : i;
3060 if (ipar < 0)
continue;
3063 if (ipar < (
int) result.
Errors().size() )
3118 const Int_t minPx = 4;
3119 Int_t maxPx = 10000000;
3120 if (
GetNdim() > 1) maxPx = 10000;
3121 if (npx >= minPx && npx <= maxPx) {
3125 if(npx < minPx) fNpx = minPx;
3126 if(npx > maxPx) fNpx = maxPx;
3127 Warning(
"SetNpx",
"Number of points must be >=%d && <= %d, fNpx set to %d",minPx,maxPx,fNpx);
3137 if (ipar <0 || ipar >=
GetNpar())
return;
3147 void TF1::SetParNames(
const char*name0,
const char*name1,
const char*name2,
const char*name3,
const char*name4,
3148 const char*name5,
const char*name6,
const char*name7,
const char*name8,
const char*name9,
const char*name10)
3151 fFormula->
SetParNames(name0,name1,name2,name3,name4,name5,name6,name7,name8,name9,name10);
3153 fParams->
SetParNames(name0,name1,name2,name3,name4,name5,name6,name7,name8,name9,name10);
3160 if (ipar < 0 || ipar >
GetNpar()-1)
return;
3171 if (!errors)
return;
3186 if (ipar < 0 || ipar > npar-1)
return;
3213 if (
fSave.size() == 0) {
3214 fSave.resize(fNpx+3);
3216 if (point < 0 || point >=
int(
fSave.size()))
return;
3240 void TF1::Streamer(
TBuffer &b)
3254 gROOT->GetListOfFunctions()->Add(
this);
3265 if (fold.
fType == 0) {
3268 double xmin = fold.
fXmin;
3269 double xmax = fold.
fXmax;
3305 for (
int ibit = 0; ibit < 24; ++ibit)
3310 fOldLine.
Copy(*
this);
3312 fOldFill.
Copy(*
this);
3314 fOldMarker.
Copy(*
this);
3328 if (saved) {
fSave.clear(); }
3391 TF1_EvalWrapper
func(
this, params,
kTRUE, n);
3400 Error(
"Moment",
"Integral zero over range");
3424 TF1_EvalWrapper
func(
this, params,
kTRUE, n);
3433 Error(
"Moment",
"Integral zero over range");
3531 for (
unsigned int i = 0; i <
fParNames.size(); ++i) {
3532 if (
fParNames[i] == std::string(name) )
return i;
3562 const char *name4,
const char *name5,
const char *name6,
const char *name7,
3563 const char *name8,
const char *name9,
const char *name10)
ROOT::Math::ParamFunctor fFunctor
virtual const char * GetTitle() const
Returns title of object.
int NEval() const
return number of function evaluations in calculating the integral
double Error() const
Return the estimate of the absolute Error of the last Integral calculation.
virtual Int_t GetQuantiles(Int_t nprobSum, Double_t *q, const Double_t *probSum)
Compute Quantiles for density distribution of this function.
void Copy(TAttMarker &attmarker) const
Copy this marker attributes to a new TAttMarker.
virtual Style_t GetLineStyle() const
virtual Style_t GetFillStyle() const
virtual void SetLineWidth(Width_t lwidth)
double Derivative3(double x)
Returns the third derivative of the function at point x, computed by Richardson's extrapolation metho...
virtual void SaveAttributes(std::ostream &out, const char *name, const char *subname)
Save axis attributes as C++ statement(s) on output stream out.
virtual void Paint(Option_t *option="")
Control routine to paint any kind of histograms.
virtual void SetParameters(const Double_t *params)
virtual Double_t GetRandom()
Return a random number following this function shape.
Bool_t fNormalized
Pointer to MethodCall in case of interpreted function.
double IntegralUp(double a)
Returns Integral of function on an upper semi-infinite interval.
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
static Vc_ALWAYS_INLINE int_v min(const int_v &x, const int_v &y)
Interface (abstract class) for generic functions objects of one-dimension Provides a method to evalua...
virtual void SetNpx(Int_t npx=100)
Set the number of points used to draw the function.
virtual void ReleaseParameter(Int_t ipar)
Release parameter number ipar If used in a fit, the parameter can vary freely.
void fcn(Int_t &npar, Double_t *gin, Double_t &f, Double_t *par, Int_t iflag)
virtual void SetMaximum(Double_t maximum=-1111)
bool Solve(int maxIter=100, double absTol=1E-8, double relTol=1E-10)
Returns the X value corresponding to the function value fy for (xmin<x<xmax).
static double p3(double t, double a, double b, double c, double d)
virtual void SetParName(Int_t ipar, const char *name)
Set name of parameter number ipar.
virtual void SetLimits(Double_t xmin, Double_t xmax)
int Status() const
return status of integration
Option_t * GetDrawOption() const
Get option used by the graphics system to draw this object.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual void SetParNames(const char *name0="p0", const char *name1="p1", const char *name2="p2", const char *name3="p3", const char *name4="p4", const char *name5="p5", const char *name6="p6", const char *name7="p7", const char *name8="p8", const char *name9="p9", const char *name10="p10")
Set up to 10 parameter names.
const std::vector< double > & Errors() const
parameter errors (return st::vector)
virtual Double_t Rndm(Int_t i=0)
Machine independent random number generator.
virtual void SetDirectory(TDirectory *dir)
By default when an histogram is created, it is added to the list of histogram objects in the current ...
double RelError() const
return relative error
virtual Int_t GetNumberFreeParameters() const
Return the number of free parameters.
void SetLogScan(bool on)
Set a log grid scan (default is equidistant bins) will work only if xlow > 0.
virtual const char * GetParName(Int_t ipar) const
R__EXTERN TStyle * gStyle
unsigned int Ndf() const
Number of degree of freedom.
Double_t distance(const TPoint2 &p1, const TPoint2 &p2)
virtual Double_t IntegralFast(Int_t num, Double_t *x, Double_t *w, Double_t a, Double_t b, Double_t *params=0, Double_t epsilon=1e-12)
Gauss-Legendre integral, see CalcGaussLegendreSamplingPoints.
static TF1 * GetCurrent()
Static function returning the current function being processed.
static void SaveColor(std::ostream &out, Int_t ci)
Save a color with index > 228 as a C++ statement(s) on output stream out.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
TObject * fParent
Array gamma.
virtual void SetRange(Double_t xmin, Double_t xmax)
Initialize the upper and lower bounds to draw the function.
void Copy(TAttLine &attline) const
Copy this line attributes to a new TAttLine.
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
void ToUpper()
Change string to upper case.
Buffer base class used for serializing objects.
virtual void Save(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax)
Save values of function in array fSave.
virtual Double_t IntegralMultiple(Int_t n, const Double_t *a, const Double_t *b, Int_t maxpts, Double_t epsrel, Double_t epsabs, Double_t &relerr, Int_t &nfnevl, Int_t &ifail)
This function computes, to an attempted specified accuracy, the value of the integral.
virtual void SetMinimum(Double_t minimum=-1111)
double Integral(const double *xmin, const double *xmax)
evaluate the integral with the previously given function between xmin[] and xmax[] ...
std::vector< std::string > fParNames
static ROOT::Math::Minimizer * CreateMinimizer(const std::string &minimizerType="", const std::string &algoType="")
static method to create the corrisponding Minimizer given the string Supported Minimizers types are: ...
Class to Wrap a ROOT Function class (like TF1) in a IParamFunction interface of one dimensions to be ...
virtual void SetNumberFitPoints(Int_t npfits)
static Double_t DerivativeError()
Static function returning the error of the last call to the of Derivative's functions.
void Copy(TAttFill &attfill) const
Copy this fill attributes to a new TAttFill.
Short_t Min(Short_t a, Short_t b)
void ToLower()
Change string to lower-case.
virtual Double_t GetParError(Int_t ipar) const
Return value of parameter number ipar.
R__EXTERN TVirtualMutex * gROOTMutex
virtual void Draw(Option_t *option="")
Draw this function with its current attributes.
virtual void SetFillStyle(Style_t fstyle)
virtual Double_t Derivative2(Double_t x, Double_t *params=0, Double_t epsilon=0.001) const
Returns the second derivative of the function at point x, computed by Richardson's extrapolation meth...
double Integral(double a, double b)
Returns Integral of function between a and b.
Width_t GetFuncWidth() const
virtual void SetMinimum(Double_t minimum=-1111)
Set the minimum value along Y for this function In case the function is already drawn, set also the minimum in the helper histogram.
double Derivative2(double x)
Returns the second derivative of the function at point x, computed by Richardson's extrapolation meth...
const Double_t * GetParameters() const
virtual Double_t Integral(Double_t a, Double_t b, Double_t epsrel=1.e-12)
IntegralOneDim or analytical integral.
User class for performing function integration.
virtual TObject * DrawIntegral(Option_t *option="al")
Draw integral of this function.
ClassImp(TIterator) Bool_t TIterator return false
Compare two iterator objects.
virtual Int_t GetNDF() const
Return the number of degrees of freedom in the fit the fNDF parameter has been previously computed du...
virtual Double_t GetXmin() const
virtual void Draw(Option_t *chopt="")
Draw this graph with its current attributes.
virtual TVirtualPad * cd(Int_t subpadnumber=0)=0
Double_t Prob(Double_t chi2, Int_t ndf)
Computation of the probability for a certain Chi-squared (chi2) and number of degrees of freedom (ndf...
virtual TH1 * GetHistogram() const
Return a pointer to the histogram used to vusualize the function.
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
virtual bool SetLimitedVariable(unsigned int ivar, const std::string &name, double val, double step, double lower, double upper)
set a new upper/lower limited variable (override if minimizer supports them ) otherwise as default se...
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
double IntegralLow(double b)
Returns Integral of function on a lower semi-infinite interval.
double beta(double x, double y)
Calculates the beta function.
static void SetCurrent(TF1 *f1)
Static function setting the current function.
virtual Double_t GetMinMaxNDim(Double_t *x, Bool_t findmax, Double_t epsilon=0, Int_t maxiter=0) const
Find the minimum of a function of whatever dimension.
virtual void AppendPad(Option_t *option="")
Append graphics object to current pad.
virtual void RecursiveRemove(TObject *obj)
Recursively remove this object from a list.
double Error() const
return the estimate of the absolute Error of the last Integral calculation
Template class to wrap any C++ callable object which takes one argument i.e.
void SetParamPtrs(void *paramArr, Int_t nparam=-1)
ParamArr is an array containing the function argument values.
const char * Data() const
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a function.
virtual Double_t Moment(Double_t n, Double_t a, Double_t b, const Double_t *params=0, Double_t epsilon=0.000001)
Return nth moment of function between a and b.
virtual void SetRelTolerance(double eps)
Set the desired relative Error.
void SetParameters(const double *p)
set parameter values
TFormula * fFormula
Functor object to wrap any C++ callable object.
static const double x2[5]
Fill Area Attributes class.
virtual Bool_t IsValid() const
Return kTRUE if the function is valid.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
Double_t GetChisquare() const
int Status() const
return the Error Status of the last Integral calculation
The TNamed class is the base class for all named ROOT classes.
virtual Double_t GetMaximumStored() const
unsigned int r3[N_CITIES]
virtual void DrawF1(Double_t xmin, Double_t xmax, Option_t *option="")
Draw function between xmin and xmax.
UChar_t mod R__LOCKGUARD2(gSrvAuthenticateMutex)
void GetWeightVectors(double *x, double *w) const
Returns the arrays x and w containing the abscissa and weight of the Gauss-Legendre n-point quadratur...
void * New(ENewType defConstructor=kClassNew, Bool_t quiet=kFALSE) const
Return a pointer to a newly allocated object of this class.
virtual void Copy(TObject &named) const
Copy this to obj.
Color_t GetFuncColor() const
Abstract Minimizer class, defining the interface for the various minimizer (like Minuit2, Minuit, GSL, etc..) Plug-in's exist in ROOT to be able to instantiate the derived classes like ROOT::Math::GSLMinimizer or ROOT::Math::Minuit2Minimizer via the plug-in manager.
Double_t Log10(Double_t x)
virtual double MinValue() const =0
return minimum function value
static double p2(double t, double a, double b, double c)
virtual void Copy(TObject &f1) const
Copy this F1 to a new F1.
TF1()
TF1 default constructor.
virtual bool Minimize()=0
method to perform the minimization
void SetParameters(const Double_t *params)
virtual void SetMarkerColor(Color_t mcolor=1)
static Vc_ALWAYS_INLINE Vector< T > abs(const Vector< T > &x)
double Derivative1(double x)
Returns the first derivative of the function at point x, computed by Richardson's extrapolation metho...
double Error() const
return integration error
static IntegrationOneDim::Type DefaultIntegratorType()
virtual const double * X() const =0
return pointer to X values at the minimum
virtual void GetRange(Double_t *xmin, Double_t *xmax) const
Return range of a generic N-D function.
Method or function calling interface.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
User class for performing function minimization.
TVirtualPad is an abstract base class for the Pad and Canvas classes.
int Status() const
return the Error Status of the last Integral calculation
virtual Double_t GetXmax() const
ClassDef(TF1Parameters, 1) private std::vector< Double_t > fParameters
std::vector< Double_t > fIntegral
double Integral(const double *xmin, const double *xmax)
evaluate the integral with the previously given function between xmin[] and xmax[] ...
virtual void GetParLimits(Int_t ipar, Double_t &parmin, Double_t &parmax) const
Return limits for parameter ipar.
virtual Double_t GradientPar(Int_t ipar, const Double_t *x, Double_t eps=0.01)
Compute the gradient (derivative) wrt a parameter ipar.
double IntegralLow(const IGenFunction &f, double b)
evaluate the Integral of a function f over the over the semi-infinite interval (-inf,b)
double Root() const
Returns root value.
Bool_t AreEqualRel(Double_t af, Double_t bf, Double_t relPrec)
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a line.
unsigned int NFreeParameters() const
get total number of free parameters
virtual void SetLineColor(Color_t lcolor)
double Integral(Function &f, double a, double b)
evaluate the Integral of a function f over the defined interval (a,b)
Using a TBrowser one can browse all ROOT objects.
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
virtual void SetChisquare(Double_t chi2)
virtual Double_t GetBinCenter(Int_t bin) const
return bin center for 1D historam Better to use h1.GetXaxis().GetBinCenter(bin)
virtual Size_t GetMarkerSize() const
virtual void SetParLimits(Int_t ipar, Double_t parmin, Double_t parmax)
Set limits for parameter ipar.
double IntegralUp(const IGenFunction &f, double a)
evaluate the Integral of a function f over the semi-infinite interval (a,+inf)
static Bool_t fgRejectPoint
void function(const char *name_, T fun, const char *docstring=0)
virtual void SetFunction(const ROOT::Math::IMultiGenFunction &func)=0
set the function to minimize
unsigned int NPar() const
total number of parameters (abbreviation)
virtual void Print(Option_t *option="") const
Print some global quantities for this histogram.
TH1 * fHistogram
Parent object hooking this function (if one)
Class to manage histogram axis.
static const std::string & DefaultMinimizerType()
virtual Double_t GetMinimumStored() const
TPaveLabel title(3, 27.1, 15, 28.7,"ROOT Environment and Tools")
virtual void SetFillColor(Color_t fcolor)
void SetLogScan(bool on)
Set a log grid scan (default is equidistant bins) will work only if xlow > 0.
double IntegralError(TF1 *func, Int_t ndim, const double *a, const double *b, const double *params, const double *covmat, double epsilon)
virtual void SetParError(Int_t ipar, Double_t error)
Set error for parameter number ipar.
unsigned int r1[N_CITIES]
void DoInitialize()
Common initialization of the TF1.
void SetFunction(const ROOT::Math::IGenFunction &f, double xlow, double xup)
Sets function to be minimized.
virtual void SetBinContent(Int_t bin, Double_t content)
Set bin content see convention for numbering bins in TH1::GetBin In case the bin number is greater th...
virtual Color_t GetFillColor() const
virtual double XMinimum() const
Return current estimate of the position of the minimum.
Bool_t TestBit(UInt_t f) const
virtual Int_t GetNdim() const
char * Form(const char *fmt,...)
User class for performing function integration.
virtual void FixParameter(Int_t ipar, Double_t value)
Fix the value of a parameter The specified value will be used in a fit operation. ...
User Class for performing numerical integration of a function in one dimension.
static void RejectPoint(Bool_t reject=kTRUE)
Static function to set the global flag to reject points the fgRejectPoint global flag is tested by al...
void GetParameters(TFitEditor::FuncParams_t &pars, TF1 *func)
Stores the parameters of the given function into pars.
virtual const char * GetName() const
Returns name of object.
static void InitStandardFunctions()
Create the basic function objects.
virtual void SetMarkerStyle(Style_t mstyle=1)
const char * GetTitle() const
Returns title of object.
static double p1(double t, double a, double b)
virtual void Update()
Called by functions such as SetRange, SetNpx, SetParameters to force the deletion of the associated h...
virtual ~TF1()
TF1 default destructor.
virtual Double_t GetProb() const
Return the fit probability.
R__EXTERN TRandom * gRandom
virtual Color_t GetLineColor() const
1-D histogram with a double per channel (see TH1 documentation)}
virtual TH1 * DoCreateHistogram(Double_t xmin, Double_t xmax, Bool_t recreate=kFALSE)
Create histogram with bin content equal to function value computed at the bin center This histogram w...
virtual void SetMarkerSize(Size_t msize=1)
static IntegrationMultiDim::Type DefaultIntegratorType()
TAxis * GetYaxis() const
Get y axis of the function.
const Double_t * GetArray() const
void InitWithPrototype(TClass *cl, const char *method, const char *proto, Bool_t objectIsConst=kFALSE, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch)
Initialize the method invocation environment.
static void CalcGaussLegendreSamplingPoints(Int_t num, Double_t *x, Double_t *w, Double_t eps=3.0e-11)
Type safe interface (static method) The number of sampling points are taken from the TGraph...
Class for finding the root of a one dimensional function using the Brent algorithm.
virtual Double_t GetMinimum(Double_t xmin=0, Double_t xmax=0, Double_t epsilon=1.E-10, Int_t maxiter=100, Bool_t logx=false) const
Returns the minimum value of the function on the (xmin, xmax) interval.
virtual void SetMaximum(Double_t maximum=-1111)
Set the maximum value along Y for this function In case the function is already drawn, set also the maximum in the helper histogram.
virtual Int_t FindBin(Double_t x)
Find bin number corresponding to abscissa x.
virtual void SetTitle(const char *title="")
Set function title if title has the form "fffffff;xxxx;yyyy", it is assumed that the function title i...
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
virtual Double_t Derivative(Double_t x, Double_t *params=0, Double_t epsilon=0.001) const
Returns the first derivative of the function at point x, computed by Richardson's extrapolation metho...
static const std::string & DefaultMinimizerAlgo()
void SetMaxFunctionCalls(unsigned int maxfcn)
set maximum of function calls
class containg the result of the fit and all the related information (fitted parameter values...
TRObject operator()(const T1 &t1) const
static const double x1[5]
void SetFunction(const IGenFunction &)
Set integration function (flag control if function must be copied inside).
std::vector< Double_t > fSave
virtual Double_t GetX(Double_t y, Double_t xmin=0, Double_t xmax=0, Double_t epsilon=1.E-10, Int_t maxiter=100, Bool_t logx=false) const
Returns the X value corresponding to the function value fy for (xmin<x<xmax).
void SetTolerance(double tol)
set the tolerance
std::vector< Double_t > fParErrors
virtual Double_t GetMaximum(Double_t xmin=0, Double_t xmax=0, Double_t epsilon=1.E-10, Int_t maxiter=100, Bool_t logx=false) const
Returns the maximum value of the function.
virtual Double_t Derivative3(Double_t x, Double_t *params=0, Double_t epsilon=0.001) const
Returns the third derivative of the function at point x, computed by Richardson's extrapolation metho...
virtual void Print(Option_t *option="") const
Print TNamed name and title.
ClassImp(TMCParticle) void TMCParticle printf(": p=(%7.3f,%7.3f,%9.3f) ;", fPx, fPy, fPz)
void SetParName(Int_t iparam, const char *name)
double Error(unsigned int i) const
parameter error by index
static Bool_t fgAddToGlobList
Double_t AnalyticalIntegral(TF1 *f, Double_t a, Double_t b)
double func(double *x, double *p)
std::vector< Double_t > fGamma
Array beta. is approximated by x = alpha +beta*r *gamma*r**2.
ClassImp(TF1) class GFunc
void Streamer(TBuffer &b, Int_t version, UInt_t start, UInt_t count, const TClass *onfile_class=0)
static std::string GetName(IntegrationOneDim::Type)
static function to get a string from the enumeration
virtual double DoEval(double x) const =0
implementation of the evaluation function. Must be implemented by derived classes ...
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream out.
virtual Double_t Uniform(Double_t x1=1)
Returns a uniform deviate on the interval (0, x1).
std::vector< Double_t > fAlpha
Integral of function binned on fNpx bins.
Style_t GetFuncStyle() const
virtual Int_t GetNumber() const
virtual void SetLineStyle(Style_t lstyle)
Template class to wrap any C++ callable object implementing operator() (const double * x) in a multi-...
Int_t GetParNumber(const char *name) const
Returns the parameter number given a name not very efficient but list of parameters is typically smal...
Array of doubles (64 bits per element).
static Vc_ALWAYS_INLINE int_v max(const int_v &x, const int_v &y)
virtual void InitArgs(const Double_t *x, const Double_t *params)
Initialize parameters addresses.
std::vector< Double_t > fBeta
Array alpha. for each bin in x the deconvolution r of fIntegral.
TAxis * GetZaxis() const
Get z axis of the function. (In case this object is a TF2 or TF3)
void SetParNames(const char *name0="p0", const char *name1="p1", const char *name2="p2", const char *name3="p3", const char *name4="p4", const char *name5="p5", const char *name6="p6", const char *name7="p7", const char *name8="p8", const char *name9="p9", const char *name10="p10")
Set parameter names.
virtual Double_t GetSave(const Double_t *x)
Get value corresponding to X in array of fSave values.
virtual Double_t GetParameter(Int_t ipar) const
TAxis * GetXaxis() const
Get x axis of the function.
virtual Double_t GetBinCenter(Int_t bin) const
Return center of bin.
Mother of all ROOT objects.
virtual Double_t * GetParameters() const
double MinFcnValue() const
Return value of the objective function (chi2 or likelihood) used in the fit.
double Error() const
Returns the estimate of the absolute Error of the last derivative calculation.
TMethodCall * fMethodCall
Pointer to histogram used for visualisation.
virtual Double_t IntegralOneDim(Double_t a, Double_t b, Double_t epsrel, Double_t epsabs, Double_t &err)
Return Integral of function between a and b using the given parameter values and relative and absolut...
virtual Double_t GetMaximumX(Double_t xmin=0, Double_t xmax=0, Double_t epsilon=1.E-10, Int_t maxiter=100, Bool_t logx=false) const
Returns the X value corresponding to the maximum value of the function.
virtual Color_t GetMarkerColor() const
virtual bool SetVariable(unsigned int ivar, const std::string &name, double val, double step)=0
set a new free variable
virtual double FValMinimum() const
Return function value at current estimate of the minimum.
User class for performing multidimensional integration.
static Bool_t RejectedPoint()
See TF1::RejectPoint above.
virtual void SetParErrors(const Double_t *errors)
Set errors for all active parameters when calling this function, the array errors must have at least ...
void Execute(const char *, const char *, int *=0)
Execute method on this object with the given parameter string, e.g.
void SetNpx(int npx)
Set the number of point used to bracket root using a grid.
virtual Bool_t AddToGlobalList(Bool_t on=kTRUE)
Add to global list of functions (gROOT->GetListOfFunctions() ) return previous status (true of functi...
Short_t Max(Short_t a, Short_t b)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
virtual void SetSavedPoint(Int_t point, Double_t value)
Restore value of function saved at point.
A Graph is a graphics object made of two arrays X and Y with npoints each.
virtual void SetFitResult(const ROOT::Fit::FitResult &result, const Int_t *indpar=0)
Set the result from the fit parameter values, errors, chi2, etc...
virtual Double_t Eval(Double_t x, Double_t y=0, Double_t z=0, Double_t t=0) const
Evaluate this function.
Param Functor class for Multidimensional functions.
static void AbsValue(Bool_t reject=kTRUE)
Static function: set the fgAbsValue flag.
virtual void SetNDF(Int_t ndf)
Set the number of degrees of freedom ndf should be the number of points used in a fit - the number of...
virtual Double_t GetMinimumX(Double_t xmin=0, Double_t xmax=0, Double_t epsilon=1.E-10, Int_t maxiter=100, Bool_t logx=false) const
Returns the X value corresponding to the minimum value of the function on the (xmin, xmax) interval.
virtual IBaseFunctionOneDim * Clone() const =0
Clone a function.
double Chi2() const
Chi2 fit value in case of likelihood must be computed ?
std::vector< double > errors
virtual Double_t IntegralError(Double_t a, Double_t b, const Double_t *params=0, const Double_t *covmat=0, Double_t epsilon=1.E-2)
Return Error on Integral of a parameteric function between a and b due to the parameter uncertainties...
int Status() const
return the status of the last integration - 0 in case of success
TF1 & operator=(const TF1 &rhs)
Operator =.
virtual void SetParameter(Int_t param, Double_t value)
virtual void SetTitle(const char *title)
Change (i.e.
virtual bool Minimize(int maxIter, double absTol=1.E-8, double relTol=1.E-10)
Find minimum position iterating until convergence specified by the absolute and relative tolerance or...
bool SetFunction(const ROOT::Math::IGenFunction &f, double xlow, double xup)
Sets the function for the rest of the algorithms.
void SetNpx(int npx)
Set the number of point used to bracket root using a grid.
Functor1D class for one-dimensional functions.
Double_t Sqrt(Double_t x)
std::vector< Double_t > fParMax
double Parameter(unsigned int i) const
parameter value by index
virtual Style_t GetMarkerStyle() const
virtual char * GetObjectInfo(Int_t px, Int_t py) const
Redefines TObject::GetObjectInfo.
virtual Double_t CentralMoment(Double_t n, Double_t a, Double_t b, const Double_t *params=0, Double_t epsilon=0.000001)
Return nth central moment of function between a and b (i.e the n-th moment around the mean value) ...
virtual Double_t GetMaximum(Double_t maxval=FLT_MAX) const
Return maximum value smaller than maxval of bins in the range, unless the value has been overridden b...
bool IsEmpty() const
True if a fit result does not exist (even invalid) with parameter values.
virtual Width_t GetLineWidth() const
virtual Double_t EvalPar(const Double_t *x, const Double_t *params=0)
Evaluate function with given coordinates and parameters.
virtual void SetTitle(const char *title="")
Change (i.e. set) the title of the TNamed.
virtual void Browse(TBrowser *b)
Browse.
double norm(double *x, double *p)
std::vector< Double_t > fParMin
virtual Int_t GetNpar() const
Long64_t BinarySearch(Long64_t n, const T *array, T value)
Bool_t IsValid() const
Return true if the method call has been properly initialized and is usable.
static Double_t gErrorTF1
virtual Double_t GetMinimum(Double_t minval=-FLT_MAX) const
Return minimum value larger than minval of bins in the range, unless the value has been overridden by...
User class for calculating the derivatives of a function.
unsigned int r2[N_CITIES]
class for adaptive quadrature integration in multi-dimensions using rectangular regions.
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0
virtual void Paint(Option_t *option="")
Paint this function with its current attributes.
virtual TObject * DrawDerivative(Option_t *option="al")
Draw derivative of this function.
virtual TF1 * DrawCopy(Option_t *option="") const
Draw a copy of this function with its current attributes.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.