318 fNdim=function->GetNdim();
319 if (!function->IsLinear()){
320 Int_t number=function->GetNumber();
321 if (number<299 || number>310){
322 Error(
"TLinearFitter",
"Trying to fit with a nonlinear function");
393 fY.ResizeTo(newsize);
394 fE.ResizeTo(newsize);
444 Error(
"AddPoint",
"Point can't be added, because the formula hasn't been set");
462 Error(
"AddData",
"Those points are already added");
466 if (
fX.GetMatrixArray()==
x &&
fY.GetMatrixArray()==
y){
468 if (
fE.GetMatrixArray()==
e)
473 fX.Use(npoints, xncols,
x);
478 fE.ResizeTo(npoints);
488 for (
Int_t i=xfirst; i<npoints; i++)
510 for (i=1; i<npar; i++)
512 for (i=0; i<npar; i++)
518 for (i=0; i<npar; i++)
541 Error(
"AddToDesign",
"Function %s has no linear parts - maybe missing a ++ in the formula expression",
fInputFunction->GetName());
694 temp2 = (
fY(i)-temp)*(
fY(i)-temp);
695 temp2 /=
fE(i)*
fE(i);
706 for (i=1; i<npar; i++)
707 val[i] = val[i-1]*
fX(point, 0);
708 for (i=0; i<npar; i++)
715 for (i=0; i<npar; i++)
725 temp2 = (
fY(point)-temp)*(
fY(point)-temp);
726 temp2 /=
fE(point)*
fE(point);
754 Error(
"TLinearFitter::Eval",
"The formula hasn't been set");
795 for (ii=0; ii<i; ii++)
822 Error(
"Eval",
"Matrix inversion failed");
859 for (ii=0; ii<i; ii++){
880 Error(
"FixParameter",
"no value available to fix the parameter");
884 Error(
"FixParameter",
"illegal parameter value");
888 Error(
"FixParameter",
"no free parameters left");
903 Error(
"FixParameter",
"illegal parameter value");
907 Error(
"FixParameter",
"no free parameters left");
925 Error(
"ReleaseParameter",
"illegal parameter value");
929 Warning(
"ReleaseParameter",
"This parameter is not fixed\n");
942 if (
v.GetNoElements()!=
fAtb.GetNoElements())
943 v.ResizeTo(
fAtb.GetNoElements());
983 for (
Int_t ipoint=0; ipoint<
n; ipoint++){
990 sum_vector[irow]+=
fParCovar(irow,icol)*grad[icol];
994 c+=grad[i]*sum_vector[i];
996 ci[ipoint]=
c*t*chidf;
1000 delete [] sum_vector;
1027 Error(
"GetConfidenceIntervals",
"The case of fitting not with a TFormula is not yet implemented");
1036 Error(
"GetConfidenceIntervals",
"A TGraphErrors should be passed instead of a graph");
1040 Error(
"GetConfidenceIntervals",
"A TGraph2DErrors should be passed instead of a graph");
1045 Error(
"GetConfidenceIntervals",
"A TGraph2DErrors or a TH23 should be passed instead of a graph");
1051 for (
Int_t i=0; i<
gr->GetN(); i++)
1059 Error(
"GetConfidenceIntervals",
"A TGraph2DErrors should be passed instead of a TGraph2D");
1063 Error(
"GetConfidenceIntervals",
"A TGraphErrors should be passed instead of a TGraph2D");
1068 Error(
"GetConfidenceIntervals",
"A TGraphErrors or a TH1 should be passed instead of a graph");
1081 for (
Int_t ipoint=0; ipoint<np; ipoint++){
1089 sum_vector[irow]+=
fParCovar(irow, icol)*grad[icol];
1092 c+=grad[i]*sum_vector[i];
1095 gr2->
GetEZ()[ipoint]=
c*t*chidf;
1098 delete [] sum_vector;
1104 if (((
TH1*)obj)->GetDimension()>1){
1105 Error(
"GetConfidenceIntervals",
"Fitted graph and passed histogram have different number of dimensions");
1110 if (((
TH1*)obj)->GetDimension()!=2){
1111 Error(
"GetConfidenceIntervals",
"Fitted graph and passed histogram have different number of dimensions");
1117 Error(
"GetConfidenceIntervals",
"Fitted and passed histograms have different number of dimensions");
1140 for (
Int_t binz=hzfirst; binz<=hzlast; binz++){
1142 for (
Int_t biny=hyfirst; biny<=hylast; biny++) {
1144 for (
Int_t binx=hxfirst; binx<=hxlast; binx++) {
1151 sum_vector[irow]+=
fParCovar(irow, icol)*grad[icol];
1154 c+=grad[i]*sum_vector[i];
1162 delete [] sum_vector;
1165 Error(
"GetConfidenceIntervals",
"This object type is not supported");
1232 Error(
"GetParError",
"illegal value of parameter");
1250 Error(
"GetParError",
"illegal value of parameter");
1264 Error(
"GetParError",
"illegal value of parameter");
1278 Error(
"GetParTValue",
"illegal value of parameter");
1292 Error(
"GetParSignificance",
"illegal value of parameter");
1306 Error(
"GetFitSample",
"there is no fit sample in ordinary least-squares fit");
1319 if (!list)
return -1;
1324 Error(
"Add",
"Attempt to add object of class: %s to a %s",lfit->
ClassName(),this->ClassName());
1365 for (
int i=0; i<
size; i++)
1379 fY.ResizeTo(ndim+1);
1380 fX.ResizeTo(ndim+1, ndim);
1381 fE.ResizeTo(ndim+1);
1412 fstring = (
char *)strstr(
fFormula,
"hyp");
1413 if (fstring!=
nullptr){
1416 sscanf(fstring,
"%d", &
size);
1425 sstring = sstring.
ReplaceAll(
"++", 2,
"|", 1);
1443 for (i=0; i<
fNdim; i++){
1444 std::string pattern =
"x" + std::to_string(i);
1445 std::string replacement =
"x[" + std::to_string(i) +
"]";
1446 sstring = sstring.
ReplaceAll(pattern.c_str(), replacement.c_str());
1467 Error(
"TLinearFitter",
"f_linear not allocated");
1470 special=
f->GetNumber();
1474 if ((
fNfunctions==1)&&(special>299)&&(special<310)){
1506 for (i=0; i<
size; i++)
1526 if ((special>299)&&(special<310)){
1568 ((
TF1*)function)->GetParLimits(i,al,bl);
1569 if (al*bl !=0 && al >= bl) {
1600 if (!strcmp(command,
"FitGraph")){
1604 if (!strcmp(command,
"FitGraph2D")){
1608 if (!strcmp(command,
"FitMultiGraph")){
1626 printf(
"Fitting results:\nParameters:\nNO.\t\tVALUE\t\tERROR\n");
1631 printf(
"Fitting results:\nParameters:\nNO.\t\tVALUE\n");
1633 printf(
"%d\t%e\n", i,
fParams(i));
1654 Int_t fitResult = 0;
1665 for (
Int_t i=0; i<
n; i++){
1666 if (!
f1->IsInside(&
x[i]))
continue;
1668 if (
e<0 || fitOption.
W1)
1683 for (
Int_t i=0; i<
n; i++){
1684 if (!
f1->IsInside(&
x[i]))
continue;
1685 temp=
f1->Eval(
x[i]);
1686 temp2=(
y[i]-temp)*(
y[i]-temp);
1688 if (
e<0 || fitOption.
W1)
1727 for (
Int_t bin=0;bin<
n;bin++) {
1734 e=
gr->GetErrorZ(bin);
1735 if (
e<0 || fitOption.
W1)
1750 for (
Int_t bin=0; bin<
n; bin++){
1758 temp=f2->
Eval(
x[0],
x[1]);
1759 temp2=(z-temp)*(z-temp);
1760 e=
gr->GetErrorZ(bin);
1761 if (
e<0 || fitOption.
W1)
1801 for (i=0; i<
n; i++){
1802 if (!
f1->IsInside(&gx[i]))
continue;
1804 if (
e<0 || fitOption.
W1)
1825 for (i=0; i<
n; i++){
1826 if (!
f1->IsInside(&gx[i]))
continue;
1827 temp=
f1->Eval(gx[i]);
1828 temp2=(gy[i]-temp)*(gy[i]-temp);
1830 if (
e<0 || fitOption.
W1)
1854 Int_t bin,binx,biny,binz;
1875 for (binz=hzfirst;binz<=hzlast;binz++) {
1877 for (biny=hyfirst;biny<=hylast;biny++) {
1879 for (binx=hxfirst;binx<=hxlast;binx++) {
1881 if (!
f1->IsInside(
x))
continue;
1882 bin = hfit->
GetBin(binx,biny,binz);
1889 if (fitOption.
W1==1 && cu == 0)
continue;
1893 if (eu <= 0)
continue;
1905 for (binz=hzfirst;binz<=hzlast;binz++) {
1907 for (biny=hyfirst;biny<=hylast;biny++) {
1909 for (binx=hxfirst;binx<=hxlast;binx++) {
1911 if (!
f1->IsInside(
x))
continue;
1912 bin = hfit->
GetBin(binx,biny,binz);
1916 if (fitOption.
W1==1 && cu == 0)
continue;
1920 if (eu <= 0)
continue;
1922 temp=
f1->EvalPar(
x);
1923 temp2=(cu-temp)*(cu-temp);
1974 Int_t i, j, maxind=0, k, k1 = 500;
1979 Error(
"TLinearFitter::EvalRobust",
"The formula hasn't been set");
1985 for (i=0; i<nbest; i++)
1994 if (
h>0)
Warning(
"Fitting:",
"illegal value of H, default is taken, h = %3.2f",
double(hdef)/
fNpoints);
2010 for (k = 0; k < k1; k++) {
2012 chi2 =
CStep(1,
fH, residuals,index, index, -1, -1);
2013 chi2 =
CStep(2,
fH, residuals,index, index, -1, -1);
2015 if (chi2 < bestchi2[maxind]) {
2016 bestchi2[maxind] = chi2;
2018 cstock(i, maxind) =
fParams(i);
2025 for (i=0; i<nbest; i++) {
2029 while (chi2 >
kEps) {
2030 chi2 =
CStep(2,
fH, residuals,index, index, -1, -1);
2037 if (chi2 <= currentbest +
kEps) {
2038 for (j=0; j<
fH; j++){
2039 bestindex[j]=index[j];
2048 fParams(j) = cstock(j, maxind);
2050 for (j=0; j<
fH; j++){
2060 delete [] bestindex;
2061 delete [] residuals;
2076 RDraw(subdat, indsubdat);
2081 Int_t i_end = indsubdat[0];
2083 for (
Int_t kgroup = 0; kgroup < nsub; kgroup++) {
2086 for (i=0; i<nbest; i++)
2088 for (k=0; k<k2; k++) {
2090 chi2 =
CStep(1, hsub, residuals, index, subdat, i_start, i_end);
2091 chi2 =
CStep(2, hsub, residuals, index, subdat, i_start, i_end);
2093 if (chi2 < bestchi2[maxind]){
2095 cstockbig(i, nbest*kgroup + maxind) =
fParams(i);
2096 bestchi2[maxind] = chi2;
2099 if (kgroup != nsub - 1){
2100 i_start += indsubdat[kgroup];
2101 i_end += indsubdat[kgroup+1];
2105 for (i=0; i<nbest; i++)
2109 for (k=0; k<nbest*5; k++) {
2112 chi2 =
CStep(1, hsub2, residuals, index, subdat, 0,
sum);
2113 chi2 =
CStep(2, hsub2, residuals, index, subdat, 0,
sum);
2115 if (chi2 < bestchi2[maxind]){
2116 beststock[maxind] = k;
2117 bestchi2[maxind] = chi2;
2122 for (k=0; k<nbest; k++) {
2124 fParams(i) = cstockbig(i, beststock[k]);
2125 chi2 =
CStep(1,
fH, residuals, index, index, -1, -1);
2126 chi2 =
CStep(2,
fH, residuals, index, index, -1, -1);
2132 fParams(i)=cstockbig(i, beststock[maxind]);
2135 while (chi2 >
kEps) {
2136 chi2 =
CStep(2,
fH, residuals, index, index, -1, -1);
2140 bestchi2[maxind] = chi2;
2144 for (j=0; j<
fH; j++)
2153 delete [] beststock;
2155 delete [] residuals;
2171 for(i=0; i<ntotal; i++)
2172 index[i] = ntotal+1;
2177 num=
Int_t(
r.Uniform(0, 1)*(ntotal-1));
2179 for(j=0; j<=i-1; j++) {
2204 while (!ok && (nindex <
h)) {
2207 num=
Int_t(
r.Uniform(0,1)*(ntotal-1));
2209 for(i=0; i<nindex; i++) {
2215 }
while(repeat==
kTRUE);
2217 index[nindex] = num;
2238 for (i=0; i<
n; i++) {
2240 itemp = subdat[
start+i];
2249 for (j=1; j<npar; j++)
2250 val[j] = val[j-1]*
fX(itemp, 0);
2251 for (j=0; j<npar; j++)
2257 for (j=0; j<npar; j++)
2268 residuals[i] = (
fY(itemp) - func)*(
fY(itemp) - func)/(
fE(i)*
fE(i));
2282 for (j=1; j<npar; j++)
2283 val[j] = val[j-1]*
fX(i, 0);
2284 for (j=0; j<npar; j++)
2290 for (j=0; j<npar; j++)
2300 residuals[i] = (
fY(i) - func)*(
fY(i) - func)/(
fE(i)*
fE(i));
2314 if (step==1)
return 0;
2319 for (i=0; i<
h; i++) {
2320 itemp = subdat[
start+index[i]];
2329 for (j=1; j<npar; j++)
2330 val[j] = val[j-1]*
fX(itemp, 0);
2331 for (j=0; j<npar; j++)
2337 for (j=0; j<npar; j++)
2347 sum+=(
fY(itemp)-func)*(
fY(itemp)-func)/(
fE(itemp)*
fE(itemp));
2350 for (i=0; i<
h; i++) {
2359 for (j=1; j<npar; j++)
2360 val[j] = val[j-1]*
fX(index[i], 0);
2361 for (j=0; j<npar; j++)
2368 for (j=0; j<npar; j++)
2380 sum+=(
fY(index[i])-func)*(
fY(index[i])-func)/(
fE(index[i])*
fE(index[i]));
2414 Error(
"Linf",
"Matrix inversion failed");
2467 for(
Int_t i=0; i<5; i++)
2486 for (i=0; i<5; i++) {
2487 if (indsubdat[i]!=0)
2491 for (k=1; k<=ngroup; k++) {
2492 for (
m=1;
m<=indsubdat[k-1];
m++) {
2498 subdat[jndex-1] = nrand + jndex - 2;
2499 for (i=1; i<=jndex-1; i++) {
2500 if(subdat[i-1] > nrand+i-2) {
2501 for(j=jndex; j>=i+1; j--) {
2502 subdat[j-1] = subdat[j-2];
2504 subdat[i-1] = nrand+i-2;
static void update(gsl_integration_workspace *workspace, double a1, double b1, double area1, double error1, double a2, double b2, double area2, double error2)
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
int Int_t
Signed integer 4 bytes (int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
double Double_t
Double 8 bytes.
const char Option_t
Option string (const char).
#define R__ASSERT(e)
Checks condition e and reports a fatal error if it's false.
TMatrixTRow< Double_t > TMatrixDRow
TMatrixT< Double_t > TMatrixD
externTVirtualMutex * gROOTMutex
TVectorT< Double_t > TVectorD
#define R__LOCKGUARD(mutex)
Class to manage histogram axis.
virtual Double_t GetBinCenter(Int_t bin) const
Return center of bin.
Int_t GetLast() const
Return last bin on the axis i.e.
Int_t GetFirst() const
Return first bin on the axis i.e.
void SetBitNumber(UInt_t bitnumber, Bool_t value=kTRUE)
Buffer base class used for serializing objects.
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=nullptr)=0
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
Collection abstract base class.
Cholesky Decomposition class.
Bool_t Solve(TVectorD &b) override
Solve equations Ax=b assuming A has been factored by Cholesky.
Bool_t Invert(TMatrixDSym &inv)
For a symmetric matrix A(m,m), its inverse A_inv(m,m) is returned .
virtual Double_t Eval(Double_t x, Double_t y=0, Double_t z=0, Double_t t=0) const
virtual void SetChisquare(Double_t chi2)
virtual TFormula * GetFormula()
Bool_t IsInside(const Double_t *x) const override
return kTRUE if the point is inside the function range
virtual void SetPoint(Int_t point, Double_t x, Double_t y, Double_t z)
virtual Double_t * GetEZ() const
virtual Double_t GetErrorY(Int_t bin) const
TH1 is the base class of all histogram classes in ROOT.
virtual Double_t GetBinError(Int_t bin) const
Return value of error associated to bin number bin.
virtual Int_t GetDimension() const
virtual Int_t GetBin(Int_t binx, Int_t biny=0, Int_t binz=0) const
Return Global bin number corresponding to binx,y,z.
virtual void SetBinError(Int_t bin, Double_t error)
Set the bin Error Note that this resets the bin eror option to be of Normal Type and for the non-empt...
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 GetBinContent(Int_t bin) const
Return content of bin number bin.
virtual void AddTempMatrices()
TMatrixDSym fDesignTemp2
!
Int_t GraphLinearFitter(Double_t h)
Used in TGraph::Fit().
~TLinearFitter() override
Linear fitter cleanup.
TMatrixDSym fDesignTemp
! temporary matrix, used for num.stability
virtual Double_t GetChisquare()
Get the Chisquare.
Int_t Partition(Int_t nmini, Int_t *indsubdat)
divides the elements into approximately equal subgroups number of elements in each subgroup is stored...
virtual void GetErrors(TVectorD &vpar)
Returns parameter errors.
Double_t CStep(Int_t step, Int_t h, Double_t *residuals, Int_t *index, Int_t *subdat, Int_t start, Int_t end)
The CStep procedure, as described in the article.
virtual Int_t Merge(TCollection *list)
Merge objects in list.
void ComputeTValues()
Computes parameters' t-values and significance.
void Clear(Option_t *option="") override
Clears everything. Used in TH1::Fit and TGraph::Fit().
TLinearFitter()
default c-tor, input data is stored If you don't want to store the input data, run the function Store...
const char * GetParName(Int_t ipar) const override
Returns name of parameter #ipar.
Int_t MultiGraphLinearFitter(Double_t h)
Minimisation function for a TMultiGraph.
virtual Double_t GetParSignificance(Int_t ipar)
Returns the significance of parameter #ipar.
virtual Int_t Eval()
Perform the fit and evaluate the parameters Returns 0 if the fit is ok, 1 if there are errors.
void PrintResults(Int_t level, Double_t amin=0) const override
Level = 3 (to be consistent with minuit) prints parameters and parameter errors.
Int_t HistLinearFitter()
Minimization function for H1s using a Chisquare method.
Int_t Graph2DLinearFitter(Double_t h)
Minimisation function for a TGraph2D.
TVectorD fAtbTemp
! temporary vector, used for num.stability
virtual void ClearPoints()
To be used when different sets of points are fitted with the same formula.
TMatrixDSym fDesignTemp3
!
Int_t ExecuteCommand(const char *command, Double_t *args, Int_t nargs) override
To use in TGraph::Fit and TH1::Fit().
virtual void GetFitSample(TBits &bits)
For robust lts fitting, returns the sample, on which the best fit was based.
virtual void Add(TLinearFitter *tlf)
Add another linear fitter to this linear fitter.
virtual void GetDesignMatrix(TMatrixD &matr)
Returns the internal design matrix.
void Streamer(TBuffer &) override
Stream an object of class TObject.
virtual void AssignData(Int_t npoints, Int_t xncols, Double_t *x, Double_t *y, Double_t *e=nullptr)
This function is to use when you already have all the data in arrays and don't want to copy them into...
virtual void GetParameters(TVectorD &vpar)
Returns parameter values.
void RDraw(Int_t *subdat, Int_t *indsubdat)
Draws ngroup nonoverlapping subdatasets out of a dataset of size n such that the selected case number...
static std::map< TString, TFormula * > fgFormulaMap
! map of basis functions and formula
virtual void SetDim(Int_t n)
set the number of dimensions
TFormula * fInputFunction
void GetConfidenceIntervals(Int_t n, Int_t ndim, const Double_t *x, Double_t *ci, Double_t cl=0.95) override
Computes point-by-point confidence intervals for the fitted function Parameters: n - number of points...
virtual Bool_t UpdateMatrix()
Update the design matrix after the formula has been changed.
virtual void GetAtbVector(TVectorD &v)
Get the Atb vector - a vector, used for internal computations.
virtual void Chisquare()
Calculates the chisquare.
virtual void SetBasisFunctions(TObjArray *functions)
set the basis functions in case the fitting function is not set directly The TLinearFitter will manag...
Double_t fY2Temp
! temporary variable used for num.stability
Double_t fVal[1000]
! temporary
virtual Int_t EvalRobust(Double_t h=-1)
Finds the parameters of the fitted function in case data contains outliers.
Double_t GetParError(Int_t ipar) const override
Returns the error of parameter #ipar.
void AddToDesign(Double_t *x, Double_t y, Double_t e)
Add a point to the AtA matrix and to the Atb vector.
TLinearFitter(const TLinearFitter &)=delete
void FixParameter(Int_t ipar) override
Fixes paramter #ipar at its current value.
void CreateSubset(Int_t ntotal, Int_t h, Int_t *index)
Creates a p-subset to start ntotal - total number of points from which the subset is chosen.
virtual void SetFormula(const char *formula)
Additive parts should be separated by "++".
void ReleaseParameter(Int_t ipar) override
Releases parameter #ipar.
virtual void AddPoint(Double_t *x, Double_t y, Double_t e=1)
Adds 1 point to the fitter.
virtual Double_t GetParTValue(Int_t ipar)
Returns the t-value for parameter #ipar.
Double_t * GetCovarianceMatrix() const override
Returns covariance matrix.
Double_t GetParameter(Int_t ipar) const override
virtual void StoreData(Bool_t store)
TMatrixTBase< Element > & ResizeTo(Int_t nrows, Int_t ncols, Int_t=-1) override
Set size of the matrix to nrows x ncols New dynamic elements are created, the overlapping part of the...
TList * GetListOfGraphs() const
const char * GetName() const override
Returns name of object.
Int_t GetEntriesFast() const
void Delete(Option_t *option="") override
Remove all objects from the array AND delete all heap based objects.
TObject * UncheckedAt(Int_t i) const
Collectable string class.
virtual const char * GetName() const
Returns name of object.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
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.
virtual TClass * IsA() const
TObject()
TObject constructor.
Random number generator class based on the maximally equidistributed combined Tausworthe generator by...
This is the base class for the ROOT Random number generators.
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
void ToUpper()
Change string to upper case.
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
TVectorT< Element > & ResizeTo(Int_t lwb, Int_t upb)
Resize the vector to [lwb:upb] .
Int_t GetNoElements() const
virtual Int_t GetXlast() const
virtual Int_t GetYfirst() const
virtual TObject * GetObjectFit() const
virtual Foption_t GetFitOption() const
TVirtualFitter(const TVirtualFitter &)=delete
virtual Int_t GetZfirst() const
virtual Int_t GetZlast() const
virtual Int_t GetXfirst() const
TObject * fObjectFit
Pointer to object being fitted.
virtual Int_t GetYlast() const
static TVirtualFitter * GetFitter()
static: return the current Fitter
virtual TObject * GetUserFunc() const
Element KOrdStat(Size n, const Element *a, Size k, Size *work=0)
Returns k_th order statistic of the array a of size n (k_th smallest element out of n elements).
Long64_t LocMin(Long64_t n, const T *a)
Returns index of array with the minimum element.
T MinElement(Long64_t n, const T *a)
Returns minimum of array a of length n.
Long64_t LocMax(Long64_t n, const T *a)
Returns index of array with the maximum element.
Double_t Sqrt(Double_t x)
Returns the square root of x.
Short_t Min(Short_t a, Short_t b)
Returns the smallest of a and b.
Double_t StudentI(Double_t T, Double_t ndf)
Double_t StudentQuantile(Double_t p, Double_t ndf, Bool_t lower_tail=kTRUE)
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.
static uint64_t sum(uint64_t i)