401#define RADDEG (180. / TMath::Pi()) 
  402#define DEGRAD (TMath::Pi() / 180.) 
  411#define PARAM_MAXSTUDY 1 
  412#define PARAM_SEVERAL  2 
  413#define PARAM_RELERR   3 
  414#define PARAM_MAXTERMS 4 
  419static void mdfHelper(
int&, 
double*, 
double&, 
double*, 
int);
 
  510: 
TNamed(
"multidimfit",
"Multi-dimensional fit object"),
 
  513fVariables(dimension*100),
 
  514fMeanVariables(dimension),
 
  515fMaxVariables(dimension),
 
  516fMinVariables(dimension)
 
 
  724         Warning(
"AddTestRow", 
"variable %d (row: %d) too large: %f > %f",
 
  727         Warning(
"AddTestRow", 
"variable %d (row: %d) too small: %f < %f",
 
 
  741      while ((
h = (
TH1*)next()))
 
 
  831   for (i = 0; i < 
n; i++) {
 
  834      for (
j = 0; 
j < 
m; 
j++)
 
 
  942         s += (epsilon + 
iv[i] - 1) / (epsilon + 
fMaxPowers[i] - 1);
 
 
  968         for (i = 3; i <= 
p; i++) {
 
  971               p3 = ((2 * i - 3) * 
p2 * 
x - (i - 2) * 
p1) / (i - 1);
 
 
 1046      Warning(
"Fit", 
"test sample is very small");
 
 1049      Error(
"Fit", 
"invalid option");
 
 1056      Error(
"Fit", 
"Cannot create Fitter");
 
 1081      Double_t val = 0, err = 0, low = 0, high = 0;
 
 1086                            val, err, low, high);
 
 
 1175         for (
j = 0; 
j < i; 
j++)
 
 1216         order[k]   = order[i];
 
 
 1320      for (
j = 0; 
j <= i; 
j++) {
 
 1344   if (!
chol.Decompose())
 
 1345      Error(
"MakeCoefficientErrors", 
"curvature matrix is singular");
 
 
 1367   Int_t col = 0, row = 0;
 
 1371      for (row = col - 1; row > -1; row--) {
 
 1373         for (i = row; i <= col ; i++)
 
 
 1473      for (
j = 0; 
j < i; 
j++) {
 
 
 1666                                   "Computed residuals vs Quantity",
 
 1680                                   "Computed residuals over training sample",
 
 1689                                   "Distribution of residuals from test",
 
 
 1870         std::cout << 
"Coeff   SumSqRes    Contrib   Angle      QM   Func" 
 1871         << 
"     Value        W^2  Powers" << std::endl;
 
 1919         << std::setw(10) << std::setprecision(4) << 
squareResidual << 
" " 
 1920         << std::setw(10) << std::setprecision(4) << 
dResidur << 
" " 
 1921         << std::setw(7)  << std::setprecision(3) << 
fMaxAngle << 
" " 
 1922         << std::setw(7)  << std::setprecision(3) << s << 
" " 
 1923         << std::setw(5)  << i << 
" " 
 1924         << std::setw(10) << std::setprecision(4)
 
 1926         << std::setw(10) << std::setprecision(4)
 
 1931         std::cout << std::endl;
 
 
 1963                                const char *classname,
 
 1972      prefix.
Form(
"%s::", classname);
 
 1976      Error(
"MakeRealCode",
"couldn't open output file '%s'",
filename);
 
 1981      std::cout << 
"Writing on file \"" << 
filename << 
"\" ... " << std::flush;
 
 1986   outFile << 
"// -*- mode: c++ -*-" << std::endl;
 
 1990   << 
" generated by TMultiDimFit::MakeRealCode" << std::endl;
 
 1993   outFile << 
"// on " << 
date.AsString() << std::endl;
 
 1996   << std::endl << 
"//" << std::endl;
 
 1998   outFile << 
"// This file contains the function " << std::endl
 
 1999   << 
"//" << std::endl
 
 2000   << 
"//    double  " << prefix << 
"MDF(double *x); " << std::endl
 
 2001   << 
"//" << std::endl
 
 2002   << 
"// For evaluating the parameterization obtained" << std::endl
 
 2003   << 
"// from TMultiDimFit and the point x" << std::endl
 
 2004   << 
"// " << std::endl
 
 2005   << 
"// See TMultiDimFit class documentation for more " 
 2006   << 
"information " << std::endl << 
"// " << std::endl;
 
 2010      outFile << 
"#include \"" << classname << 
".h\"" << std::endl;
 
 2016   << 
"// Static data variables"  << std::endl
 
 2017   << 
"//" << std::endl;
 
 2026   outFile << 
"// Assignment to mean vector." << std::endl;
 
 2028   << 
"gXMean[] = {" << std::endl;
 
 2031   outFile << 
" };" << std::endl << std::endl;
 
 2034   outFile << 
"// Assignment to minimum vector." << std::endl;
 
 2036   << 
"gXMin[] = {" << std::endl;
 
 2039   outFile << 
" };" << std::endl << std::endl;
 
 2042   outFile << 
"// Assignment to maximum vector." << std::endl;
 
 2044   << 
"gXMax[] = {" << std::endl;
 
 2047   outFile << 
" };" << std::endl << std::endl;
 
 2050   outFile << 
"// Assignment to coefficients vector." << std::endl;
 
 2052   << 
"gCoefficient[] = {" << std::flush;
 
 2054      outFile << (i != 0 ? 
"," : 
"") << std::endl
 
 2056   outFile << std::endl << 
" };" << std::endl << std::endl;
 
 2059   outFile << 
"// Assignment to error coefficients vector." << std::endl;
 
 2061   << 
"gCoefficientRMS[] = {" << std::flush;
 
 2063      outFile << (i != 0 ? 
"," : 
"") << std::endl
 
 2065   outFile << std::endl << 
" };" << std::endl << std::endl;
 
 2068   outFile << 
"// Assignment to powers vector." << std::endl
 
 2069   << 
"// The powers are stored row-wise, that is" << std::endl
 
 2070   << 
"//  p_ij = " << prefix
 
 2071   << 
"gPower[i * NVariables + j];" << std::endl;
 
 2073   << 
"gPower[] = {" << std::flush;
 
 2076         if (
j != 0) 
outFile << std::flush << 
"  ";
 
 2077         else        outFile << std::endl << 
"  ";
 
 2083   outFile << std::endl << 
"};" << std::endl << std::endl;
 
 2091   << (
isMethod ? 
"method " : 
"function ")
 
 2092   << 
"  double " << prefix
 
 2094   << std::endl << 
"// " << std::endl;
 
 2095   outFile << 
"double " << prefix
 
 2096   << 
"MDF(double *x) {" << std::endl
 
 2097   << 
"  double returnValue = " << prefix << 
"gDMean;" << std::endl
 
 2098   << 
"  int    i = 0, j = 0, k = 0;" << std::endl
 
 2099   << 
"  for (i = 0; i < " << prefix << 
"gNCoefficients ; i++) {" 
 2101   << 
"    // Evaluate the ith term in the expansion" << std::endl
 
 2102   << 
"    double term = " << prefix << 
"gCoefficient[i];" 
 2104   << 
"    for (j = 0; j < " << prefix << 
"gNVariables; j++) {" 
 2106   << 
"      // Evaluate the polynomial in the jth variable." << std::endl
 
 2107   << 
"      int power = "<< prefix << 
"gPower[" 
 2108   << prefix << 
"gNVariables * i + j]; " << std::endl
 
 2109   << 
"      double p1 = 1, p2 = 0, p3 = 0, r = 0;" << std::endl
 
 2110   << 
"      double v =  1 + 2. / (" 
 2111   << prefix << 
"gXMax[j] - " << prefix
 
 2112   << 
"gXMin[j]) * (x[j] - " << prefix << 
"gXMax[j]);" << std::endl
 
 2113   << 
"      // what is the power to use!" << std::endl
 
 2114   << 
"      switch(power) {" << std::endl
 
 2115   << 
"      case 1: r = 1; break; " << std::endl
 
 2116   << 
"      case 2: r = v; break; " << std::endl
 
 2117   << 
"      default: " << std::endl
 
 2118   << 
"        p2 = v; " << std::endl
 
 2119   << 
"        for (k = 3; k <= power; k++) { " << std::endl
 
 2120   << 
"          p3 = p2 * v;" << std::endl;
 
 2122      outFile << 
"          p3 = ((2 * k - 3) * p2 * v - (k - 2) * p1)" 
 2123      << 
" / (k - 1);" << std::endl;
 
 2125      outFile << 
"          p3 = 2 * v * p2 - p1; " << std::endl;
 
 2126   outFile << 
"          p1 = p2; p2 = p3; " << std::endl << 
"        }" << std::endl
 
 2127   << 
"        r = p3;" << std::endl << 
"      }" << std::endl
 
 2128   << 
"      // multiply this term by the poly in the jth var" << std::endl
 
 2129   << 
"      term *= r; " << std::endl << 
"    }" << std::endl
 
 2130   << 
"    // Add this term to the final result" << std::endl
 
 2131   << 
"    returnValue += term;" << std::endl << 
"  }" << std::endl
 
 2132   << 
"  return returnValue;" << std::endl << 
"}" << std::endl << std::endl;
 
 2141      std::cout << 
"done" << std::endl;
 
 
 2167      std::cout << 
"User parameters:" << std::endl
 
 2168      << 
"----------------" << std::endl
 
 2171      << 
" Max Terms:                    " << 
fMaxTerms << std::endl
 
 2172      << 
" Power Limit Parameter:        " << 
fPowerLimit << std::endl
 
 2174      << 
" Max functions to study:       " << 
fMaxStudy << std::endl
 
 2175      << 
" Max angle (optional):         " << 
fMaxAngle << std::endl
 
 2176      << 
" Min angle:                    " << 
fMinAngle << std::endl
 
 2178      << 
" Maximum Powers:               " << std::flush;
 
 2180         std::cout << 
" " << 
fMaxPowers[i] - 1 << std::flush;
 
 2181      std::cout << std::endl << std::endl
 
 2182      << 
" Parameterisation will be done using " << std::flush;
 
 2184         std::cout << 
"Chebyshev polynomials" << std::endl;
 
 2186         std::cout << 
"Legendre polynomials" << std::endl;
 
 2188         std::cout << 
"Monomials" << std::endl;
 
 2189      std::cout << std::endl;
 
 2194      std::cout << 
"Sample statistics:" << std::endl
 
 2195      << 
"------------------" << std::endl
 
 2196      << 
"                 D"  << std::flush;
 
 2198         std::cout << 
" " << std::setw(10) << i+1 << std::flush;
 
 2199      std::cout << std::endl << 
" Max:   " << std::setw(10) << std::setprecision(7)
 
 2202         std::cout << 
" " << std::setw(10) << std::setprecision(4)
 
 2204      std::cout << std::endl << 
" Min:   " << std::setw(10) << std::setprecision(7)
 
 2207         std::cout << 
" " << std::setw(10) << std::setprecision(4)
 
 2209      std::cout << std::endl << 
" Mean:  " << std::setw(10) << std::setprecision(7)
 
 2212         std::cout << 
" " << std::setw(10) << std::setprecision(4)
 
 2214      std::cout << std::endl << 
" Function Sum Squares:         " << 
fSumSqQuantity 
 2215      << std::endl << std::endl;
 
 2219      std::cout << 
"Results of Parameterisation:" << std::endl
 
 2220      << 
"----------------------------" << std::endl
 
 2221      << 
" Total reduction of square residuals    " 
 2223      << 
" Relative precision obtained:           " 
 2225      << 
" Error obtained:                        " 
 2227      << 
" Multiple correlation coefficient:      " 
 2229      << 
" Reduced Chi square over sample:        " 
 2231      << 
" Maximum residual value:                " 
 2233      << 
" Minimum residual value:                " 
 2235      << 
" Estimated root mean square:            " 
 2236      << 
fRMS << std::endl
 
 2237      << 
" Maximum powers used:                   " << std::flush;
 
 2240      std::cout << std::endl
 
 2241      << 
" Function codes of candidate functions." << std::endl
 
 2242      << 
"  1: considered," 
 2243      << 
"  2: too little contribution," 
 2244      << 
"  3: accepted." << std::flush;
 
 2247            std::cout << std::endl << 
" " << std::flush;
 
 2248         else if (i % 10 == 0)
 
 2249            std::cout << 
" " << std::flush;
 
 2252      std::cout << std::endl << 
" Loop over candidates stopped because " << std::flush;
 
 2255            std::cout << 
"max allowed studies reached" << std::endl; 
break;
 
 2257            std::cout << 
"all candidates considered several times" << std::endl; 
break;
 
 2259            std::cout << 
"wanted relative error obtained" << std::endl; 
break;
 
 2261            std::cout << 
"max number of terms reached" << std::endl; 
break;
 
 2263            std::cout << 
"some unknown reason" << std::endl;
 
 2266      std::cout << std::endl;
 
 2270      std::cout << 
"Results of Fit:" << std::endl
 
 2271      << 
"---------------" << std::endl
 
 2272      << 
" Test sample size:                      " 
 2274      << 
" Multiple correlation coefficient:      " 
 2276      << 
" Relative precision obtained:           " 
 2278      << 
" Error obtained:                        " 
 2280      << 
" Reduced Chi square over sample:        " 
 2285         std::cout << std::endl;
 
 2290      std::cout << 
"Coefficients:" << std::endl
 
 2291      << 
"-------------" << std::endl
 
 2292      << 
"   #         Value        Error   Powers" << std::endl
 
 2293      << 
" ---------------------------------------" << std::endl;
 
 2295         std::cout << 
" " << std::setw(3) << i << 
"  " 
 2299            std::cout << 
" " << std::setw(3)
 
 2301         std::cout << std::endl;
 
 2303      std::cout << std::endl;
 
 2306      std::cout << 
"Correlation Matrix:" << std::endl
 
 2307      << 
"-------------------";
 
 2312      std::cout << 
"Parameterization:" << std::endl
 
 2313      << 
"-----------------" << std::endl
 
 2314      << 
"  Normalised variables: " << std::endl;
 
 2316         std::cout << 
"\ty_" << i << 
"\t= 1 + 2 * (x_" << i << 
" - " 
 2320      std::cout << std::endl
 
 2323         std::cout << 
"y_" << i;
 
 2326      std::cout << 
") = ";
 
 2329            std::cout << std::endl << 
"\t" << (
fCoefficients(i) < 0 ? 
"- " : 
"+ ")
 
 2337               case 2: std::cout << 
" * y_" << 
j; 
break;
 
 2340                     case kLegendre:  std::cout << 
" * L_" << 
p-1 << 
"(y_" << 
j << 
")"; 
break;
 
 2341                     case kChebyshev: std::cout << 
" * C_" << 
p-1 << 
"(y_" << 
j << 
")"; 
break;
 
 2342                     default:         std::cout << 
" * y_" << 
j << 
"^" << 
p-1; 
break;
 
 2348      std::cout << std::endl;
 
 
 2378   if (
ang >= 90 || 
ang < 0) {
 
 2379      Warning(
"SetMaxAngle", 
"angle must be in [0,90)");
 
 
 2394   if (
ang > 90 || 
ang <= 0) {
 
 2395      Warning(
"SetMinAngle", 
"angle must be in [0,90)");
 
 
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
int Int_t
Signed integer 4 bytes (int)
char Char_t
Character 1 byte (char)
double Double_t
Double 8 bytes.
const char Option_t
Option string (const char)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
Int_t Fill(Double_t x) override
TMatrixTRow< Double_t > TMatrixDRow
TMatrixTDiag_const< Double_t > TMatrixDDiag_const
static void mdfHelper(int &, double *, double &, double *, int)
Helper function for doing the minimisation of Chi2 using Minuit.
Using a TBrowser one can browse all ROOT objects.
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
Cholesky Decomposition class.
1-D histogram with a double per channel (see TH1 documentation)
TH1 is the base class of all histogram classes in ROOT.
virtual Bool_t Add(TF1 *h1, Double_t c1=1, Option_t *option="")
Performs the operation: this = this + c1*f1 if errors are defined (see TH1::Sumw2),...
2-D histogram with a double per channel (see TH1 documentation)
void Clear(Option_t *option="") override
Remove all objects from the list.
TObject * FindObject(const char *name) const override
Find an object in this list using its name.
void Add(TObject *obj) override
virtual TMatrixTBase< Element > & Zero()
Set matrix elements to zero.
void Print(Option_t *name="") const override
Print the matrix as a table of elements.
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...
Multidimensional Fits in ROOT.
void Print(Option_t *option="ps") const override
Print statistics etc.
virtual void MakeCorrelation()
PRIVATE METHOD: Compute the correlation matrix.
TVectorD fCoefficients
Vector of the final coefficients.
Double_t fPrecision
Relative precision of param.
Byte_t fHistogramMask
Bit pattern of histograms used.
virtual void MakeCoefficientErrors()
PRIVATE METHOD: Compute the errors on the coefficients.
TMatrixD fOrthCurvatureMatrix
Model matrix.
Bool_t fShowCorrelation
print correlation matrix
Bool_t fIsUserFunction
Flag for user defined function.
Int_t fNVariables
Number of independent variables.
Int_t fMaxResidualRow
Row giving max residual.
Double_t fMinQuantity
Min value of dependent quantity.
virtual Double_t MakeChi2(const Double_t *coeff=nullptr)
Calculate Chi square over either the test sample.
Double_t fSumSqQuantity
SumSquare of dependent quantity.
TVectorD fMaxVariables
max value of independent variables
Int_t fSampleSize
Size of training sample.
Double_t fSumSqAvgQuantity
Sum of squares away from mean.
Int_t fMaxTerms
Max terms expected in final expr.
Int_t * fPowers
[fMaxFuncNV] where fMaxFuncNV = fMaxFunctions*fNVariables
virtual void MakeNormalized()
PRIVATE METHOD: Normalize data to the interval [-1;1].
Int_t * fMaxPowers
[fNVariables] maximum powers
Int_t fMaxStudy
max functions to study
TVectorD fTestQuantity
Test sample, dependent quantity.
TVectorD fTestSqError
Test sample, Error in quantity.
virtual Double_t Eval(const Double_t *x, const Double_t *coeff=nullptr) const
Evaluate parameterization at point x.
Int_t fMaxFunctions
max number of functions
Int_t fBinVarY
Number of bin in dependent variables.
static TMultiDimFit * Instance()
Return the static instance.
virtual void MakeCode(const char *functionName="MDF", Option_t *option="")
Generate the file <filename> with .C appended if argument doesn't end in .cxx or ....
virtual void MakeCandidates()
PRIVATE METHOD: Create list of candidate functions for the parameterisation.
Double_t fTestError
Error from test.
Double_t fMinResidual
Min residual value.
void SetPowerLimit(Double_t limit=1e-3)
Set the user parameter for the function selection.
virtual void FindParameterization(Option_t *option="")
Find the parameterization.
virtual Double_t MakeGramSchmidt(Int_t function)
PRIVATE METHOD: Make Gram-Schmidt orthogonalisation.
TVectorD fSqError
Training sample, error in quantity.
virtual void AddRow(const Double_t *x, Double_t D, Double_t E=0)
Add a row consisting of fNVariables independent variables, the known, dependent quantity,...
TVectorD fQuantity
Training sample, dependent quantity.
TVectorD fTestVariables
Test sample, independent variables.
TVectorD fOrthCoefficients
The model coefficients.
Int_t fTestSampleSize
Size of test sample.
TVectorD fResiduals
Vector of the final residuals.
virtual Bool_t TestFunction(Double_t squareResidual, Double_t dResidur)
PRIVATE METHOD: Test whether the currently considered function contributes to the fit.
TVectorD fVariables
Training sample, independent variables.
Double_t fCorrelationCoeff
Multi Correlation coefficient.
void SetMaxPowers(const Int_t *powers)
Set the maximum power to be considered in the fit for each variable.
Int_t * fMaxPowersFinal
[fNVariables] maximum powers from fit;
Int_t fMinResidualRow
Row giving min residual.
virtual void SetPowers(const Int_t *powers, Int_t terms)
Define a user function.
Double_t fMaxQuantity
Max value of dependent quantity.
virtual void MakeRealCode(const char *filename, const char *classname, Option_t *option="")
PRIVATE METHOD: This is the method that actually generates the code for the evaluation the parameteri...
Double_t fRMS
Root mean square of fit.
TMatrixD fFunctions
Functions evaluated over sample.
virtual void AddTestRow(const Double_t *x, Double_t D, Double_t E=0)
Add a row consisting of fNVariables independent variables, the known, dependent quantity,...
Int_t fParameterisationCode
Exit code of parameterisation.
Double_t fMaxAngle
Max angle for accepting new function.
Int_t fNCoefficients
Dimension of model coefficients.
virtual void Fit(Option_t *option="")
Try to fit the found parameterisation to the test sample.
TMultiDimFit()
Empty CTOR. Do not use.
Double_t fTestCorrelationCoeff
Multi Correlation coefficient.
Double_t fMinAngle
Min angle for accepting new function.
void SetMinRelativeError(Double_t error)
Set the acceptable relative error for when sum of square residuals is considered minimized.
Double_t fSumSqResidual
Sum of Square residuals.
TVectorD fMeanVariables
mean value of independent variables
virtual void MakeMethod(const Char_t *className="MDF", Option_t *option="")
Generate the file <classname>MDF.cxx which contains the implementation of the method:
void SetMaxAngle(Double_t angle=0)
Set the max angle (in degrees) between the initial data vector to be fitted, and the new candidate fu...
Double_t fTestPrecision
Relative precision of test.
virtual void MakeCoefficients()
PRIVATE METHOD: Invert the model matrix B, and compute final coefficients.
TMatrixD fCorrelationMatrix
Correlation matrix.
Int_t * fPowerIndex
[fMaxTerms] Index of accepted powers
TMatrixD fOrthFunctions
As above, but orthogonalised.
virtual Double_t EvalControl(const Int_t *powers) const
PRIVATE METHOD: Calculate the control parameter from the passed powers.
void Clear(Option_t *option="") override
Clear internal structures and variables.
virtual void MakeParameterization()
PRIVATE METHOD: Find the parameterization over the training sample.
EMDFPolyType fPolyType
Fit object (MINUIT)
void Browse(TBrowser *b) override
Browse the TMultiDimFit object in the TBrowser.
virtual Bool_t Select(const Int_t *iv)
Selection method.
TList * fHistograms
List of histograms.
Double_t fChi2
Chi square of fit.
Double_t fMaxResidual
Max residual value.
Double_t fError
Error from parametrization.
Int_t fBinVarX
Number of bin in independent variables.
virtual Double_t EvalFactor(Int_t p, Double_t x) const
PRIVATE METHOD: Evaluate function with power p at variable value x.
void SetMinAngle(Double_t angle=1)
Set the min angle (in degrees) between a new candidate function and the subspace spanned by the previ...
virtual Double_t EvalError(const Double_t *x, const Double_t *coeff=nullptr) const
Evaluate parameterization error at point x.
TVectorD fMinVariables
min value of independent variables
TVectorD fOrthFunctionNorms
Norm of the evaluated functions.
Double_t fMeanQuantity
Mean of dependent quantity.
TVectorD fCoefficientsRMS
Vector of RMS of coefficients.
Double_t fPowerLimit
Control parameter.
static TMultiDimFit * fgInstance
~TMultiDimFit() override
Destructor.
virtual void MakeHistograms(Option_t *option="A")
Make histograms of the result of the analysis.
Int_t fMaxFuncNV
fMaxFunctions*fNVariables
Double_t fMinRelativeError
Min relative error accepted.
Int_t * fFunctionCodes
[fMaxFunctions] acceptance code
The TNamed class is the base class for all named ROOT classes.
const char * GetName() const override
Returns name of object.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
void ToLower()
Change string to lower-case.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
TVectorT< Element > & Zero()
Set vector elements to zero.
TVectorT< Element > & ResizeTo(Int_t lwb, Int_t upb)
Resize the vector to [lwb:upb] .
virtual void PrintResults(Int_t level, Double_t amin) const =0
virtual void SetFCN(void(*fcn)(Int_t &, Double_t *, Double_t &f, Double_t *, Int_t))
To set the address of the minimization objective function called by the native compiler (see function...
virtual Int_t SetParameter(Int_t ipar, const char *parname, Double_t value, Double_t verr, Double_t vlow, Double_t vhigh)=0
virtual Int_t ExecuteCommand(const char *command, Double_t *args, Int_t nargs)=0
virtual Double_t GetParameter(Int_t ipar) const =0
static TVirtualFitter * Fitter(TObject *obj, Int_t maxpar=25)
Static function returning a pointer to the current fitter.
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
Double_t Sqrt(Double_t x)
Returns the square root of x.
Double_t Cos(Double_t)
Returns the cosine of an angle of x radians.
Double_t Sin(Double_t)
Returns the sine of an angle of x radians.
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.
static uint64_t sum(uint64_t i)