RAIDA  1.9.0
Public Member Functions | List of all members
AIDA::IFitterROOT Class Reference

Dummy implementation of the class "IFitter". More...

#include <IFitterROOT.h>

Inheritance diagram for AIDA::IFitterROOT:
AIDA::IFitter

Public Member Functions

virtual ~IFitterROOT ()
 Destructor.
 
virtual IFitResultfit (IFitData &fitData, IFunction &func)
 Fit an IFunction to an IFitData. More...
 
virtual IFitResultfit (IBaseHistogram &hist, IFunction &func)
 Shortcut to fit an IBaseHistogram directly with an IFunction. More...
 
virtual IFitResultfit (IBaseHistogram &hist, const std::string &model)
 Shortcut to fit an IBaseHistogram directly with an IFunction. More...
 
virtual IFitResultfit (IBaseHistogram &hist, const std::string &model, const std::vector< double > &initialParameters)
 Shortcut to fit an IBaseHistogram directly with an IFunction. More...
 
virtual IFitResultfit (IDataPointSet &dataPointSet, IFunction &f)
 Shortcut to fit an IDataPointSet directly with an IFunction. More...
 
virtual IFitResultfit (IDataPointSet &dataPointSet, const std::string &model)
 Shortcut to fit an IDataPointSet directly with an IFunction. More...
 
virtual IFitResultfit (IDataPointSet &dataPointSet, const std::string &model, const std::vector< double > &initialParameters)
 Shortcut to fit an IDataPointSet directly with an IFunction. More...
 
virtual IFitResultfit (IFitData &d, const std::string &model)
 Shortcut for the predefined models.
 
virtual IFitResultfit (IFitData &d, const std::string &model, const std::vector< double > &initialParameters)
 
virtual bool setEngine (const std::string &name)
 Set the optimization engine which is used internally for fitting. More...
 
virtual std::string engineName ()
 Get the name of the engine currently in use. More...
 
virtual IFitParameterSettingsfitParameterSettings (const std::string &name)
 Access to fit parameter settings. More...
 
virtual std::vector< std::string > listParameterSettings ()
 Get a vector of names of all parameter settings defined in the fitter.
 
virtual void resetParameterSettings ()
 Reset all parameter settings which fitter remebers.
 
virtual bool setConstraint (const std::string &expr)
 Set a general constraint in the parameter space. More...
 
virtual std::vector< std::string > constraints ()
 Get the list of all constraints.
 
virtual void resetConstraints ()
 Reset all the constraints.
 
virtual bool setFitMethod (const std::string &name)
 Set the fit method type. More...
 
virtual std::string fitMethodName ()
 Get the name of the fit method currently in use. More...
 
virtual IDataPointSetcreateScan1D (IFitData &d, IFunction &f, const std::string &par, int npts, double pmin, double pmax)
 Create a 1D scan of the fit quality for given parameter 'par' of the function. More...
 
virtual IDataPointSetcreateContour (IFitData &d, IFitResult &r, const std::string &par1, const std::string &par2, int npts, double up)
 Create a 2D contour spanned on 'par1' and 'par2', with given number of npts points. More...
 
virtual void setUseFunctionGradient (bool useGrad)
 Choose between using or not using the analytical derivatives if provided by the function. More...
 
virtual bool useFunctionGradient ()
 Check if the IFitter is set to use the analytical derivatives provided by the IFunction. More...
 
- Public Member Functions inherited from AIDA::IFitter
virtual ~IFitter ()
 Destructor.
 

Detailed Description

Dummy implementation of the class "IFitter".

Author
T. Kraemer, DESY
Version
Id:
IFitterROOT.h,v 1.1 2007-01-03 17:03:20 tkraemer Exp

Member Function Documentation

IDataPointSet * IFitterROOT::createContour ( IFitData d,
IFitResult r,
const std::string &  par1,
const std::string &  par2,
int  npts,
double  up 
)
virtual

Create a 2D contour spanned on 'par1' and 'par2', with given number of npts points.

Contour is create using previously obtained fit results. Argument 'up' tells the vertical distance of the contour plane above the minimal fit quality value.

Implements AIDA::IFitter.

IDataPointSet * IFitterROOT::createScan1D ( IFitData d,
IFunction f,
const std::string &  par,
int  npts,
double  pmin,
double  pmax 
)
virtual

Create a 1D scan of the fit quality for given parameter 'par' of the function.

User must make sure that the returned vector is properly deleted after use. The vector containes 'npts' points which are evenly sampled in the interval ('pmin','pmax').

Implements AIDA::IFitter.

std::string IFitterROOT::engineName ( )
virtual

Get the name of the engine currently in use.

Returns
The name of the optimizer engine used by the IFitter.

Implements AIDA::IFitter.

IFitResult * IFitterROOT::fit ( IFitData fitData,
IFunction func 
)
virtual

Fit an IFunction to an IFitData.

The result of the fit is an IFitResult.

Parameters
fitDataThe IFitData to be fitted.
funcThe IFunction to fit on the data.
Returns
The IFitResult containing the results of the fit.

Implements AIDA::IFitter.

IFitResult * IFitterROOT::fit ( IBaseHistogram hist,
IFunction func 
)
virtual

Shortcut to fit an IBaseHistogram directly with an IFunction.

The dimension of the IBaseHistogram must match the dimension of the IFunction. IHistograms and IProfiles are for binned fits only, IClouds only for unbinned fits.

