67struct TF1v5Convert :
public TF1 {
74 if (from.
fType == 0) {
114 fParMin = std::vector<Double_t>(from.
fParMin, from.
fParMin + fNpar);
116 fParMax = std::vector<Double_t>(from.
fParMax, from.
fParMax + fNpar);
122 for (
int ibit = 0; ibit < 24; ++ibit)
127 auto &fromLine =
static_cast<TAttLine &
>(from);
128 fromLine.
Copy(*
this);
129 auto &fromFill =
static_cast<TAttFill &
>(from);
130 fromFill.
Copy(*
this);
131 auto &fromMarker =
static_cast<TAttMarker &
>(from);
132 fromMarker.
Copy(*
this);
140 auto **target = (TF1v5Convert **)to;
142 for (
int i = 0; i < nobjects; ++i) {
143 if (fromv5[i] && target[i])
144 target[i]->Convert(*fromv5[i]);
154 const TF1 *fFunction;
157 GFunc(
const TF1 *function ,
double y): fFunction(function), fY0(
y) {}
160 return fFunction->
Eval(
x) - fY0;
166 const TF1 *fFunction;
168 GInverseFunc(
const TF1 *function): fFunction(
function) {}
172 return - fFunction->
Eval(
x);
176class GInverseFuncNdim {
179 GInverseFuncNdim(
TF1 *function): fFunction(
function) {}
199 fFunc->InitArgs(fX, fPar);
200 if (par) fFunc->SetParameters(par);
206 TF1_EvalWrapper *
f =
new TF1_EvalWrapper(*
this);
207 f->fFunc->InitArgs(
f->fX,
f->fPar);
215 Double_t fval = fFunc->EvalPar(fX, 0);
216 if (fAbsVal && fval < 0)
return -fval;
223 return fX[0] *
TMath::Abs(fFunc->EvalPar(fX, 0));
496 fXmin(0), fXmax(0), fNpar(0), fNdim(0), fType(
EFType::kFormula)
529 if (
TString(formula, 5) ==
"CONV(" && formula[strlen(formula) - 1] ==
')') {
531 int delimPosition = -1;
533 for (
unsigned int i = 5; i < strlen(formula) - 1; i++) {
534 if (formula[i] ==
'(')
536 else if (formula[i] ==
')')
538 else if (formula[i] ==
',' && parenCount == 0) {
539 if (delimPosition == -1)
542 Error(
"TF1",
"CONV takes 2 arguments. Too many arguments found in : %s", formula);
545 if (delimPosition == -1)
546 Error(
"TF1",
"CONV takes 2 arguments. Only one argument found in : %s", formula);
550 TString formula2 =
TString(
TString(formula)(delimPosition + 1, strlen(formula) - 1 - (delimPosition + 1)));
556 if (function1 ==
nullptr)
558 TF1 *function2 = (
TF1 *)(
gROOT->GetListOfFunctions()->FindObject(formula2));
559 if (function2 ==
nullptr)
560 function2 =
new TF1((
const char *)formula2, (
const char *)formula2,
xmin,
xmax);
571 fComposition = std::unique_ptr<TF1AbsComposition>(conv);
575 for (
int i = 0; i <
fNpar; i++)
578 int f1Npar = function1->
GetNpar();
579 int f2Npar = function2->
GetNpar();
581 for (
int i = 0; i < f1Npar; i++)
585 if (conv->
GetNpar() == f1Npar + f2Npar - 1) {
590 for (
int i = 0; i < f2Npar; i++)
597 for (
int i = 0; i < f2Npar; i++)
602 }
else if (
TString(formula, 5) ==
"NSUM(" && formula[strlen(formula) - 1] ==
')') {
604 char delimiter =
',';
620 for (
int i = 0; i < formDense.
Length(); ++i) {
621 if (formDense[i] ==
'(')
623 else if (formDense[i] ==
')')
625 else if (formDense[i] == delimiter && parenCount == 0) {
635 if (
xmin == 0 &&
xmax == 1.)
Info(
"TF1",
"Created TF1NormSum object using the default [0,1] range");
641 fComposition = std::unique_ptr<TF1AbsComposition>(normSum);
647 for (
int i = 0; i <
fNpar; i++) {
648 if (coeffNames->
At(i) !=
nullptr) {
670 Error(
"TF1",
"function: %s/%s has dimension %d instead of 1",
name, formula,
fNdim);
685 if (opt ==
nullptr)
return false;
688 if (option.
Contains(
"VEC"))
return true;
720 Info(
"TF1",
"TF1 has a name starting with a \'*\' - it is for saved TF1 objects in a .C file");
723 Error(
"TF1",
"requires a proper function name!");
731 Error(
"TF1",
"No function found with the signature %s(Double_t*,Double_t*)",
name);
795 if (doAdd &&
gROOT) {
801 gROOT->GetListOfFunctions()->Remove(f1old);
806 gROOT->GetListOfFunctions()->Add(
this);
837 if (!
gROOT)
return false;
843 assert(
gROOT->GetListOfFunctions()->FindObject(
this) !=
nullptr);
850 gROOT->GetListOfFunctions()->Add(
this);
852 }
else if (prevStatus) {
858 Warning(
"AddToGlobalList",
"Function is supposed to be in the global list but it is not present");
861 gROOT->GetListOfFunctions()->Remove(
this);
874 TString originalTerm = formula(termStart, termEnd-termStart);
876 if (coeffLength != -1)
877 termStart += coeffLength + 1;
882 TString originalFunc = formula(termStart, termEnd-termStart);
883 TString cleanedFunc =
TString(formula(termStart, termEnd-termStart))
888 if (!
gROOT->GetListOfFunctions()->FindObject(cleanedFunc))
892 if (fullFormula.
Length() != 0)
896 if (coeffLength != -1 && originalTerm[0] !=
'[')
897 fullFormula.
Append(originalTerm(0, coeffLength+1));
900 if (coeffLength != -1 && originalTerm[0] ==
'[')
903 coeffNames->
Add(
nullptr);
905 fullFormula.
Append(cleanedFunc);
913 int firstAsterisk = term.
First(
'*');
914 if (firstAsterisk == -1)
917 if (
TString(term(0,firstAsterisk)).IsFloat())
918 return firstAsterisk;
920 if (term[0] ==
'[' && term[firstAsterisk-1] ==
']'
921 &&
TString(term(1,firstAsterisk-2)).IsAlnum())
922 return firstAsterisk;
949 if (
gROOT)
gROOT->GetListOfFunctions()->Remove(
this);
961 fXmin(0), fXmax(0), fNpar(0), fNdim(0), fType(
EFType::kFormula)
984 Draw(
b ?
b->GetDrawOption() :
"");
996 delete((
TF1 &)obj).fHistogram;
1019 ((
TF1 &)obj).fHistogram = 0;
1020 ((
TF1 &)obj).fMethodCall = 0;
1023 ((
TF1 &)obj).fFormula = 0;
1029 ((
TF1 &)obj).fMethodCall.reset(
m);
1035 ((
TF1 &)obj).fParams.reset(paramsToCopy);
1038 ((
TF1 &)obj).fFunctor.reset(functorToCopy);
1045 ((
TF1 &)obj).fComposition.reset(comp);
1105 Warning(
"Derivative",
"Function dimension is larger than one");
1113 if (
h <= 0)
h = 0.001;
1170 Warning(
"Derivative2",
"Function dimension is larger than one");
1178 if (
h <= 0)
h = 0.001;
1235 Warning(
"Derivative3",
"Function dimension is larger than one");
1243 if (
h <= 0)
h = 0.001;
1285 Int_t distance = 9999;
1288 if (distance <= 1)
return distance;
1295 xx[0] =
gPad->PadtoX(
x);
1296 if (xx[0] <
fXmin || xx[0] >
fXmax)
return distance;
1330 gPad->IncrementPaletteColor(1, opt);
1354 TF1 *newf1 = (
TF1 *)this->IsA()->New();
1382 if (padsav) padsav->
cd();
1407 if (padsav) padsav->
cd();
1499#ifdef R__HAS_VECCORE
1502 if (params) result = EvalParVec(
x, params);
1518 Error(
"EvalPar",
"Composition function not found");
1520 result = (*fComposition)(
x, params);
1537 if (!
gPad->GetView()) {
1549 if (ipar < 0 || ipar >
GetNpar() - 1)
return;
1561 ::Warning(
"TF1::GetCurrent",
"This function is obsolete and is working only for the current painted functions");
1611 if (!logx &&
gPad != 0) logx =
gPad->GetLogx();
1614 GInverseFunc
g(
this);
1652 if (!logx &&
gPad != 0) logx =
gPad->GetLogx();
1655 GInverseFunc
g(
this);
1693 if (!logx &&
gPad != 0) logx =
gPad->GetLogx();
1719 Error(
"GetMinimumNDim",
"Function of dimension 0 - return Eval(x)");
1720 return (
const_cast<TF1 &
>(*
this))(
x);
1729 Error(
"GetMinimumNDim",
"Error creating minimizer %s", minimName);
1740 GInverseFuncNdim invFunc(
const_cast<TF1 *
>(
this));
1747 std::vector<double> rmin(ndim);
1748 std::vector<double> rmax(ndim);
1750 for (
int i = 0; i < ndim; ++i) {
1751 const char *xname = 0;
1752 double stepSize = 0.1;
1754 if (rmax[i] > rmin[i])
1755 stepSize = (rmax[i] - rmin[i]) / 100;
1756 else if (std::abs(
x[i]) > 1.)
1757 stepSize = 0.1 *
x[i];
1763 }
else if (i == 1) {
1773 if (rmin[i] < rmax[i]) {
1783 Error(
"GetMinimumNDim",
"Error minimizing function %s",
GetName());
1785 if (min->
X()) std::copy(min->
X(), min->
X() + ndim,
x);
1789 return (findmax) ? -fmin : fmin;
1860 if (!logx &&
gPad != 0) logx =
gPad->GetLogx();
1869 if (!ret)
Error(
"GetX",
"[%f,%f] is not a valid interval",
xmin,
xmax);
1895 for (
Int_t i = 0; i < ntot; i++) {
1896 ((
TF1 *)
this)->GetParLimits(i, al, bl);
1897 if (al * bl != 0 && al >= bl) nfree--;
1910 static char info[64];
1922 if (ipar < 0 || ipar >
GetNpar() - 1)
return 0;
1936 if (ipar < 0 || ipar >
n - 1)
return;
1947 if (
fNDF <= 0)
return 0;
1990 const Double_t dx = (xMax - xMin) / npx;
1998 Int_t intNegative = 0;
2000 for (i = 0; i < npx; i++) {
2006 integral[i + 1] = integral[i] + integ;
2009 if (intNegative > 0)
2010 Warning(
"GetQuantiles",
"function:%s has %d negative values: abs assumed",
2012 if (integral[npx] == 0) {
2013 Error(
"GetQuantiles",
"Integral of function is zero");
2018 for (i = 1; i <= npx; i++) integral[i] /=
total;
2022 for (i = 0; i < npx; i++) {
2024 const Double_t r2 = integral[i + 1] - integral[i];
2026 gamma[i] = (2 * r2 - 4 * r1) / (dx * dx);
2027 beta[i] = r2 / dx - gamma[i] * dx;
2034 for (i = 0; i < nprobSum; i++) {
2051 const Double_t fac = -2.*gamma[bin] * rr / beta[bin] / beta[bin];
2052 if (fac != 0 && fac <= 1)
2053 xx = (-beta[bin] +
TMath::Sqrt(beta[bin] * beta[bin] + 2 * gamma[bin] * rr)) / gamma[bin];
2054 else if (beta[bin] != 0.)
2055 xx = rr / beta[bin];
2056 q[i] = alpha[bin] + xx;
2059 if (integral[bin + 1] ==
r)
q[i] += dx;
2078 Int_t intNegative = 0;
2094 Info(
"GetRandom",
"Use log scale for tabulating the integral in [%f,%f] with %d points",
fXmin,
fXmax,
fNpx);
2098 std::vector<Double_t> xx(
fNpx + 1);
2099 for (i = 0; i <
fNpx; i++) {
2100 xx[i] =
xmin + i * dx;
2103 for (i = 0; i <
fNpx; i++) {
2107 integ =
Integral(xx[i], xx[i + 1], 0.0);
2115 if (intNegative > 0) {
2116 Warning(
"GetRandom",
"function:%s has %d negative values: abs assumed",
GetName(), intNegative);
2119 Error(
"GetRandom",
"Integral of function is zero");
2123 for (i = 1; i <=
fNpx; i++) {
2130 for (i = 0; i <
fNpx; i++) {
2137 r3 = 2 * r2 - 4 * r1;
2139 fGamma[i] = r3 / (dx * dx);
2198 yy = rr /
fBeta[bin];
2245 if (nbinmax >
fNpx) nbinmax =
fNpx;
2260 xx = rr /
fBeta[bin];
2262 }
while (x < xmin || x >
xmax);
2275 for (
int i = 0; i < ndim; ++i) {
2279 }
else if (i == 1) {
2282 }
else if (i == 2) {
2334 if (
fSave.size() == 0)
return 0;
2336 int fNsave =
fSave.size();
2346 TAxis *xaxis =
h->GetXaxis();
2353 ylow =
fSave[bin - bin1];
2354 yup =
fSave[bin - bin1 + 1];
2358 ylow =
fSave[bin - bin1 - 1];
2359 yup =
fSave[bin - bin1];
2362 y = ((xup * ylow - xlow * yup) +
x * (yup - ylow)) / dx;
2366 Int_t np = fNsave - 3;
2370 if (x < xmin || x >
xmax)
return 0;
2373 if (dx <= 0)
return 0;
2376 xlow =
xmin + bin * dx;
2379 yup =
fSave[bin + 1];
2380 y = ((xup * ylow - xlow * yup) +
x * (yup - ylow)) / dx;
2392 return h->GetXaxis();
2403 return h->GetYaxis();
2414 return h->GetZaxis();
2435 return GradientParTempl<Double_t>(ipar,
x, eps);
2461 GradientParTempl<Double_t>(
x, grad, eps);
2472 if (params) args[1] = (
Long_t)params;
2486 if (!
gROOT->GetListOfFunctions()->FindObject(
"gaus")) {
2487 f1 =
new TF1(
"gaus",
"gaus", -1, 1);
2489 f1 =
new TF1(
"gausn",
"gausn", -1, 1);
2491 f1 =
new TF1(
"landau",
"landau", -1, 1);
2493 f1 =
new TF1(
"landaun",
"landaun", -1, 1);
2495 f1 =
new TF1(
"expo",
"expo", -1, 1);
2497 for (
Int_t i = 0; i < 10; i++) {
2527 Warning(
"analytical integral not available for %s - with number %d compute numerical integral",
GetName(),
GetNumber());
2624 error = iod.
Error();
2636 error = iod.
Error();
2641 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);
2642 TString msg(
"\t\tFunction Parameters = {");
2643 for (
int ipar = 0; ipar <
GetNpar(); ++ipar) {
2648 Info(
"IntegralOneDim",
"%s", msg.
Data());
2784 Int_t nfnevl, ifail;
2788 Warning(
"IntegralMultiple",
"failed code=%d, ", ifail);
2847 nfnevl = aimd.
NEval();
2853 relerr = (result != 0) ? imd.
Error() / std::abs(result) : imd.
Error();
2884 printf(
"Formula based function: %s \n",
GetName());
2887 }
else if (
fType > 0) {
2889 printf(
"Interpreted based function: %s(double *x, double *p). Ndim = %d, Npar = %d \n",
GetName(),
GetNdim(),
2894 printf(
"fComposition not found!\n");
2897 printf(
"Compiled based function: %s based on a functor object. Ndim = %d, Npar = %d\n",
GetName(),
2900 printf(
"Function based on a list of points from a compiled based function: %s. Ndim = %d, Npar = %d, Npx "
2904 Warning(
"Print",
"Function %s is based on a list of points but list is empty",
GetName());
2912 printf(
"List of Parameters: \n");
2913 for (
int i = 0; i <
fNpar; ++i)
2916 if (!
fSave.empty()) {
2918 printf(
"List of Saved points (N=%d): \n",
int(
fSave.size()));
2920 printf(
"( %10f ) ",
x);
2926 printf(
"Contained histogram\n");
2942 strlcpy(option,choptin,32);
2956 pmin =
gPad->PadtoX(
gPad->GetUxmin());
2957 pmax =
gPad->PadtoX(
gPad->GetUxmax());
2960 if (
xmax < pmin)
return;
2961 if (
xmin > pmax)
return;
2969 char *l1 = strstr(option,
"PFC");
2970 char *l2 = strstr(option,
"PLC");
2971 char *l3 = strstr(option,
"PMC");
2972 if (l1 || l2 || l3) {
2982 if (minimum <= 0 && gPad && gPad->GetLogy()) minimum = -1111;
2985 if (minimum == -1111) {
2992 if (minimum == -1111) {
2994 if (optSAME &&
gPad) hmin =
gPad->GetUymin();
2999 if (optSAME &&
gPad) hmax =
gPad->GetUymax();
3001 hmin -= 0.05 * (hmax - hmin);
3002 if (hmin < 0) hmin = 0;
3003 if (hmin <= 0 && gPad && gPad->GetLogy()) hmin = hminpos;
3010 if (maximum == -1111) {
3048 char *semicol = (
char *)strstr(
GetTitle(),
";");
3050 Int_t nxt = strlen(semicol);
3051 char *ctemp =
new char[nxt];
3052 strlcpy(ctemp, semicol + 1, nxt);
3053 semicol = (
char *)strstr(ctemp,
";");
3056 ytitle = semicol + 1;
3088 for (i = 0; i <=
fNpx; i++) {
3089 xbins[i] =
gPad->PadtoX(xlogmin + i * dlogx);
3109 for (i = 1; i <=
fNpx; i++) {
3139 if (ipar < 0 || ipar >
GetNpar() - 1)
return;
3157 int fNsave = bin2 - bin1 + 4;
3159 fSave.resize(fNsave);
3163 for (
Int_t i = bin1; i <= bin2; i++) {
3164 xv[0] =
h->GetXaxis()->GetBinCenter(i);
3173 int fNsave =
fNpx + 3;
3178 fSave.resize(fNsave);
3189 xv[0] =
xmin + dx * i;
3206 if (strstr(option,
"cc")) {
3207 out <<
"double " <<
GetName() <<
"(double xv) {" << std::endl;
3209 out <<
" double x[" <<
fNpx <<
"] = {" << std::endl;
3212 for (i = 0; i <
fNpx; i++) {
3213 out <<
fXmin + dx *i ;
3214 if (i <
fNpx - 1) out <<
", ";
3222 out <<
" };" << std::endl;
3223 out <<
" double y[" <<
fNpx <<
"] = {" << std::endl;
3226 for (i = 0; i <
fNpx; i++) {
3228 if (i <
fNpx - 1) out <<
", ";
3236 out <<
" };" << std::endl;
3237 out <<
" if (xv<x[0]) return y[0];" << std::endl;
3238 out <<
" if (xv>x[" <<
fNpx - 1 <<
"]) return y[" <<
fNpx - 1 <<
"];" << std::endl;
3239 out <<
" int i, j=0;" << std::endl;
3240 out <<
" for (i=1; i<" <<
fNpx <<
"; i++) { if (xv < x[i]) break; j++; }" << std::endl;
3241 out <<
" return y[j] + (y[j + 1] - y[j]) / (x[j + 1] - x[j]) * (xv - x[j]);" << std::endl;
3242 out <<
"}" << std::endl;
3246 out <<
" " << std::endl;
3249 static Int_t f1Number = 0;
3251 const char *
l = strstr(option,
"#");
3253 sscanf(&
l[1],
"%d", &f1Number);
3259 const char *addToGlobList =
fParent ?
", TF1::EAddToList::kNo" :
", TF1::EAddToList::kDefault";
3262 out <<
" TF1 *" << f1Name.
Data() <<
" = new TF1(" << quote <<
GetName() << quote <<
"," << quote <<
GetTitle() << quote <<
"," <<
fXmin <<
"," <<
fXmax << addToGlobList <<
");" << std::endl;
3264 out <<
" " << f1Name.
Data() <<
"->SetNpx(" <<
fNpx <<
");" << std::endl;
3267 out <<
" TF1 *" << f1Name.
Data() <<
" = new TF1(" << quote <<
"*" <<
GetName() << quote <<
"," <<
fXmin <<
"," <<
fXmax <<
"," <<
GetNpar() <<
");" << std::endl;
3268 out <<
" //The original function : " <<
GetTitle() <<
" had originally been created by:" << std::endl;
3270 out <<
", 1" << addToGlobList <<
");" << std::endl;
3271 out <<
" " << f1Name.
Data() <<
"->SetRange(" <<
fXmin <<
"," <<
fXmax <<
");" << std::endl;
3272 out <<
" " << f1Name.
Data() <<
"->SetName(" << quote <<
GetName() << quote <<
");" << std::endl;
3273 out <<
" " << f1Name.
Data() <<
"->SetTitle(" << quote <<
GetTitle() << quote <<
");" << std::endl;
3275 out <<
" " << f1Name.
Data() <<
"->SetNpx(" <<
fNpx <<
");" << std::endl;
3281 for (i = 0; i <=
fNpx; i++) {
3282 xv[0] =
fXmin + dx * i;
3284 out <<
" " << f1Name.
Data() <<
"->SetSavedPoint(" << i <<
"," << save <<
");" << std::endl;
3286 out <<
" " << f1Name.
Data() <<
"->SetSavedPoint(" <<
fNpx + 1 <<
"," <<
fXmin <<
");" << std::endl;
3287 out <<
" " << f1Name.
Data() <<
"->SetSavedPoint(" <<
fNpx + 2 <<
"," <<
fXmax <<
");" << std::endl;
3291 out <<
" " << f1Name.
Data() <<
"->SetBit(TF1::kNotDraw);" << std::endl;
3296 out <<
" " << f1Name.
Data() <<
"->SetFillColor(ci);" << std::endl;
3298 out <<
" " << f1Name.
Data() <<
"->SetFillColor(" <<
GetFillColor() <<
");" << std::endl;
3301 out <<
" " << f1Name.
Data() <<
"->SetFillStyle(" <<
GetFillStyle() <<
");" << std::endl;
3306 out <<
" " << f1Name.
Data() <<
"->SetMarkerColor(ci);" << std::endl;
3308 out <<
" " << f1Name.
Data() <<
"->SetMarkerColor(" <<
GetMarkerColor() <<
");" << std::endl;
3311 out <<
" " << f1Name.
Data() <<
"->SetMarkerStyle(" <<
GetMarkerStyle() <<
");" << std::endl;
3314 out <<
" " << f1Name.
Data() <<
"->SetMarkerSize(" <<
GetMarkerSize() <<
");" << std::endl;
3319 out <<
" " << f1Name.
Data() <<
"->SetLineColor(ci);" << std::endl;
3321 out <<
" " << f1Name.
Data() <<
"->SetLineColor(" <<
GetLineColor() <<
");" << std::endl;
3324 out <<
" " << f1Name.
Data() <<
"->SetLineWidth(" <<
GetLineWidth() <<
");" << std::endl;
3327 out <<
" " << f1Name.
Data() <<
"->SetLineStyle(" <<
GetLineStyle() <<
");" << std::endl;
3330 out <<
" " << f1Name.
Data() <<
"->SetChisquare(" <<
GetChisquare() <<
");" << std::endl;
3331 out <<
" " << f1Name.
Data() <<
"->SetNDF(" <<
GetNDF() <<
");" << std::endl;
3338 for (i = 0; i <
GetNpar(); i++) {
3339 out <<
" " << f1Name.
Data() <<
"->SetParameter(" << i <<
"," <<
GetParameter(i) <<
");" << std::endl;
3340 out <<
" " << f1Name.
Data() <<
"->SetParError(" << i <<
"," <<
GetParError(i) <<
");" << std::endl;
3342 out <<
" " << f1Name.
Data() <<
"->SetParLimits(" << i <<
"," << parmin <<
"," << parmax <<
");" << std::endl;
3344 if (!strstr(option,
"nodraw")) {
3345 out <<
" " << f1Name.
Data() <<
"->Draw("
3346 << quote << option << quote <<
");" << std::endl;
3372 Warning(
"SetFitResult",
"Empty Fit result - nothing is set in TF1");
3375 if (indpar == 0 && npar != (
int) result.
NPar()) {
3376 Error(
"SetFitResult",
"Invalid Fit result passed - number of parameter is %d , different than TF1::GetNpar() = %d", npar, result.
NPar());
3379 if (result.
Chi2() > 0)
3388 for (
Int_t i = 0; i < npar; ++i) {
3389 Int_t ipar = (indpar != 0) ? indpar[i] : i;
3390 if (ipar < 0)
continue;
3393 if (ipar < (
int) result.
Errors().size())
3448 const Int_t minPx = 4;
3449 Int_t maxPx = 10000000;
3450 if (
GetNdim() > 1) maxPx = 10000;
3451 if (npx >= minPx && npx <= maxPx) {
3454 if (npx < minPx)
fNpx = minPx;
3455 if (npx > maxPx)
fNpx = maxPx;
3456 Warning(
"SetNpx",
"Number of points must be >=%d && <= %d, fNpx set to %d", minPx, maxPx,
fNpx);
3466 if (ipar < 0 || ipar >=
GetNpar())
return;
3475void TF1::SetParNames(
const char *name0,
const char *name1,
const char *name2,
const char *name3,
const char *name4,
3476 const char *name5,
const char *name6,
const char *name7,
const char *name8,
const char *name9,
const char *name10)
3479 fFormula->SetParNames(name0, name1, name2, name3, name4, name5, name6, name7, name8, name9, name10);
3481 fParams->SetParNames(name0, name1, name2, name3, name4, name5, name6, name7, name8, name9, name10);
3488 if (ipar < 0 || ipar >
GetNpar() - 1)
return;
3499 if (!errors)
return;
3514 if (ipar < 0 || ipar > npar - 1)
return;
3515 if (
int(
fParMin.size()) != npar) {
3518 if (
int(
fParMax.size()) != npar) {
3548 if (
fSave.size() == 0) {
3551 if (point < 0 || point >=
int(
fSave.size()))
return;
3552 fSave[point] = value;
3577 if (
b.IsReading()) {
3586 b.ReadClassBuffer(TF1::Class(),
this,
v, R__s, R__c);
3589 gROOT->GetListOfFunctions()->Add(
this);
3595 fold.
Streamer(
b,
v, R__s, R__c, TF1::Class());
3597 ((TF1v5Convert *)
this)->Convert(fold);
3609 b.WriteClassBuffer(TF1::Class(),
this);
3682 TF1_EvalWrapper func(
this, params,
kTRUE,
n);
3691 Error(
"Moment",
"Integral zero over range");
3716 TF1_EvalWrapper func(
this, params,
kTRUE,
n);
3725 Error(
"Moment",
"Integral zero over range");
3823 for (
unsigned int i = 0; i <
fParNames.size(); ++i) {
3854 const char *name4,
const char *name5,
const char *name6,
const char *name7,
3855 const char *name8,
const char *name9,
const char *name10)
Double_t AnalyticalIntegral(TF1 *f, Double_t a, Double_t b)
static const double x2[5]
static const double x1[5]
bool R__SetClonesArrayTF1Updater(TF1Updater_t func)
TF1::EAddToList GetGlobalListOption(Option_t *opt)
int R__RegisterTF1UpdaterTrigger
void(*)(Int_t nobjects, TObject **from, TObject **to) TF1Updater_t
static Double_t gErrorTF1
static void R__v5TF1Updater(Int_t nobjects, TObject **from, TObject **to)
bool GetVectorizedOption(Option_t *opt)
void GetParameters(TFitEditor::FuncParams_t &pars, TF1 *func)
Stores the parameters of the given function into pars.
static unsigned int total
TRObject operator()(const T1 &t1) const
R__EXTERN TVirtualMutex * gROOTMutex
R__EXTERN TRandom * gRandom
char * Form(const char *fmt,...)
R__EXTERN TStyle * gStyle
typedef void((*Func_t)())
#define R__LOCKGUARD(mutex)
class containg the result of the fit and all the related information (fitted parameter values,...
bool IsEmpty() const
True if a fit result does not exist (even invalid) with parameter values.
const std::vector< double > & Errors() const
parameter errors (return st::vector)
double Error(unsigned int i) const
parameter error by index
unsigned int Ndf() const
Number of degree of freedom.
double Chi2() const
Chi2 fit value in case of likelihood must be computed ?
double MinFcnValue() const
Return value of the objective function (chi2 or likelihood) used in the fit.
unsigned int NPar() const
total number of parameters (abbreviation)
unsigned int NFreeParameters() const
get total number of free parameters
double Parameter(unsigned int i) const
parameter value by index
Class for adaptive quadrature integration in multi-dimensions using rectangular regions.
int Status() const
return status of integration
int NEval() const
return number of function evaluations in calculating the integral
double RelError() const
return relative error
double Integral(const double *xmin, const double *xmax)
evaluate the integral with the previously given function between xmin[] and xmax[]
User class for performing function minimization.
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...
virtual double XMinimum() const
Return current estimate of the position of the minimum.
void SetFunction(const ROOT::Math::IGenFunction &f, double xlow, double xup)
Sets function to be minimized.
void SetNpx(int npx)
Set the number of point used to bracket root using a grid.
void SetLogScan(bool on)
Set a log grid scan (default is equidistant bins) will work only if xlow > 0.
virtual double FValMinimum() const
Return function value at current estimate of the minimum.
Class for finding the root of a one dimensional function using the Brent algorithm.
double Root() const
Returns root value.
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).
void SetNpx(int npx)
Set the number of point used to bracket root using a grid.
bool SetFunction(const ROOT::Math::IGenFunction &f, double xlow, double xup)
Sets the function for the rest of the algorithms.
void SetLogScan(bool on)
Set a log grid scan (default is equidistant bins) will work only if xlow > 0.
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: ...
Functor1D class for one-dimensional functions.
User class for performing function integration.
double IntegralLow(double b)
Returns Integral of function on a lower semi-infinite interval.
double Integral(double a, double b)
Returns Integral of function between a and b.
double Error() const
Return the estimate of the absolute Error of the last Integral calculation.
void SetFunction(const IGenFunction &)
Set integration function (flag control if function must be copied inside).
virtual void SetRelTolerance(double eps)
Set the desired relative Error.
int Status() const
return the status of the last integration - 0 in case of success
double IntegralUp(double a)
Returns Integral of function on an upper semi-infinite interval.
User class for performing function integration.
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...
Interface (abstract class) for generic functions objects of one-dimension Provides a method to evalua...
virtual IBaseFunctionOneDim * Clone() const =0
Clone a function.
static IntegrationMultiDim::Type DefaultIntegratorType()
static unsigned int DefaultNCalls()
static double DefaultRelTolerance()
static double DefaultAbsTolerance()
User class for performing multidimensional integration.
double Integral(const double *xmin, const double *xmax)
evaluate the integral with the previously given function between xmin[] and xmax[]
int Status() const
return the Error Status of the last Integral calculation
double Error() const
return integration error
static double DefaultAbsTolerance()
static double DefaultRelTolerance()
static IntegrationOneDim::Type DefaultIntegratorType()
User Class for performing numerical integration of a function in one dimension.
static std::string GetName(IntegrationOneDim::Type)
static function to get a string from the enumeration
int Status() const
return the Error Status of the last Integral calculation
double IntegralUp(const IGenFunction &f, double a)
evaluate the Integral of a function f over the semi-infinite interval (a,+inf)
double Integral(Function &f, double a, double b)
evaluate the Integral of a function f over the defined interval (a,b)
double Error() const
return the estimate of the absolute Error of the last Integral calculation
double IntegralLow(const IGenFunction &f, double b)
evaluate the Integral of a function f over the over the semi-infinite interval (-inf,...
static const std::string & DefaultMinimizerType()
static const std::string & DefaultMinimizerAlgo()
Abstract Minimizer class, defining the interface for the various minimizer (like Minuit2,...
virtual const double * X() const =0
return pointer to X values at the minimum
virtual void SetFunction(const ROOT::Math::IMultiGenFunction &func)=0
set the function to minimize
void SetTolerance(double tol)
set the tolerance
virtual bool Minimize()=0
method to perform the minimization
virtual bool SetVariable(unsigned int ivar, const std::string &name, double val, double step)=0
set a new free variable
void SetMaxFunctionCalls(unsigned int maxfcn)
set maximum of function calls
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...
virtual double MinValue() const =0
return minimum function value
Param Functor class for Multidimensional functions.
User class for calculating the derivatives of a function.
double Derivative2(double x)
Returns the second derivative of the function at point x, computed by Richardson's extrapolation meth...
double Error() const
Returns the estimate of the absolute Error of the last derivative calculation.
double Derivative3(double x)
Returns the third derivative of the function at point x, computed by Richardson's extrapolation metho...
double Derivative1(double x)
Returns the first derivative of the function at point x, computed by Richardson's extrapolation metho...
Template class to wrap any C++ callable object which takes one argument i.e.
Template class to wrap any C++ callable object implementing operator() (const double * x) in a multi-...
Class to Wrap a ROOT Function class (like TF1) in a IParamFunction interface of one dimensions to be ...
void SetParameters(const double *p)
set parameter values need to call also SetParameters in TF1 in ace some other operations (re-normaliz...
Array of doubles (64 bits per element).
const Double_t * GetArray() const
Fill Area Attributes class.
virtual Color_t GetFillColor() const
Return the fill area color.
void Copy(TAttFill &attfill) const
Copy this fill attributes to a new TAttFill.
virtual Style_t GetFillStyle() const
Return the fill area style.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
virtual Color_t GetLineColor() const
Return the line color.
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
virtual Width_t GetLineWidth() const
Return the line width.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual Style_t GetLineStyle() const
Return the line style.
void Copy(TAttLine &attline) const
Copy this line attributes to a new TAttLine.
virtual Style_t GetMarkerStyle() const
Return the marker style.
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
virtual Color_t GetMarkerColor() const
Return the marker color.
virtual Size_t GetMarkerSize() const
Return the marker size.
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
void Copy(TAttMarker &attmarker) const
Copy this marker attributes to a new TAttMarker.
virtual void SetMarkerSize(Size_t msize=1)
Set the marker size.
Class to manage histogram axis.
virtual Double_t GetBinCenter(Int_t bin) const
Return center of bin.
virtual void SaveAttributes(std::ostream &out, const char *name, const char *subname)
Save axis attributes as C++ statement(s) on output stream out.
virtual Int_t FindBin(Double_t x)
Find bin number corresponding to abscissa x.
virtual void SetLimits(Double_t xmin, Double_t xmax)
const char * GetTitle() const
Returns title of object.
Using a TBrowser one can browse all ROOT objects.
Buffer base class used for serializing objects.
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
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 Copy(TObject &obj) const =0
Copy this to obj.
Class wrapping convolution of two functions.
const char * GetParName(Int_t ipar) const
Class adding two functions: c1*f1+c2*f2.
const char * GetParName(Int_t ipar) const
std::vector< double > GetParameters() const
Return array of parameters.
Int_t GetNpar() const
Return the number of (non constant) parameters including the coefficients: for 2 functions: c1,...
std::vector< Double_t > fParameters
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.
std::vector< std::string > fParNames
void SetParameters(const Double_t *params)
Int_t GetParNumber(const char *name) const
Returns the parameter number given a name not very efficient but list of parameters is typically smal...
std::unique_ptr< TF1FunctorPointer > fFunctor
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,...
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 Double_t GetXmax() const
virtual void ReleaseParameter(Int_t ipar)
Release parameter number ipar If used in a fit, the parameter can vary freely.
virtual char * GetObjectInfo(Int_t px, Int_t py) const
Redefines TObject::GetObjectInfo.
virtual void SetParError(Int_t ipar, Double_t error)
Set error for parameter number ipar.
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...
virtual Int_t GetNumber() const
virtual Int_t GetNDF() const
Return the number of degrees of freedom in the fit the fNDF parameter has been previously computed du...
std::vector< Double_t > fParErrors
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.
static void AbsValue(Bool_t reject=kTRUE)
Static function: set the fgAbsValue flag.
virtual TH1 * GetHistogram() const
Return a pointer to the histogram used to visualise the function Note that this histogram is managed ...
virtual void GetParLimits(Int_t ipar, Double_t &parmin, Double_t &parmax) const
Return limits for parameter ipar.
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...
TAxis * GetYaxis() const
Get y axis of the function.
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 GetParError(Int_t ipar) const
Return value of parameter number ipar.
static std::atomic< Bool_t > fgAddToGlobList
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 SetChisquare(Double_t chi2)
Double_t GetChisquare() const
virtual void SetMaximum(Double_t maximum=-1111)
Set the maximum value along Y for this function In case the function is already drawn,...
virtual TH1 * CreateHistogram()
std::unique_ptr< TMethodCall > fMethodCall
Pointer to histogram used for visualisation.
virtual void Copy(TObject &f1) const
Copy this F1 to a new F1.
virtual void Update()
Called by functions such as SetRange, SetNpx, SetParameters to force the deletion of the associated h...
virtual Double_t GetProb() const
Return the fit probability.
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 void SetFitResult(const ROOT::Fit::FitResult &result, const Int_t *indpar=0)
Set the result from the fit parameter values, errors, chi2, etc... Optionally a pointer to a vector (...
virtual Double_t GradientPar(Int_t ipar, const Double_t *x, Double_t eps=0.01)
Compute the gradient (derivative) wrt a parameter ipar.
TAxis * GetZaxis() const
Get z axis of the function. (In case this object is a TF2 or TF3)
virtual Double_t GetRandom(TRandom *rng=nullptr, Option_t *opt=nullptr)
Return a random number following this function shape.
virtual void SetRange(Double_t xmin, Double_t xmax)
Initialize the upper and lower bounds to draw the function.
virtual Int_t GetNpar() const
std::vector< Double_t > fBeta
Array alpha. for each bin in x the deconvolution r of fIntegral.
TH1 * fHistogram
Parent object hooking this function (if one)
std::unique_ptr< TF1AbsComposition > fComposition
virtual void SetParErrors(const Double_t *errors)
Set errors for all active parameters when calling this function, the array errors must have at least ...
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 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)
static void SetCurrent(TF1 *f1)
Static function setting the current function.
std::vector< Double_t > fAlpha
Integral of function binned on fNpx bins.
virtual Double_t Integral(Double_t a, Double_t b, Double_t epsrel=1.e-12)
IntegralOneDim or analytical integral.
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...
std::unique_ptr< TFormula > fFormula
Functor object to wrap any C++ callable object.
static Double_t DerivativeError()
Static function returning the error of the last call to the of Derivative's functions.
virtual void Paint(Option_t *option="")
Paint this function with its current attributes.
std::vector< Double_t > fParMin
static void InitStandardFunctions()
Create the basic function objects.
virtual void SetNpx(Int_t npx=100)
Set the number of points used to draw the function.
virtual Double_t * GetParameters() const
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a function.
int TermCoeffLength(TString &term)
static Bool_t fgRejectPoint
virtual ~TF1()
TF1 default destructor.
virtual void SetNumberFitPoints(Int_t npfits)
virtual Double_t EvalPar(const Double_t *x, const Double_t *params=0)
Evaluate function with given coordinates and parameters.
TF1 & operator=(const TF1 &rhs)
Operator =.
virtual Int_t GetNumberFreeParameters() const
Return the number of free parameters.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream out.
virtual void InitArgs(const Double_t *x, const Double_t *params)
Initialize parameters addresses.
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.
Bool_t fNormalized
Pointer to MethodCall in case of interpreted function.
virtual void SetMinimum(Double_t minimum=-1111)
Set the minimum value along Y for this function In case the function is already drawn,...
virtual void GetRange(Double_t *xmin, Double_t *xmax) const
Return range of a generic N-D function.
virtual void Print(Option_t *option="") const
Print TNamed name and title.
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.
virtual const char * GetParName(Int_t ipar) const
virtual void SetParLimits(Int_t ipar, Double_t parmin, Double_t parmax)
Set limits for parameter ipar.
void DoInitialize(EAddToList addToGlobList)
Common initialization of the TF1.
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).
static TF1 * GetCurrent()
Static function returning the current function being processed.
virtual Int_t GetQuantiles(Int_t nprobSum, Double_t *q, const Double_t *probSum)
Compute Quantiles for density distribution of this function.
virtual void SetParName(Int_t ipar, const char *name)
Set name of parameter number ipar.
virtual Double_t GetSave(const Double_t *x)
Get value corresponding to X in array of fSave values.
static std::atomic< Bool_t > fgAbsValue
virtual void Draw(Option_t *option="")
Draw this function with its current attributes.
TF1()
TF1 default constructor.
virtual TF1 * DrawCopy(Option_t *option="") const
Draw a copy of this function with its current attributes.
std::vector< Double_t > fParMax
virtual Bool_t IsValid() const
Return kTRUE if the function is valid.
static Bool_t DefaultAddToGlobalList(Bool_t on=kTRUE)
Static method to add/avoid to add automatically functions to the global list (gROOT->GetListOfFunctio...
std::vector< Double_t > fSave
static Bool_t RejectedPoint()
See TF1::RejectPoint above.
void DefineNSUMTerm(TObjArray *newFuncs, TObjArray *coeffNames, TString &fullFormula, TString &formula, int termStart, int termEnd, Double_t xmin, Double_t xmax)
Helper functions for NSUM parsing.
std::vector< Double_t > fGamma
Array beta. is approximated by x = alpha +beta*r *gamma*r**2.
TObject * Clone(const char *newname=0) const
Make a complete copy of the underlying object.
TObject * fParent
Array gamma.
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 DrawF1(Double_t xmin, Double_t xmax, Option_t *option="")
Draw function between xmin and xmax.
Bool_t ComputeCdfTable(Option_t *opt)
Compute the cumulative function at fNpx points between fXmin and fXmax.
virtual void SetParameters(const Double_t *params)
virtual TObject * DrawIntegral(Option_t *option="al")
Draw integral of this function.
std::vector< Double_t > fIntegral
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.
virtual TObject * DrawDerivative(Option_t *option="al")
Draw derivative of this function.
virtual Double_t Eval(Double_t x, Double_t y=0, Double_t z=0, Double_t t=0) const
Evaluate this function.
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.
std::unique_ptr< TF1Parameters > fParams
virtual void SetParameter(Int_t param, Double_t value)
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 void SetSavedPoint(Int_t point, Double_t value)
Restore value of function saved at point.
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.
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 Int_t GetNdim() const
virtual Double_t GetXmin() const
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 Bool_t AddToGlobalList(Bool_t on=kTRUE)
Add to global list of functions (gROOT->GetListOfFunctions() ) return previous status (true if the fu...
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 void Browse(TBrowser *b)
Browse.
virtual Double_t GetParameter(Int_t ipar) const
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 parametric function between a and b due to the parameter uncertainties ...
virtual Int_t GetParNumber(const char *name) const
TAxis * GetXaxis() const
Get x axis of the function.
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
A TGraph is an object made of two arrays X and Y with npoints each.
virtual void Draw(Option_t *chopt="")
Draw this graph with its current attributes.
1-D histogram with a double per channel (see TH1 documentation)}
TH1 is the base class of all histogram classes in ROOT.
virtual void SetDirectory(TDirectory *dir)
By default when an histogram is created, it is added to the list of histogram objects in the current ...
virtual void SetTitle(const char *title)
See GetStatOverflows for more information.
virtual void Print(Option_t *option="") const
Print some global quantities for this histogram.
virtual Double_t GetBinCenter(Int_t bin) const
Return bin center for 1D histogram.
virtual Double_t GetMinimumStored() const
@ kLogX
X-axis in log scale.
@ kNoStats
don't draw stats box
@ kIsZoomed
bit set when zooming on Y axis
TAxis * GetXaxis()
Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more informat...
TObject * Clone(const char *newname=0) const
Make a complete copy of the underlying object.
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...
virtual void SetMaximum(Double_t maximum=-1111)
virtual void SetMinimum(Double_t minimum=-1111)
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 Double_t GetMaximumStored() const
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
virtual void Paint(Option_t *option="")
Control routine to paint any kind of histograms.
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...
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a line.
Method or function calling interface.
The TNamed class is the base class for all named ROOT classes.
virtual void Copy(TObject &named) const
Copy this to obj.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
virtual const char * GetTitle() const
Returns title of object.
virtual TObject * Clone(const char *newname="") const
Make a clone of an object using the Streamer facility.
virtual const char * GetName() const
Returns name of object.
TObject * At(Int_t idx) const
Collectable string class.
Mother of all ROOT objects.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual void RecursiveRemove(TObject *obj)
Recursively remove this object from a list.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual TObject * FindObject(const char *name) const
Must be redefined in derived classes.
virtual void AppendPad(Option_t *option="")
Append graphics object to current pad.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
@ kCanDelete
if object in a list can be deleted
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
This is the base class for the ROOT Random number generators.
virtual Double_t Uniform(Double_t x1=1)
Returns a uniform deviate on the interval (0, x1).
virtual Double_t Rndm()
Machine independent random number generator.
void ToLower()
Change string to lower-case.
Ssiz_t First(char c) const
Find first occurrence of a character c.
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
void ToUpper()
Change string to upper case.
TString & Append(const char *cs)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Color_t GetFuncColor() const
Width_t GetFuncWidth() const
Style_t GetFuncStyle() const
TVirtualPad is an abstract base class for the Pad and Canvas classes.
virtual TVirtualPad * GetSelectedPad() const =0
virtual TVirtualPad * cd(Int_t subpadnumber=0)=0
Namespace for new Math classes and functions.
void function(const Char_t *name_, T fun, const Char_t *docstring=0)
double IntegralError(TF1 *func, Int_t ndim, const double *a, const double *b, const double *params, const double *covmat, double epsilon)
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
Short_t Max(Short_t a, Short_t b)
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...
Double_t QuietNaN()
Returns a quiet NaN as defined by IEEE 754
Double_t Sqrt(Double_t x)
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Bool_t AreEqualRel(Double_t af, Double_t bf, Double_t relPrec)
Long64_t BinarySearch(Long64_t n, const T *array, T value)
Double_t Log10(Double_t x)
Double_t Infinity()
Returns an infinity as defined by the IEEE standard.
void Streamer(TBuffer &b, Int_t version, UInt_t start, UInt_t count, const TClass *onfile_class=0)
Stream a class object.
virtual TF1FunctorPointer * Clone() const =0