60 Error(
"Chisquare",
"This function is deprecated - use ROOT::Fit::Chisquare class");
122 if (npar_real != npar){
123 fixed =
new Bool_t[npar_real];
124 memset(fixed,0,npar_real*
sizeof(
Bool_t));
126 for (
Int_t ipar=0; ipar<npar_real; ipar++){
129 if (al*bl != 0 && al >= bl) {
140 delete [] sum_vector;
148 Int_t igrad, ifree=0;
149 for (
Int_t ipoint=0; ipoint<
n; ipoint++){
153 for (
Int_t irow=0; irow<npar; irow++){
156 for (
Int_t icol=0; icol<npar; icol++){
161 while (ifree<icol+1){
162 if (fixed[igrad]==0) ifree++;
170 sum_vector[irow]+=matr[irow*npar_real+icol]*grad[igrad];
174 for (
Int_t i=0; i<npar; i++){
179 if (fixed[igrad]==0) ifree++;
186 c+=grad[igrad]*sum_vector[i];
190 ci[ipoint]=c*t*chidf;
194 delete [] sum_vector;
226 Error(
"GetConfidenceIntervals",
"A TGraphErrors should be passed instead of a graph");
230 Error(
"GetConfidenceIntervals",
"A TGraph2DErrors should be passed instead of a graph");
235 Error(
"GetConfidenceIntervals",
"A TGraph2DErrors or a TH23 should be passed instead of a graph");
248 Error(
"GetConfidenceIntervals",
"A TGraph2DErrors should be passed instead of a TGraph2D");
252 Error(
"GetConfidenceIntervals",
"A TGraphErrors should be passed instead of a TGraph2D");
257 Error(
"GetConfidenceIntervals",
"A TGraphErrors or a TH1 should be passed instead of a graph");
273 for (
Int_t ipoint=0; ipoint<np; ipoint++){
279 for (
Int_t icol=0; icol<npar; icol++)
280 sum_vector[irow]+=matr[irow*npar+icol]*grad[icol];
283 for (
Int_t i=0; i<npar; i++)
284 c+=grad[i]*sum_vector[i];
287 gr2->
GetEZ()[ipoint]=c*t*chidf;
291 delete [] sum_vector;
297 if (((
TH1*)obj)->GetDimension()>1){
298 Error(
"GetConfidenceIntervals",
"Fitted graph and passed histogram have different number of dimensions");
303 if (((
TH1*)obj)->GetDimension()!=2){
304 Error(
"GetConfidenceIntervals",
"Fitted graph and passed histogram have different number of dimensions");
310 Error(
"GetConfidenceIntervals",
"Fitted and passed histograms have different number of dimensions");
337 for (
Int_t binz=hzfirst; binz<=hzlast; binz++){
339 for (
Int_t biny=hyfirst; biny<=hylast; biny++) {
341 for (
Int_t binx=hxfirst; binx<=hxlast; binx++) {
344 for (
Int_t irow=0; irow<npar; irow++){
346 for (
Int_t icol=0; icol<npar; icol++)
347 sum_vector[irow]+=matr[irow*npar+icol]*grad[icol];
350 for (
Int_t i=0; i<npar; i++)
351 c+=grad[i]*sum_vector[i];
359 delete [] sum_vector;
362 Error(
"GetConfidenceIntervals",
"This object type is not supported");
387 if (i < 0 || i >= npars || j < 0 || j >= npars) {
388 Error(
"GetCovarianceMatrixElement",
"Illegal arguments i=%d, j=%d",i,j);
470 strcpy(parname,pname.
Data());
virtual Bool_t IsFixed(Int_t ipar) const
return kTRUE if parameter ipar is fixed, kFALSE othersise)
virtual void mnstat(Double_t &fmin, Double_t &fedm, Double_t &errdef, Int_t &npari, Int_t &nparx, Int_t &istat)
Returns concerning the current status of the minimization.
virtual void mnprin(Int_t inkode, Double_t fval)
Prints the values of the parameters at the time of the call.
virtual void PrintResults(Int_t level, Double_t amin) const
Print fit results.
Int_t GetFirst() const
Return first bin on the axis i.e.
Implementation in C++ of the Minuit package written by Fred James.
virtual Double_t GetCovarianceMatrixElement(Int_t i, Int_t j) const
return element i,j from the covariance matrix
virtual void mnemat(Double_t *emat, Int_t ndim)
Calculates the external error matrix from the internal matrix.
virtual Double_t * GetCovarianceMatrix() const
return a pointer to the covariance matrix
virtual Int_t GetNumberFreeParameters() const
Return the number of free parameters.
Double_t QuietNaN()
Returns a quiet NaN as defined by IEEE 754
Double_t StudentQuantile(Double_t p, Double_t ndf, Bool_t lower_tail=kTRUE)
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual Int_t GetErrors(Int_t ipar, Double_t &eplus, Double_t &eminus, Double_t &eparab, Double_t &globcc) const
return current errors for a parameter ipar : parameter number eplus : upper error eminus : lower erro...
virtual Double_t * GetEY() const
virtual Int_t ExecuteCommand(const char *command, Double_t *args, Int_t nargs)
Execute a fitter command; command : command string args : list of nargs command arguments.
virtual const char * GetParName(Int_t ipar) const
return name of parameter ipar
virtual Int_t FixParameter(Int_t parNo)
fix a parameter
virtual ~TFitter()
Default destructor.
virtual Int_t GetNDF() const
Return the number of degrees of freedom in the fit the fNDF parameter has been previously computed du...
int GetDimension(const TH1 *h1)
virtual void ReleaseParameter(Int_t ipar)
Release parameter ipar.
virtual void mnrn15(Double_t &val, Int_t &inseed)
This is a super-portable random number generator.
static constexpr double eplus
virtual Double_t GetBinCenter(Int_t bin) const
Return center of bin.
virtual Int_t GetNumberFreeParameters() const
return the number of free parameters
virtual Double_t * GetEZ() const
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 SetFCN(void(*fcn)(Int_t &, Double_t *, Double_t &f, Double_t *, Int_t))
Specify the address of the fitting algorithm.
virtual Double_t GradientPar(Int_t ipar, const Double_t *x, Double_t eps=0.01)
Compute the gradient (derivative) wrt a parameter ipar.
virtual void mnpout(Int_t iuext, TString &chnam, Double_t &val, Double_t &err, Double_t &xlolim, Double_t &xuplim, Int_t &iuint) const
Provides the user with information concerning the current status.
virtual Double_t GetParameter(Int_t ipar) const
return current value of parameter ipar
Int_t GetLast() const
Return last bin on the axis i.e.
TString * fCpnam
Character to be plotted at the X,Y contour positions.
Class to manage histogram axis.
virtual void mncler()
Resets the parameter list to UNDEFINED.
virtual void mnparm(Int_t k, TString cnamj, Double_t uk, Double_t wk, Double_t a, Double_t b, Int_t &ierflg)
Implements one parameter definition.
A 3-Dim function with parameters.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
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 void Error(const char *method, const char *msgfmt,...) const
Issue error message.
static TVirtualFitter * GetFitter()
static: return the current Fitter
A 2-Dim function with parameters.
virtual void mnerrs(Int_t number, Double_t &eplus, Double_t &eminus, Double_t &eparab, Double_t &gcc)
Utility routine to get MINOS errors.
virtual Double_t Chisquare(Int_t npar, Double_t *params) const
Double_t GetChisquare() const
virtual void SetFitMethod(const char *name)
ret fit method (chisquare or loglikelihood)
virtual Double_t GetSumLog(Int_t i)
return Sum(log(i) i=0,n used by log likelihood fits
virtual void SetPoint(Int_t point, Double_t x, Double_t y, Double_t z)
Sets point number n.
void F2Fit(Int_t &npar, Double_t *gin, Double_t &f, Double_t *u, Int_t flag)
virtual Double_t GetParError(Int_t ipar) const
return error of parameter ipar
virtual Int_t Release(Int_t parNo)
release a parameter
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 mnexcm(const char *comand, Double_t *plist, Int_t llist, Int_t &ierflg)
Interprets a command and takes appropriate action.
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 void FixParameter(Int_t ipar)
Fix parameter ipar.
virtual void InitArgs(const Double_t *x, const Double_t *params)
Initialize parameters addresses.
Abstract Base Class for Fitting.
Mother of all ROOT objects.
virtual Int_t GetNpar() const
virtual void GetParLimits(Int_t ipar, Double_t &parmin, Double_t &parmax) const
Return limits for parameter ipar.
virtual void SetPoint(Int_t i, Double_t x, Double_t y)
Set x and y values for point number i.
virtual void Clear(Option_t *option="")
reset the fitter environment
A Graph is a graphics object made of two arrays X and Y with npoints each.
virtual Double_t * GetParameters() const
virtual void SetFCN(void(*fcn)(Int_t &, Double_t *, Double_t &f, Double_t *, Int_t))
To set the address of the minimization function.
Double_t Sqrt(Double_t x)
void F3Fit(Int_t &npar, Double_t *gin, Double_t &f, Double_t *u, Int_t flag)
virtual Int_t GetNumPars() const
returns the total number of parameters that have been defined as fixed or free.
Graphics object made of three arrays X, Y and Z with the same number of points each.
virtual Int_t GetNumberTotalParameters() const
return the total number of parameters (free + fixed)
virtual Double_t EvalPar(const Double_t *x, const Double_t *params=0)
Evaluate function with given coordinates and parameters.
virtual TObject * GetUserFunc() const
virtual TObject * GetObjectFit() const
virtual Int_t GetStats(Double_t &amin, Double_t &edm, Double_t &errdef, Int_t &nvpar, Int_t &nparx) const
return global fit parameters amin : chisquare edm : estimated distance to minimum errdef nvpar : numb...
TAxis * GetXaxis()
Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more informat...
const char * Data() const
virtual Int_t SetParameter(Int_t ipar, const char *parname, Double_t value, Double_t verr, Double_t vlow, Double_t vhigh)
set initial values for a parameter ipar : parameter number parname : parameter name value : initial p...