Parameters
histThe IBaseHistogram to be fitted.
funcThe IFunction to fit on the data.
Returns
The IFitResult containing the result of the fit.

Implements AIDA::IFitter.

IFitResult * IFitterROOT::fit ( IBaseHistogram hist,
const std::string &  model 
)
virtual

Shortcut to fit an IBaseHistogram directly with an IFunction.

The dimension of the IBaseHistogram must match the dimension of the IFunction. IHistograms and IProfiles are for binned fits only, IClouds only for unbinned fits.

Parameters
histThe IBaseHistogram to be fitted.
modelThe string defining the function to be used.
Returns
The IFitResult containing the result of the fit.

Implements AIDA::IFitter.

IFitResult * IFitterROOT::fit ( IBaseHistogram hist,
const std::string &  model,
const std::vector< double > &  initialParameters 
)
virtual

Shortcut to fit an IBaseHistogram directly with an IFunction.

The dimension of the IBaseHistogram must match the dimension of the IFunction. IHistograms and IProfiles are for binned fits only, IClouds only for unbinned fits.

Parameters
histThe IBaseHistogram to be fitted.
modelThe string defining the function to be used.
initialParametersThe array of the initial parameter values; its size must match the number of parameters in the function.
Returns
The IFitResult containing the result of the fit.

Implements AIDA::IFitter.

IFitResult * IFitterROOT::fit ( IDataPointSet dataPointSet,
IFunction f 
)
virtual

Shortcut to fit an IDataPointSet directly with an IFunction.

The dimension of the IDataPointSet must be equal the dimension of the IFunction + 1. This are binned fits only; the last coordinate of the IDataPointSet is used as the "height" in a fit to an IBaseHistogram.

Parameters
dataPointSetThe IDataPointSet to be fitted.
funcThe IFunction to fit on the data.
Returns
The IFitResult containing the result of the fit.

Implements AIDA::IFitter.

IFitResult * IFitterROOT::fit ( IDataPointSet dataPointSet,
const std::string &  model 
)
virtual

Shortcut to fit an IDataPointSet directly with an IFunction.

The dimension of the IDataPointSet must be equal the dimension of the IFunction + 1. This are binned fits only; the last coordinate of the IDataPointSet is used as the "height" in a fit to an IBaseHistogram.

Parameters
dataPointSetThe IDataPointSet to be fitted.
modelThe string defining the function to be used.
Returns
The IFitResult containing the result of the fit.

Implements AIDA::IFitter.

IFitResult * IFitterROOT::fit ( IDataPointSet dataPointSet,
const std::string &  model,
const std::vector< double > &  initialParameters 
)
virtual

Shortcut to fit an IDataPointSet directly with an IFunction.

The dimension of the IDataPointSet must be equal the dimension of the IFunction + 1. This are binned fits only; the last coordinate of the IDataPointSet is used as the "height" in a fit to an IBaseHistogram.

Parameters
dataPointSetThe IDataPointSet to be fitted.
modelThe string defining the function to be used.
initialParametersThe array of the initial parameter values; its size must match the number of parameters in the function.
Returns
The IFitResult containing the result of the fit.

Implements AIDA::IFitter.

std::string IFitterROOT::fitMethodName ( )
virtual

Get the name of the fit method currently in use.

Returns
The name of the fit method.

Implements AIDA::IFitter.

IFitParameterSettings & IFitterROOT::fitParameterSettings ( const std::string &  name)
virtual

Access to fit parameter settings.

FitParameterSettings object belongs to and is managed by the fitter. Fitter implementation takes care that the returned reference is valid thru the lifetime of fitter. User can set the settings of the parameters independently of the parameters of the fitted function. Setting for parameters unknown in the function and set in the fitter are ignored in the fit. If settings are not explicitly set in the fitter, their default values are attached to function parameters during the fit.

Implements AIDA::IFitter.

bool IFitterROOT::setConstraint ( const std::string &  expr)
virtual

Set a general constraint in the parameter space.

The constraint is a parsed expression. PENDING: The syntax to be fixed.

Implements AIDA::IFitter.

bool IFitterROOT::setEngine ( const std::string &  name)
virtual

Set the optimization engine which is used internally for fitting.

Parameters
nameThe name of the optimizer engine. Examples of predefined engines: "minuit". The engine name is case-insensitive. Different engines are provided by different implementations.
Returns
false If the name does not correspond to a valid engine.

Implements AIDA::IFitter.

bool IFitterROOT::setFitMethod ( const std::string &  name)
virtual

Set the fit method type.

Examples of pre-defined methods: "chi2", "ml". The method names are case-insensitive.

Parameters
nameThe name of the fit method.
Returns
false If the name does not correspond to a valid fit method.

Implements AIDA::IFitter.

void IFitterROOT::setUseFunctionGradient ( bool  useGrad)
virtual

Choose between using or not using the analytical derivatives if provided by the function.

Parameters
useGradIf true the IFitter will use the analytical derivatives if provided by the IFunction.

Implements AIDA::IFitter.

bool IFitterROOT::useFunctionGradient ( )
virtual

Check if the IFitter is set to use the analytical derivatives provided by the IFunction.

Returns
true if the IFitter uses the analytical derivatives.

Implements AIDA::IFitter.


The documentation for this class was generated from the following files: