10#ifndef ROOT_TBackCompFitter_H_
11#define ROOT_TBackCompFitter_H_
46 TBackCompFitter(
const std::shared_ptr<ROOT::Fit::Fitter> & fitter,
const std::shared_ptr<ROOT::Fit::FitData> & data );
116 bool Contour(
unsigned int ipar,
unsigned int jpar,
TGraph *
gr ,
double confLevel = 0.683);
#define ClassDef(name, id)
Class describing the configuration of the fit, options and parameter settings using the ROOT::Fit::Pa...
Base class for all the fit data types: Stores the coordinates and the DataOptions.
class containg the result of the fit and all the related information (fitted parameter values,...
Documentation for the abstract class IBaseFunctionMultiDim.
Abstract Minimizer class, defining the interface for the various minimizer (like Minuit2,...
Backward compatible implementation of TVirtualFitter.
const ROOT::Fit::FitResult & GetFitResult() const
virtual void SetMethodCall(TMethodCall *m)
ROOT::Math::Minimizer * fMinimizer
pointer to fitter object
void DoSetDimension()
Private method to set dimension in objective function.
virtual void SetFCN(void(*fcn)(Int_t &, Double_t *, Double_t &f, Double_t *, Int_t))
Override setFCN to use the Adapter to Minuit2 FCN interface To set the address of the minimization fu...
virtual Int_t SetParameter(Int_t ipar, const char *parname, Double_t value, Double_t verr, Double_t vlow, Double_t vhigh)
Set (add) a new fit parameter passing initial value, step size (verr) and parameter limits if vlow > ...
virtual Double_t Chisquare(Int_t npar, Double_t *params) const
Do chisquare calculations in case of likelihood fits Do evaluation a the minimum only.
virtual Int_t GetNumberFreeParameters() const
ROOT::Math::Minimizer * GetMinimizer() const
Return a pointer to the minimizer.
virtual void PrintResults(Int_t level, Double_t amin) const
Print the fit result.
virtual Double_t GetCovarianceMatrixElement(Int_t i, Int_t j) const
Get error matrix element (return all zero if matrix is not available)
virtual ~TBackCompFitter()
Destructor - delete the managed objects.
ROOT::Fit::FitConfig & GetFitConfig()
virtual Double_t GetParError(Int_t ipar) const
Parameter error.
TBackCompFitter()
Constructor needed by TVirtualFitter interface.
virtual Double_t GetSumLog(Int_t i)
Sum of log (un-needed)
virtual void ReleaseParameter(Int_t ipar)
Release a fit parameter.
virtual Int_t GetErrors(Int_t ipar, Double_t &eplus, Double_t &eminus, Double_t &eparab, Double_t &globcc) const
Get fit errors.
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.
std::shared_ptr< ROOT::Fit::FitData > fFitData
virtual Int_t GetStats(Double_t &amin, Double_t &edm, Double_t &errdef, Int_t &nvpar, Int_t &nparx) const
Get fit statistical information.
virtual void Clear(Option_t *option="")
Clear resources for consecutive fits.
ROOT::Math::IParamMultiFunction * fModelFunc
virtual Int_t GetNumberTotalParameters() const
Number of total parameters.
virtual Double_t GetParameter(Int_t ipar) const
Parameter value.
TFitResult * GetTFitResult() const
Return a new copy of the TFitResult object which needs to be deleted later by the user.
void ReCreateMinimizer()
Recreate a minimizer instance using the function and data set objective function in minimizers functi...
std::shared_ptr< ROOT::Fit::Fitter > fFitter
data of the fit
virtual void SetFitMethod(const char *name)
Set fit method (chi2 or likelihood).
std::vector< double > fCovar
bool ValidParameterIndex(int ipar) const
Check if ipar is a valid parameter index.
virtual Bool_t IsFixed(Int_t ipar) const
Query if parameter ipar is fixed.
bool Contour(unsigned int ipar, unsigned int jpar, TGraph *gr, double confLevel=0.683)
Create a 2D contour around the minimum for the parameter ipar and jpar if a minimum does not exist or...
virtual Int_t ExecuteCommand(const char *command, Double_t *args, Int_t nargs)
Execute the command (Fortran Minuit compatible interface)
virtual const char * GetParName(Int_t ipar) const
Return name of parameter ipar.
const ROOT::Fit::FitData & GetFitData() const
virtual void FixParameter(Int_t ipar)
Fix the parameter.
ROOT::Math::IMultiGenFunction * GetObjFunction() const
Return a pointer to the objective function (FCN) If fitting directly using TBackCompFitter the pointe...
virtual void SetObjFunction(ROOT::Math::IMultiGenFunction *f)
Set the objective function for fitting Needed if fitting directly using TBackCompFitter class The cla...
virtual Double_t * GetCovarianceMatrix() const
Get the error matrix in a pointer to a NxN array.
bool Scan(unsigned int ipar, TGraph *gr, double xmin=0, double xmax=0)
Scan parameter ipar between value of xmin and xmax A graph must be given which will be on return fill...
ROOT::Math::IMultiGenFunction * fObjFunc
Extends the ROOT::Fit::Result class with a TNamed inheritance providing easy possibility for I/O.
A Graph is a graphics object made of two arrays X and Y with npoints each.
Method or function calling interface.
Mother of all ROOT objects.
Abstract Base Class for Fitting.
TMethodCall * fMethodCall
TFitResultPtr Fit(FitObject *h1, TF1 *f1, Foption_t &option, const ROOT::Math::MinimizerOptions &moption, const char *goption, ROOT::Fit::DataRange &range)
Namespace for new Math classes and functions.
RooCmdArg Minimizer(const char *type, const char *alg=0)
static constexpr double eplus