333 if (number<299 || number>310){
334 Error(
"TLinearFitter",
"Trying to fit with a nonlinear function");
363 fParams(tlf.fParams),
364 fParCovar(tlf.fParCovar),
365 fTValues(tlf.fTValues),
366 fParSign(tlf.fParSign),
367 fDesign(tlf.fDesign),
368 fDesignTemp(tlf.fDesignTemp),
369 fDesignTemp2(tlf.fDesignTemp2),
370 fDesignTemp3(tlf.fDesignTemp3),
372 fAtbTemp(tlf.fAtbTemp),
373 fAtbTemp2(tlf.fAtbTemp2),
374 fAtbTemp3(tlf.fAtbTemp3),
375 fFunctions( * (
TObjArray *)tlf.fFunctions.Clone()),
378 fY2Temp(tlf.fY2Temp),
381 fInputFunction(tlf.fInputFunction),
383 fNpoints(tlf.fNpoints),
384 fNfunctions(tlf.fNfunctions),
385 fFormulaSize(tlf.fFormulaSize),
387 fNfixed(tlf.fNfixed),
388 fSpecial(tlf.fSpecial),
391 fStoreData(tlf.fStoreData),
392 fChisquare(tlf.fChisquare),
394 fRobust(tlf.fRobust),
395 fFitsample(tlf.fFitsample),
580 Error(
"AddPoint",
"Point can't be added, because the formula hasn't been set");
598 Error(
"AddData",
"Those points are already added");
609 fX.
Use(npoints, xncols,
x);
624 for (
Int_t i=xfirst; i<npoints; i++)
646 for (i=1; i<npar; i++)
648 for (i=0; i<npar; i++)
654 for (i=0; i<npar; i++)
671 Error(
"AddToDesign",
"Basis Function %s is of an invalid type %s",obj->
GetName(),obj->IsA()->
GetName());
677 Error(
"AddToDesign",
"Function %s has no linear parts - maybe missing a ++ in the formula expression",
fInputFunction->
GetName());
830 temp2 = (
fY(i)-temp)*(
fY(i)-temp);
831 temp2 /=
fE(i)*
fE(i);
842 for (i=1; i<npar; i++)
843 val[i] = val[i-1]*
fX(point, 0);
844 for (i=0; i<npar; i++)
851 for (i=0; i<npar; i++)
861 temp2 = (
fY(point)-temp)*(
fY(point)-temp);
862 temp2 /=
fE(point)*
fE(point);
890 Error(
"TLinearFitter::Eval",
"The formula hasn't been set");
931 for (ii=0; ii<i; ii++)
958 Error(
"Eval",
"Matrix inversion failed");
995 for (ii=0; ii<i; ii++){
1016 Error(
"FixParameter",
"no value available to fix the parameter");
1020 Error(
"FixParameter",
"illegal parameter value");
1024 Error(
"FixParameter",
"no free parameters left");
1039 Error(
"FixParameter",
"illegal parameter value");
1043 Error(
"FixParameter",
"no free parameters left");
1061 Error(
"ReleaseParameter",
"illegal parameter value");
1065 Warning(
"ReleaseParameter",
"This parameter is not fixed\n");
1119 for (
Int_t ipoint=0; ipoint<
n; ipoint++){
1126 sum_vector[irow]+=
fParCovar(irow,icol)*grad[icol];
1130 c+=grad[i]*sum_vector[i];
1132 ci[ipoint]=
c*t*chidf;
1136 delete [] sum_vector;
1163 Error(
"GetConfidenceIntervals",
"The case of fitting not with a TFormula is not yet implemented");
1172 Error(
"GetConfidenceIntervals",
"A TGraphErrors should be passed instead of a graph");
1176 Error(
"GetConfidenceIntervals",
"A TGraph2DErrors should be passed instead of a graph");
1181 Error(
"GetConfidenceIntervals",
"A TGraph2DErrors or a TH23 should be passed instead of a graph");
1195 Error(
"GetConfidenceIntervals",
"A TGraph2DErrors should be passed instead of a TGraph2D");
1199 Error(
"GetConfidenceIntervals",
"A TGraphErrors should be passed instead of a TGraph2D");
1204 Error(
"GetConfidenceIntervals",
"A TGraphErrors or a TH1 should be passed instead of a graph");
1217 for (
Int_t ipoint=0; ipoint<np; ipoint++){
1225 sum_vector[irow]+=
fParCovar(irow, icol)*grad[icol];
1228 c+=grad[i]*sum_vector[i];
1231 gr2->
GetEZ()[ipoint]=
c*t*chidf;
1234 delete [] sum_vector;
1241 Error(
"GetConfidenceIntervals",
"Fitted graph and passed histogram have different number of dimensions");
1247 Error(
"GetConfidenceIntervals",
"Fitted graph and passed histogram have different number of dimensions");
1253 Error(
"GetConfidenceIntervals",
"Fitted and passed histograms have different number of dimensions");
1276 for (
Int_t binz=hzfirst; binz<=hzlast; binz++){
1278 for (
Int_t biny=hyfirst; biny<=hylast; biny++) {
1280 for (
Int_t binx=hxfirst; binx<=hxlast; binx++) {
1287 sum_vector[irow]+=
fParCovar(irow, icol)*grad[icol];
1290 c+=grad[i]*sum_vector[i];
1298 delete [] sum_vector;
1301 Error(
"GetConfidenceIntervals",
"This object type is not supported");
1368 Error(
"GetParError",
"illegal value of parameter");
1386 Error(
"GetParError",
"illegal value of parameter");
1400 Error(
"GetParError",
"illegal value of parameter");
1414 Error(
"GetParTValue",
"illegal value of parameter");
1428 Error(
"GetParSignificance",
"illegal value of parameter");
1442 Error(
"GetFitSample",
"there is no fit sample in ordinary least-squares fit");
1455 if (!list)
return -1;
1460 Error(
"Add",
"Attempt to add object of class: %s to a %s",lfit->
ClassName(),this->ClassName());
1501 for (
int i=0; i<size; i++)
1535 Int_t size = 0, special = 0;
1548 fstring = (
char *)strstr(
fFormula,
"hyp");
1552 sscanf(fstring,
"%d", &size);
1561 sstring = sstring.
ReplaceAll(
"++", 2,
"|", 1);
1580 char replacement[14];
1581 for (i=0; i<
fNdim; i++){
1583 snprintf(replacement,
sizeof(replacement),
"x[%d]", i);
1605 Error(
"TLinearFitter",
"f_linear not allocated");
1608 special=
f->GetNumber();
1612 if ((
fNfunctions==1)&&(special>299)&&(special<310)){
1623 fDesign.ResizeTo(size, size);
1624 fAtb.ResizeTo(size);
1625 fDesignTemp.ResizeTo(size, size);
1626 fDesignTemp2.ResizeTo(size, size);
1627 fDesignTemp3.ResizeTo(size, size);
1628 fAtbTemp.ResizeTo(size);
1629 fAtbTemp2.ResizeTo(size);
1630 fAtbTemp3.ResizeTo(size);
1632 delete [] fFixedParams;
1633 fFixedParams=
new Bool_t[size];
1637 fDesignTemp2.Zero();
1638 fDesignTemp3.Zero();
1644 for (i=0; i<size; i++)
1656 Int_t special, size;
1664 if ((special>299)&&(special<310)){
1699 for (
Int_t i=0; i<size; i++)
1707 if (al*bl !=0 && al >= bl) {
1738 if (!strcmp(command,
"FitGraph")){
1742 if (!strcmp(command,
"FitGraph2D")){
1746 if (!strcmp(command,
"FitMultiGraph")){
1764 printf(
"Fitting results:\nParameters:\nNO.\t\tVALUE\t\tERROR\n");
1769 printf(
"Fitting results:\nParameters:\nNO.\t\tVALUE\n");
1771 printf(
"%d\t%e\n", i,
fParams(i));
1792 Int_t fitResult = 0;
1803 for (
Int_t i=0; i<
n; i++){
1806 if (
e<0 || fitOption.
W1)
1821 for (
Int_t i=0; i<
n; i++){
1824 temp2=(
y[i]-temp)*(
y[i]-temp);
1826 if (
e<0 || fitOption.
W1)
1865 for (
Int_t bin=0;bin<
n;bin++) {
1872 e=
gr->GetErrorZ(bin);
1873 if (
e<0 || fitOption.
W1)
1888 for (
Int_t bin=0; bin<
n; bin++){
1896 temp=f2->
Eval(
x[0],
x[1]);
1897 temp2=(z-temp)*(z-temp);
1898 e=
gr->GetErrorZ(bin);
1899 if (
e<0 || fitOption.
W1)
1934 TIter next(
mg->GetListOfGraphs());
1939 for (i=0; i<
n; i++){
1942 if (
e<0 || fitOption.
W1)
1963 for (i=0; i<
n; i++){
1966 temp2=(gy[i]-temp)*(gy[i]-temp);
1968 if (
e<0 || fitOption.
W1)
1992 Int_t bin,binx,biny,binz;
2013 for (binz=hzfirst;binz<=hzlast;binz++) {
2015 for (biny=hyfirst;biny<=hylast;biny++) {
2017 for (binx=hxfirst;binx<=hxlast;binx++) {
2020 bin = hfit->
GetBin(binx,biny,binz);
2027 if (fitOption.
W1==1 && cu == 0)
continue;
2031 if (
eu <= 0)
continue;
2043 for (binz=hzfirst;binz<=hzlast;binz++) {
2045 for (biny=hyfirst;biny<=hylast;biny++) {
2047 for (binx=hxfirst;binx<=hxlast;binx++) {
2050 bin = hfit->
GetBin(binx,biny,binz);
2054 if (fitOption.
W1==1 && cu == 0)
continue;
2058 if (
eu <= 0)
continue;
2061 temp2=(cu-temp)*(cu-temp);
2077void TLinearFitter::Streamer(
TBuffer &R__b)
2112 Int_t i, j, maxind=0, k, k1 = 500;
2117 Error(
"TLinearFitter::EvalRobust",
"The formula hasn't been set");
2123 for (i=0; i<nbest; i++)
2128 if (
h>0.000001 && h<1 && fNpoints*h > hdef)
2132 if (
h>0)
Warning(
"Fitting:",
"illegal value of H, default is taken, h = %3.2f",
double(hdef)/
fNpoints);
2148 for (k = 0; k < k1; k++) {
2150 chi2 =
CStep(1,
fH, residuals,index, index, -1, -1);
2151 chi2 =
CStep(2,
fH, residuals,index, index, -1, -1);
2153 if (chi2 < bestchi2[maxind]) {
2154 bestchi2[maxind] = chi2;
2156 cstock(i, maxind) =
fParams(i);
2163 for (i=0; i<nbest; i++) {
2167 while (chi2 > kEps) {
2168 chi2 =
CStep(2,
fH, residuals,index, index, -1, -1);
2175 if (chi2 <= currentbest + kEps) {
2176 for (j=0; j<
fH; j++){
2177 bestindex[j]=index[j];
2186 fParams(j) = cstock(j, maxind);
2188 for (j=0; j<
fH; j++){
2198 delete [] bestindex;
2199 delete [] residuals;
2214 RDraw(subdat, indsubdat);
2219 Int_t i_end = indsubdat[0];
2221 for (
Int_t kgroup = 0; kgroup < nsub; kgroup++) {
2224 for (i=0; i<nbest; i++)
2226 for (k=0; k<k2; k++) {
2228 chi2 =
CStep(1, hsub, residuals, index, subdat, i_start, i_end);
2229 chi2 =
CStep(2, hsub, residuals, index, subdat, i_start, i_end);
2231 if (chi2 < bestchi2[maxind]){
2233 cstockbig(i, nbest*kgroup + maxind) =
fParams(i);
2234 bestchi2[maxind] = chi2;
2237 if (kgroup != nsub - 1){
2238 i_start += indsubdat[kgroup];
2239 i_end += indsubdat[kgroup+1];
2243 for (i=0; i<nbest; i++)
2247 for (k=0; k<nbest*5; k++) {
2250 chi2 =
CStep(1, hsub2, residuals, index, subdat, 0,
sum);
2251 chi2 =
CStep(2, hsub2, residuals, index, subdat, 0,
sum);
2253 if (chi2 < bestchi2[maxind]){
2254 beststock[maxind] = k;
2255 bestchi2[maxind] = chi2;
2260 for (k=0; k<nbest; k++) {
2262 fParams(i) = cstockbig(i, beststock[k]);
2263 chi2 =
CStep(1,
fH, residuals, index, index, -1, -1);
2264 chi2 =
CStep(2,
fH, residuals, index, index, -1, -1);
2270 fParams(i)=cstockbig(i, beststock[maxind]);
2273 while (chi2 > kEps) {
2274 chi2 =
CStep(2,
fH, residuals, index, index, -1, -1);
2275 if (
TMath::Abs(chi2 - bestchi2[maxind]) < kEps)
2278 bestchi2[maxind] = chi2;
2282 for (j=0; j<
fH; j++)
2291 delete [] beststock;
2293 delete [] residuals;
2309 for(i=0; i<ntotal; i++)
2310 index[i] = ntotal+1;
2315 num=
Int_t(
r.Uniform(0, 1)*(ntotal-1));
2317 for(j=0; j<=i-1; j++) {
2342 while (!ok && (nindex <
h)) {
2345 num=
Int_t(
r.Uniform(0,1)*(ntotal-1));
2347 for(i=0; i<nindex; i++) {
2353 }
while(repeat==
kTRUE);
2355 index[nindex] = num;
2376 for (i=0; i<
n; i++) {
2378 itemp = subdat[start+i];
2387 for (j=1; j<npar; j++)
2388 val[j] = val[j-1]*
fX(itemp, 0);
2389 for (j=0; j<npar; j++)
2395 for (j=0; j<npar; j++)
2406 residuals[i] = (
fY(itemp) - func)*(
fY(itemp) - func)/(
fE(i)*
fE(i));
2420 for (j=1; j<npar; j++)
2421 val[j] = val[j-1]*
fX(i, 0);
2422 for (j=0; j<npar; j++)
2428 for (j=0; j<npar; j++)
2438 residuals[i] = (
fY(i) - func)*(
fY(i) - func)/(
fE(i)*
fE(i));
2452 if (step==1)
return 0;
2457 for (i=0; i<
h; i++) {
2458 itemp = subdat[start+index[i]];
2467 for (j=1; j<npar; j++)
2468 val[j] = val[j-1]*
fX(itemp, 0);
2469 for (j=0; j<npar; j++)
2475 for (j=0; j<npar; j++)
2485 sum+=(
fY(itemp)-func)*(
fY(itemp)-func)/(
fE(itemp)*
fE(itemp));
2488 for (i=0; i<
h; i++) {
2497 for (j=1; j<npar; j++)
2498 val[j] = val[j-1]*
fX(index[i], 0);
2499 for (j=0; j<npar; j++)
2506 for (j=0; j<npar; j++)
2518 sum+=(
fY(index[i])-func)*(
fY(index[i])-func)/(
fE(index[i])*
fE(index[i]));
2552 Error(
"Linf",
"Matrix inversion failed");
2605 for(
Int_t i=0; i<5; i++)
2624 for (i=0; i<5; i++) {
2625 if (indsubdat[i]!=0)
2629 for (k=1; k<=ngroup; k++) {
2630 for (
m=1;
m<=indsubdat[k-1];
m++) {
2636 subdat[jndex-1] = nrand + jndex - 2;
2637 for (i=1; i<=jndex-1; i++) {
2638 if(subdat[i-1] > nrand+i-2) {
2639 for(j=jndex; j>=i+1; j--) {
2640 subdat[j-1] = subdat[j-2];
2642 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)
TMatrixTRow< Double_t > TMatrixDRow
R__EXTERN TVirtualMutex * gROOTMutex
#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 Clear(Option_t *option="")
Clear the value.
Bool_t TestBitNumber(UInt_t bitnumber) const
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=0)=0
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
Collection abstract base class.
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
virtual TObject * Clone(const char *newname="") const
Make a clone of an collection using the Streamer facility.
Cholesky Decomposition class.
virtual Bool_t Solve(TVectorD &b)
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 void SetChisquare(Double_t chi2)
virtual Double_t EvalPar(const Double_t *x, const Double_t *params=0)
Evaluate function with given coordinates and parameters.
virtual TFormula * GetFormula()
virtual Double_t Eval(Double_t x, Double_t y=0, Double_t z=0, Double_t t=0) const
Evaluate this function.
virtual Bool_t IsInside(const Double_t *x) const
return kTRUE if the point is inside the function range
virtual Int_t GetNdim() const
A 2-Dim function with parameters.
virtual Bool_t IsInside(const Double_t *x) const
Return kTRUE is the point is inside the function range.
Graphics object made of three arrays X, Y and Z with the same number of points each.
virtual Double_t * GetEZ() const
virtual void SetPoint(Int_t point, Double_t x, Double_t y, Double_t z)
Sets point number n.
Double_t GetErrorY(Int_t bin) const
This function is called by GraphFitChisquare.
A TGraph is an object made of two arrays X and Y with npoints each.
virtual void SetPoint(Int_t i, Double_t x, Double_t y)
Set x and y values for point number i.
virtual Double_t GetErrorY(Int_t bin) const
This function is called by GraphFitChisquare.
virtual Double_t GetBinError(Int_t bin) const
Return value of error associated to bin number bin.
virtual Int_t GetDimension() const
TAxis * GetXaxis()
Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more informat...
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.
The Linear Fitter - For fitting functions that are LINEAR IN PARAMETERS.
virtual Double_t * GetCovarianceMatrix() const
Returns covariance matrix.
virtual void AddTempMatrices()
virtual Int_t ExecuteCommand(const char *command, Double_t *args, Int_t nargs)
To use in TGraph::Fit and TH1::Fit().
virtual Double_t GetParError(Int_t ipar) const
Returns the error of parameter #ipar.
TMatrixDSym fDesignTemp2
temporary matrix, used for num.stability
Int_t GraphLinearFitter(Double_t h)
Used in TGraph::Fit().
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.
virtual ~TLinearFitter()
Linear fitter cleanup.
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.
virtual const char * GetParName(Int_t ipar) const
Returns name of parameter #ipar.
virtual void Clear(Option_t *option="")
Clears everything. Used in TH1::Fit and TGraph::Fit().
virtual void PrintResults(Int_t level, Double_t amin=0) const
Level = 3 (to be consistent with minuit) prints parameters and parameter errors.
void ComputeTValues()
Computes parameters' t-values and significance.
TLinearFitter()
default c-tor, input data is stored If you don't want to store the input data, run the function Store...
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.
TVectorD fAtbTemp2
temporary vector, used for num.stability
Int_t HistLinearFitter()
Minimization function for H1s using a Chisquare method.
virtual Double_t GetParameter(Int_t ipar) const
Int_t Graph2DLinearFitter(Double_t h)
Minimisation function for a TGraph2D.
virtual void ClearPoints()
To be used when different sets of points are fitted with the same formula.
virtual void ReleaseParameter(Int_t ipar)
Releases parameter #ipar.
TObjArray fFunctions
map of basis functions and formula
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.
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
virtual void SetDim(Int_t n)
set the number of dimensions
TFormula * fInputFunction
TMatrixD fX
temporary variable used for num.stability
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...
virtual void FixParameter(Int_t ipar)
Fixes paramter #ipar at its current value.
virtual Int_t EvalRobust(Double_t h=-1)
Finds the parameters of the fitted function in case data contains outliers.
void AddToDesign(Double_t *x, Double_t y, Double_t e)
Add a point to the AtA matrix and to the Atb vector.
TLinearFitter & operator=(const TLinearFitter &tlf)
Assignment operator.
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 "++".
virtual void GetConfidenceIntervals(Int_t n, Int_t ndim, const Double_t *x, Double_t *ci, Double_t cl=0.95)
Computes point-by-point confidence intervals for the fitted function Parameters: n - number of points...
virtual void AddPoint(Double_t *x, Double_t y, Double_t e=1)
Adds 1 point to the fitter.
virtual void AssignData(Int_t npoints, Int_t xncols, Double_t *x, Double_t *y, Double_t *e=0)
This function is to use when you already have all the data in arrays and don't want to copy them into...
virtual Double_t GetParTValue(Int_t ipar)
Returns the t-value for parameter #ipar.
virtual void StoreData(Bool_t store)
virtual TMatrixTBase< Element > & Zero()
Set matrix elements to zero.
virtual const Element * GetMatrixArray() const
virtual TMatrixTBase< Element > & ResizeTo(Int_t nrows, Int_t ncols, Int_t=-1)
Set size of the matrix to nrows x ncols New dynamic elements are created, the overlapping part of the...
virtual void Clear(Option_t *="")
TMatrixT< Element > & Use(Int_t row_lwb, Int_t row_upb, Int_t col_lwb, Int_t col_upb, Element *data)
Use the array data to fill the matrix ([row_lwb..row_upb] x [col_lwb..col_upb])
virtual TMatrixTBase< Element > & ResizeTo(Int_t nrows, Int_t ncols, Int_t=-1)
Set size of the matrix to nrows x ncols New dynamic elements are created, the overlapping part of the...
virtual const Element * GetMatrixArray() const
virtual void Clear(Option_t *="")
A TMultiGraph is a collection of TGraph (or derived) objects.
virtual const char * GetName() const
Returns name of object.
Int_t GetEntriesFast() const
virtual void Expand(Int_t newSize)
Expand or shrink the array to newSize elements.
Int_t GetEntries() const
Return the number of objects in array (i.e.
virtual void Clear(Option_t *option="")
Remove all objects from the array.
TObject * UncheckedAt(Int_t i) const
virtual void Delete(Option_t *option="")
Remove all objects from the array AND delete all heap based objects.
Collectable string class.
Mother of all ROOT objects.
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.
Random number generator class based on the maximally quidistributed 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 > & Zero()
Set vector elements to zero.
void Clear(Option_t *="")
TVectorT< Element > & ResizeTo(Int_t lwb, Int_t upb)
Resize the vector to [lwb:upb] .
TVectorT< Element > & Use(Int_t lwb, Int_t upb, Element *data)
Use the array data to fill the vector lwb..upb].
Int_t NonZeros() const
Compute the number of elements != 0.0.
Int_t GetNoElements() const
Element * GetMatrixArray()
Abstract Base Class for Fitting.
virtual Int_t GetXlast() const
virtual Int_t GetYfirst() const
virtual TObject * GetObjectFit() const
virtual Foption_t GetFitOption() const
virtual Int_t GetZfirst() const
virtual Int_t GetZlast() const
virtual Int_t GetXfirst() const
virtual Int_t GetYlast() const
TVirtualFitter & operator=(const TVirtualFitter &tvf)
assignment operator
static TVirtualFitter * GetFitter()
static: return the current Fitter
virtual TObject * GetUserFunc() const
int GetDimension(const TH1 *h1)
void function(const Char_t *name_, T fun, const Char_t *docstring=0)
static constexpr double mg
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)
Return index of array with the minimum element.
T MinElement(Long64_t n, const T *a)
Return minimum of array a of length n.
Long64_t LocMax(Long64_t n, const T *a)
Return index of array with the maximum element.
Double_t Sqrt(Double_t x)
Short_t Min(Short_t a, Short_t b)
Double_t StudentI(Double_t T, Double_t ndf)
Calculates the cumulative distribution function of Student's t-distribution second parameter stands f...
Double_t StudentQuantile(Double_t p, Double_t ndf, Bool_t lower_tail=kTRUE)
Computes quantiles of the Student's t-distribution 1st argument is the probability,...
static long int sum(long int i)