329 fNdim=
function->GetNdim();
331 Int_t number=
function->GetNumber();
332 if (number<299 || number>310){
333 Error(
"TLinearFitter",
"Trying to fit with a nonlinear function");
362 fParams(tlf.fParams),
363 fParCovar(tlf.fParCovar),
364 fTValues(tlf.fTValues),
365 fParSign(tlf.fParSign),
366 fDesign(tlf.fDesign),
367 fDesignTemp(tlf.fDesignTemp),
368 fDesignTemp2(tlf.fDesignTemp2),
369 fDesignTemp3(tlf.fDesignTemp3),
371 fAtbTemp(tlf.fAtbTemp),
372 fAtbTemp2(tlf.fAtbTemp2),
373 fAtbTemp3(tlf.fAtbTemp3),
374 fFunctions( * (
TObjArray *)tlf.fFunctions.Clone()),
377 fY2Temp(tlf.fY2Temp),
380 fInputFunction(tlf.fInputFunction),
382 fNpoints(tlf.fNpoints),
383 fNfunctions(tlf.fNfunctions),
384 fFormulaSize(tlf.fFormulaSize),
386 fNfixed(tlf.fNfixed),
387 fSpecial(tlf.fSpecial),
390 fStoreData(tlf.fStoreData),
391 fChisquare(tlf.fChisquare),
393 fRobust(tlf.fRobust),
394 fFitsample(tlf.fFitsample),
579 Error(
"AddPoint",
"Point can't be added, because the formula hasn't been set");
597 Error(
"AddData",
"Those points are already added");
608 fX.
Use(npoints, xncols, x);
623 for (
Int_t i=xfirst; i<npoints; i++)
645 for (i=1; i<npar; i++)
647 for (i=0; i<npar; i++)
653 for (i=0; i<npar; i++)
670 Error(
"AddToDesign",
"Basis Function %s is of an invalid type %s",obj->
GetName(),obj->IsA()->
GetName());
676 Error(
"AddToDesign",
"Function %s has no linear parts - maybe missing a ++ in the formula expression",
fInputFunction->
GetName());
829 temp2 = (
fY(i)-temp)*(
fY(i)-temp);
830 temp2 /=
fE(i)*
fE(i);
841 for (i=1; i<npar; i++)
842 val[i] = val[i-1]*
fX(point, 0);
843 for (i=0; i<npar; i++)
850 for (i=0; i<npar; i++)
860 temp2 = (
fY(point)-temp)*(
fY(point)-temp);
861 temp2 /=
fE(point)*
fE(point);
889 Error(
"TLinearFitter::Eval",
"The formula hasn't been set");
930 for (ii=0; ii<i; ii++)
957 Error(
"Eval",
"Matrix inversion failed");
985 ((
TF1*)fInputFunction)->SetNumberFitPoints(
fNpoints);
994 for (ii=0; ii<i; ii++){
1015 Error(
"FixParameter",
"no value available to fix the parameter");
1019 Error(
"FixParameter",
"illegal parameter value");
1023 Error(
"FixParameter",
"no free parameters left");
1038 Error(
"FixParameter",
"illegal parameter value");
1042 Error(
"FixParameter",
"no free parameters left");
1060 Error(
"ReleaseParameter",
"illegal parameter value");
1064 Warning(
"ReleaseParameter",
"This parameter is not fixed\n");
1118 for (
Int_t ipoint=0; ipoint<
n; ipoint++){
1125 sum_vector[irow]+=
fParCovar(irow,icol)*grad[icol];
1129 c+=grad[i]*sum_vector[i];
1131 ci[ipoint]=c*t*chidf;
1135 delete [] sum_vector;
1162 Error(
"GetConfidenceIntervals",
"The case of fitting not with a TFormula is not yet implemented");
1171 Error(
"GetConfidenceIntervals",
"A TGraphErrors should be passed instead of a graph");
1175 Error(
"GetConfidenceIntervals",
"A TGraph2DErrors should be passed instead of a graph");
1180 Error(
"GetConfidenceIntervals",
"A TGraph2DErrors or a TH23 should be passed instead of a graph");
1194 Error(
"GetConfidenceIntervals",
"A TGraph2DErrors should be passed instead of a TGraph2D");
1198 Error(
"GetConfidenceIntervals",
"A TGraphErrors should be passed instead of a TGraph2D");
1203 Error(
"GetConfidenceIntervals",
"A TGraphErrors or a TH1 should be passed instead of a graph");
1216 for (
Int_t ipoint=0; ipoint<
np; ipoint++){
1224 sum_vector[irow]+=
fParCovar(irow, icol)*grad[icol];
1227 c+=grad[i]*sum_vector[i];
1230 gr2->
GetEZ()[ipoint]=c*t*chidf;
1233 delete [] sum_vector;
1239 if (((
TH1*)obj)->GetDimension()>1){
1240 Error(
"GetConfidenceIntervals",
"Fitted graph and passed histogram have different number of dimensions");
1245 if (((
TH1*)obj)->GetDimension()!=2){
1246 Error(
"GetConfidenceIntervals",
"Fitted graph and passed histogram have different number of dimensions");
1252 Error(
"GetConfidenceIntervals",
"Fitted and passed histograms have different number of dimensions");
1275 for (
Int_t binz=hzfirst; binz<=hzlast; binz++){
1277 for (
Int_t biny=hyfirst; biny<=hylast; biny++) {
1279 for (
Int_t binx=hxfirst; binx<=hxlast; binx++) {
1286 sum_vector[irow]+=
fParCovar(irow, icol)*grad[icol];
1289 c+=grad[i]*sum_vector[i];
1297 delete [] sum_vector;
1300 Error(
"GetConfidenceIntervals",
"This object type is not supported");
1367 Error(
"GetParError",
"illegal value of parameter");
1385 Error(
"GetParError",
"illegal value of parameter");
1399 Error(
"GetParError",
"illegal value of parameter");
1413 Error(
"GetParTValue",
"illegal value of parameter");
1427 Error(
"GetParSignificance",
"illegal value of parameter");
1441 Error(
"GetFitSample",
"there is no fit sample in ordinary least-squares fit");
1454 if (!list)
return -1;
1499 for (
int i=0; i<size; i++)
1533 Int_t size = 0, special = 0;
1544 fstring = (
char *)strstr(
fFormula,
"hyp");
1548 sscanf(fstring,
"%d", &size);
1557 sstring = sstring.
ReplaceAll(
"++", 2,
"|", 1);
1573 char replacement[6];
1574 for (i=0; i<
fNdim; i++){
1575 snprintf(pattern,5,
"x%d", i);
1576 snprintf(replacement,6,
"x[%d]", i);
1597 Error(
"TLinearFitter",
"f_linear not allocated");
1604 if ((fNfunctions==1)&&(special>299)&&(special<310)){
1636 for (i=0; i<size; i++)
1648 Int_t special, size;
1656 if ((special>299)&&(special<310)){
1691 for (
Int_t i=0; i<size; i++)
1698 ((
TF1*)
function)->GetParLimits(i,al,bl);
1699 if (al*bl !=0 && al >= bl) {
1730 if (!strcmp(command,
"FitGraph")){
1734 if (!strcmp(command,
"FitGraph2D")){
1738 if (!strcmp(command,
"FitMultiGraph")){
1756 printf(
"Fitting results:\nParameters:\nNO.\t\tVALUE\t\tERROR\n");
1761 printf(
"Fitting results:\nParameters:\nNO.\t\tVALUE\n");
1784 Int_t fitResult = 0;
1795 for (
Int_t i=0; i<
n; i++){
1796 if (!f1->
IsInside(&x[i]))
continue;
1798 if (e<0 || fitOption.
W1)
1813 for (
Int_t i=0; i<
n; i++){
1814 if (!f1->
IsInside(&x[i]))
continue;
1815 temp=f1->
Eval(x[i]);
1816 temp2=(y[i]-temp)*(y[i]-temp);
1818 if (e<0 || fitOption.
W1)
1857 for (
Int_t bin=0;bin<
n;bin++) {
1865 if (e<0 || fitOption.
W1)
1880 for (
Int_t bin=0; bin<
n; bin++){
1888 temp=f2->
Eval(x[0], x[1]);
1889 temp2=(z-temp)*(z-temp);
1891 if (e<0 || fitOption.
W1)
1931 for (i=0; i<
n; i++){
1932 if (!f1->
IsInside(&gx[i]))
continue;
1934 if (e<0 || fitOption.
W1)
1955 for (i=0; i<
n; i++){
1956 if (!f1->
IsInside(&gx[i]))
continue;
1957 temp=f1->
Eval(gx[i]);
1958 temp2=(gy[i]-temp)*(gy[i]-temp);
1960 if (e<0 || fitOption.
W1)
1984 Int_t bin,binx,biny,binz;
2005 for (binz=hzfirst;binz<=hzlast;binz++) {
2007 for (biny=hyfirst;biny<=hylast;biny++) {
2009 for (binx=hxfirst;binx<=hxlast;binx++) {
2012 bin = hfit->
GetBin(binx,biny,binz);
2019 if (fitOption.
W1==1 && cu == 0)
continue;
2023 if (eu <= 0)
continue;
2035 for (binz=hzfirst;binz<=hzlast;binz++) {
2037 for (biny=hyfirst;biny<=hylast;biny++) {
2039 for (binx=hxfirst;binx<=hxlast;binx++) {
2042 bin = hfit->
GetBin(binx,biny,binz);
2046 if (fitOption.
W1==1 && cu == 0)
continue;
2050 if (eu <= 0)
continue;
2053 temp2=(cu-temp)*(cu-temp);
2069 void TLinearFitter::Streamer(
TBuffer &R__b)
2104 Int_t i, j, maxind=0, k, k1 = 500;
2109 Error(
"TLinearFitter::EvalRobust",
"The formula hasn't been set");
2115 for (i=0; i<nbest; i++)
2120 if (h>0.000001 && h<1 && fNpoints*h > hdef)
2124 if (h>0)
Warning(
"Fitting:",
"illegal value of H, default is taken, h = %3.2f",
double(hdef)/
fNpoints);
2140 for (k = 0; k < k1; k++) {
2142 chi2 =
CStep(1,
fH, residuals,index, index, -1, -1);
2143 chi2 =
CStep(2,
fH, residuals,index, index, -1, -1);
2145 if (chi2 < bestchi2[maxind]) {
2146 bestchi2[maxind] = chi2;
2148 cstock(i, maxind) =
fParams(i);
2155 for (i=0; i<nbest; i++) {
2159 while (chi2 > kEps) {
2160 chi2 =
CStep(2,
fH, residuals,index, index, -1, -1);
2167 if (chi2 <= currentbest + kEps) {
2168 for (j=0; j<
fH; j++){
2169 bestindex[j]=index[j];
2178 fParams(j) = cstock(j, maxind);
2180 for (j=0; j<
fH; j++){
2190 delete [] bestindex;
2191 delete [] residuals;
2206 RDraw(subdat, indsubdat);
2211 Int_t i_end = indsubdat[0];
2213 for (
Int_t kgroup = 0; kgroup < nsub; kgroup++) {
2216 for (i=0; i<nbest; i++)
2218 for (k=0; k<k2; k++) {
2220 chi2 =
CStep(1, hsub, residuals, index, subdat, i_start, i_end);
2221 chi2 =
CStep(2, hsub, residuals, index, subdat, i_start, i_end);
2223 if (chi2 < bestchi2[maxind]){
2225 cstockbig(i, nbest*kgroup + maxind) =
fParams(i);
2226 bestchi2[maxind] = chi2;
2229 if (kgroup != nsub - 1){
2230 i_start += indsubdat[kgroup];
2231 i_end += indsubdat[kgroup+1];
2235 for (i=0; i<nbest; i++)
2239 for (k=0; k<nbest*5; k++) {
2242 chi2 =
CStep(1, hsub2, residuals, index, subdat, 0, sum);
2243 chi2 =
CStep(2, hsub2, residuals, index, subdat, 0, sum);
2245 if (chi2 < bestchi2[maxind]){
2246 beststock[maxind] = k;
2247 bestchi2[maxind] = chi2;
2252 for (k=0; k<nbest; k++) {
2254 fParams(i) = cstockbig(i, beststock[k]);
2255 chi2 =
CStep(1,
fH, residuals, index, index, -1, -1);
2256 chi2 =
CStep(2,
fH, residuals, index, index, -1, -1);
2262 fParams(i)=cstockbig(i, beststock[maxind]);
2265 while (chi2 > kEps) {
2266 chi2 =
CStep(2,
fH, residuals, index, index, -1, -1);
2267 if (
TMath::Abs(chi2 - bestchi2[maxind]) < kEps)
2270 bestchi2[maxind] = chi2;
2274 for (j=0; j<
fH; j++)
2278 ((
TF1*)fInputFunction)->SetNumberFitPoints(fH);
2279 ((
TF1*)fInputFunction)->SetNDF(fH-fNfunctions);
2283 delete [] beststock;
2285 delete [] residuals;
2301 for(i=0; i<ntotal; i++)
2302 index[i] = ntotal+1;
2309 for(j=0; j<=i-1; j++) {
2334 while (!ok && (nindex < h)) {
2339 for(i=0; i<nindex; i++) {
2345 }
while(repeat==
kTRUE);
2347 index[nindex] = num;
2368 for (i=0; i<
n; i++) {
2370 itemp = subdat[start+i];
2379 for (j=1; j<npar; j++)
2380 val[j] = val[j-1]*
fX(itemp, 0);
2381 for (j=0; j<npar; j++)
2387 for (j=0; j<npar; j++)
2412 for (j=1; j<npar; j++)
2413 val[j] = val[j-1]*
fX(i, 0);
2414 for (j=0; j<npar; j++)
2420 for (j=0; j<npar; j++)
2444 if (step==1)
return 0;
2449 for (i=0; i<
h; i++) {
2450 itemp = subdat[start+index[i]];
2459 for (j=1; j<npar; j++)
2460 val[j] = val[j-1]*
fX(itemp, 0);
2461 for (j=0; j<npar; j++)
2467 for (j=0; j<npar; j++)
2480 for (i=0; i<
h; i++) {
2489 for (j=1; j<npar; j++)
2490 val[j] = val[j-1]*
fX(index[i], 0);
2491 for (j=0; j<npar; j++)
2498 for (j=0; j<npar; j++)
2544 Error(
"Linf",
"Matrix inversion failed");
2597 for(
Int_t i=0; i<5; i++)
2616 for (i=0; i<5; i++) {
2617 if (indsubdat[i]!=0)
2621 for (k=1; k<=ngroup; k++) {
2622 for (m=1; m<=indsubdat[k-1]; m++) {
2628 subdat[jndex-1] = nrand + jndex - 2;
2629 for (i=1; i<=jndex-1; i++) {
2630 if(subdat[i-1] > nrand+i-2) {
2631 for(j=jndex; j>=i+1; j--) {
2632 subdat[j-1] = subdat[j-2];
2634 subdat[i-1] = nrand+i-2;
virtual void GetAtbVector(TVectorD &v)
Get the Atb vector - a vector, used for internal computations.
virtual void GetErrors(TVectorD &vpar)
Returns parameter errors.
Int_t GetFirst() const
Return first bin on the axis i.e.
virtual void StoreData(Bool_t store)
static std::map< TString, TFormula * > fgFormulaMap
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...
TVectorT< Element > & ResizeTo(Int_t lwb, Int_t upb)
Resize the vector to [lwb:upb] .
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
virtual TFormula * GetFormula()
void Clear(Option_t *option="")
Clear the value.
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 Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
Long64_t LocMax(Long64_t n, const T *a)
virtual void FixParameter(Int_t ipar)
Fixes paramter #ipar at its current value.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
ClassImp(TSeqCollection) Int_t TSeqCollection TIter next(this)
Return index of object in collection.
virtual TMatrixTBase< Element > & Zero()
Set matrix elements to zero.
TList * GetListOfGraphs() const
Collectable string class.
virtual void Clear(Option_t *option="")
Remove all objects from the array.
virtual void Delete(Option_t *option="")
Remove all objects from the array AND delete all heap based objects.
The Linear Fitter - For fitting functions that are LINEAR IN PARAMETERS.
virtual Foption_t GetFitOption() const
Random number generator class based on the maximally quidistributed combined Tausworthe generator by ...
TString & ReplaceAll(const TString &s1, const TString &s2)
virtual void AddTempMatrices()
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, at which the quantile is computed 2nd argument - the number of degrees of freedom of the Student distribution When the 3rd argument lower_tail is kTRUE (default)- the algorithm returns such x0, that P(x < x0)=p upper tail (lower_tail is kFALSE)- the algorithm returns such x0, that P(x > x0)=p the algorithm was taken from G.W.Hill, "Algorithm 396, Student's t-quantiles" "Communications of the ACM", 13(10), October 1970.
virtual Int_t GetDimension() const
TObjArray fFunctions
map of basis functions and formula
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...
A TMultiGraph is a collection of TGraph (or derived) objects.
void ToUpper()
Change string to upper case.
Buffer base class used for serializing objects.
virtual void ClearPoints()
To be used when different sets of points are fitted with the same formula.
virtual Int_t ExecuteCommand(const char *command, Double_t *args, Int_t nargs)
To use in TGraph::Fit and TH1::Fit().
Int_t Graph2DLinearFitter(Double_t h)
Minimisation function for a TGraph2D.
virtual TObject * GetUserFunc() const
Short_t Min(Short_t a, Short_t b)
R__EXTERN TVirtualMutex * gROOTMutex
virtual void GetDesignMatrix(TMatrixD &matr)
Returns the internal design matrix.
Int_t Partition(Int_t nmini, Int_t *indsubdat)
divides the elements into approximately equal subgroups number of elements in each subgroup is stored...
Int_t GetEntriesFast() const
virtual void Clear(Option_t *="")
TFormula * fInputFunction
virtual Int_t GetZlast() 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...
Double_t StudentI(Double_t T, Double_t ndf)
Calculates the cumulative distribution function of Student's t-distribution second parameter stands f...
virtual Double_t * GetEY() const
virtual void PrintResults(Int_t level, Double_t amin=0) const
Level = 3 (to be consistent with minuit) prints parameters and parameter errors.
virtual TObject * Clone(const char *newname="") const
Make a clone of an collection using the Streamer facility.
const char * Data() const
TVectorT< Element > & Use(Int_t lwb, Int_t upb, Element *data)
Use the array data to fill the vector lwb..upb].
int GetDimension(const TH1 *h1)
This is the base class for the ROOT Random number generators.
TVirtualFitter & operator=(const TVirtualFitter &tvf)
assignment operator
virtual void GetFitSample(TBits &bits)
For robust lts fitting, returns the sample, on which the best fit was based.
UChar_t mod R__LOCKGUARD2(gSrvAuthenticateMutex)
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 void Clear(Option_t *option="")
Clears everything. Used in TH1::Fit and TGraph::Fit().
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.
Bool_t Invert(TMatrixDSym &inv)
For a symmetric matrix A(m,m), its inverse A_inv(m,m) is returned .
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
void Clear(Option_t *="")
virtual void SetBinError(Int_t bin, Double_t error)
see convention for numbering bins in TH1::GetBin
virtual Double_t * GetEZ() const
virtual const Element * GetMatrixArray() const
TMatrixTRow< Double_t > TMatrixDRow
virtual void Chisquare()
Calculates the chisquare.
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...
Element * GetMatrixArray()
virtual Double_t GetParTValue(Int_t ipar)
Returns the t-value for parameter #ipar.
TObject * UncheckedAt(Int_t i) const
void AddToDesign(Double_t *x, Double_t y, Double_t e)
Add a point to the AtA matrix and to the Atb vector.
virtual void SetChisquare(Double_t chi2)
virtual Int_t GetYlast() const
void function(const char *name_, T fun, const char *docstring=0)
Int_t NonZeros() const
Compute the number of elements != 0.0.
Int_t HistLinearFitter()
Minimization function for H1s using a Chisquare method.
virtual Bool_t Solve(TVectorD &b)
Solve equations Ax=b assuming A has been factored by Cholesky.
Class to manage histogram axis.
virtual Double_t GetParSignificance(Int_t ipar)
Returns the significance of parameter #ipar.
Int_t MultiGraphLinearFitter(Double_t h)
Minimisation function for a TMultiGraph.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
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 Int_t EvalRobust(Double_t h=-1)
Finds the parameters of the fitted function in case data contains outliers.
Collection abstract base class.
virtual Double_t GetChisquare()
Get the Chisquare.
static void update(gsl_integration_workspace *workspace, double a1, double b1, double area1, double error1, double a2, double b2, double area2, double error2)
TVectorT< Element > & Zero()
Set vector elements to zero.
Int_t GraphLinearFitter(Double_t h)
Used in TGraph::Fit().
virtual void ReleaseParameter(Int_t ipar)
Releases parameter #ipar.
virtual Int_t GetNdim() const
TLinearFitter()
default c-tor, input data is stored If you don't want to store the input data, run the function Store...
static TVirtualFitter * GetFitter()
static: return the current Fitter
TMatrixD fX
temporary variable used for num.stability
virtual const char * GetName() const
Returns name of object.
virtual const Element * GetMatrixArray() const
A 2-Dim function with parameters.
virtual Double_t GetParameter(Int_t ipar) const
virtual void SetBasisFunctions(TObjArray *functions)
set the basis functions in case the fitting function is not set directly The TLinearFitter will manag...
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
virtual Int_t Eval()
Perform the fit and evaluate the parameters Returns 0 if the fit is ok, 1 if there are errors...
TMatrixDSym fDesignTemp2
temporary matrix, used for num.stability
virtual Int_t GetXlast() const
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
virtual void Add(TLinearFitter *tlf)
Add another linear fitter to this linear fitter.
virtual ~TLinearFitter()
Linear fitter cleanup.
virtual void SetPoint(Int_t point, Double_t x, Double_t y, Double_t z)
Sets point number n.
virtual const char * GetName() const
Returns name of object.
virtual void Clear(Option_t *="")
TLinearFitter & operator=(const TLinearFitter &tlf)
Assignment operator.
virtual void GetParameters(TVectorD &vpar)
Returns parameter values.
ClassImp(TMCParticle) void TMCParticle printf(": p=(%7.3f,%7.3f,%9.3f) ;", fPx, fPy, fPz)
double func(double *x, double *p)
virtual void Expand(Int_t newSize)
Expand or shrink the array to newSize elements.
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 void SetFormula(const char *formula)
Additive parts should be separated by "++".
Int_t GetEntries() const
Return the number of objects in array (i.e.
virtual Double_t Uniform(Double_t x1=1)
Returns a uniform deviate on the interval (0, x1).
virtual void SetDim(Int_t n)
set the number of dimensions
void ComputeTValues()
Computes parameters' t-values and significance.
Abstract Base Class for Fitting.
virtual Int_t GetXfirst() const
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])
Int_t GetLast() const
Return last bin on the axis i.e.
virtual const char * GetParName(Int_t ipar) const
Returns name of parameter #ipar.
virtual Double_t GetBinCenter(Int_t bin) const
Return center of bin.
Mother of all ROOT objects.
virtual Double_t GetErrorZ(Int_t bin) const
This function is called by Graph2DFitChisquare.
Int_t GetNoElements() const
virtual Double_t GetErrorY(Int_t bin) const
This function is called by GraphFitChisquare.
virtual void SetPoint(Int_t i, Double_t x, Double_t y)
Set x and y values for point number i.
Element KOrdStat(Size n, const Element *a, Size k, Size *work=0)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
virtual TObject * GetObjectFit() const
A Graph is a graphics object made of two arrays X and Y with npoints each.
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 GetParError(Int_t ipar) const
Returns the error of parameter #ipar.
virtual Bool_t UpdateMatrix()
Update the design matrix after the formula has been changed.
Bool_t TestBitNumber(UInt_t bitnumber) const
virtual Int_t GetYfirst() const
virtual Bool_t IsInside(const Double_t *x) const
Return kTRUE is the point is inside the function range.
Double_t Sqrt(Double_t x)
Graphics object made of three arrays X, Y and Z with the same number of points each.
virtual Bool_t IsInside(const Double_t *x) const
return kTRUE if the point is inside the function range
virtual Double_t GetBinError(Int_t bin) const
Return value of error associated to bin number bin.
Long64_t LocMin(Long64_t n, const T *a)
virtual Double_t EvalPar(const Double_t *x, const Double_t *params=0)
Evaluate function with given coordinates and parameters.
TVectorD fAtbTemp2
temporary vector, used for num.stability
virtual Int_t GetZfirst() const
virtual Int_t Merge(TCollection *list)
Merge objects in list.
void SetBitNumber(UInt_t bitnumber, Bool_t value=kTRUE)
virtual Double_t * GetCovarianceMatrix() const
Returns covariance matrix.
T MinElement(Long64_t n, const T *a)
virtual void AddPoint(Double_t *x, Double_t y, Double_t e=1)
Adds 1 point to the fitter.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.