CERN Accelerating science

This website is no longer maintained. Its content may be obsolete. Please visit http://home.cern/ for current CERN information.

Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

AIDA::IFitter Interface Reference

#include <IFitter.h>

List of all members.

Public Methods

virtual ~IFitter ()
 Destructor. More...

virtual IFitResultfit (IFitData &fitData, IFunction &func)=0
virtual IFitResultfit (IBaseHistogram &hist, IFunction &func)=0
virtual IFitResultfit (IBaseHistogram &hist, std::string model)=0
virtual IFitResultfit (IBaseHistogram &hist, std::string model, std::vector< double > &initialParameters)=0
virtual IFitResultfit (IDataPointSet &dataPointSet, IFunction &f)=0
virtual IFitResultfit (IDataPointSet &dataPointSet, std::string model)=0
virtual IFitResultfit (IDataPointSet &dataPointSet, std::string model, std::vector< double > &initialParameters)=0
virtual IFitResultfit (IFitData &d, std::string model)=0
 Shortcut for the predefined models. More...

virtual IFitResultfit (IFitData &d, std::string model, std::vector< double > &initialParameters)=0
virtual bool setEngine (std::string name)=0
virtual std::string engineName ()=0
virtual IFitParameterSettingsfitParameterSettings (std::string name)=0
virtual const std::vector<
std::string>& 
listParameterSettings ()=0
virtual void resetParameterSettings ()=0
virtual bool setConstraint (std::string expr)=0
virtual const std::vector<
std::string>& 
constraints ()=0
 Get the list of all constraints. More...

virtual void resetConstraints ()=0
virtual bool setFitMethod (std::string name)=0
virtual std::string fitMethodName ()=0
virtual IDataPointSetcreateScan1D (IFitData &d, IFunction &f, std::string par, int npts, double pmin, double pmax)=0
 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'). More...

virtual IDataPointSetcreateContour (IFitData &d, IFitResult &r, std::string par1, std::string par2, int npts, double up)=0
 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. More...

virtual void setUseFunctionGradient (bool useGrad)=0
virtual bool useFunctionGradient ()=0


Detailed Description

Fitter performs fits, scans and computes contours.

Fitter never stores association to the data and functions which are used for fitting. Results of the fit are availabe in the IFitResult object, which also remebers the initial fit configuration.

Author:
The AIDA team (http://aida.freehep.org/)

Definition at line 39 of file IFitter.h.


Constructor & Destructor Documentation

AIDA::IFitter::~IFitter ( ) [inline, virtual]
 

Definition at line 43 of file IFitter.h.


Member Function Documentation

const std::vector< std::string > & AIDA::IFitter::constraints ( ) [pure virtual]
 

IDataPointSet * AIDA::IFitter::createContour ( IFitData & d,
IFitResult & r,
std::string par1,
std::string par2,
int npts,
double up ) [pure virtual]
 

IDataPointSet * AIDA::IFitter::createScan1D ( IFitData & d,
IFunction & f,
std::string par,
int npts,
double pmin,
double pmax ) [pure virtual]
 

std::string AIDA::IFitter::engineName ( ) [pure virtual]
 

Get the name of the engine currently in use.

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

IFitResult * AIDA::IFitter::fit ( IFitData & d,
std::string model,
std::vector< double > & initialParameters ) [pure virtual]
 

IFitResult * AIDA::IFitter::fit ( IFitData & d,
std::string model ) [pure virtual]
 

IFitResult * AIDA::IFitter::fit ( IDataPointSet & dataPointSet,
std::string model,
std::vector< double > & initialParameters ) [pure 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:
dataPointSet   The IDataPointSet to be fitted.
model   The string defining the function to be used.
initialParameters   The 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.

IFitResult * AIDA::IFitter::fit ( IDataPointSet & dataPointSet,
std::string model ) [pure 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:
dataPointSet   The IDataPointSet to be fitted.
model   The string defining the function to be used.
Returns:
The IFitResult containing the result of the fit.

IFitResult * AIDA::IFitter::fit ( IDataPointSet & dataPointSet,
IFunction & f ) [pure 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:
dataPointSet   The IDataPointSet to be fitted.
func   The IFunction to fit on the data.
Returns:
The IFitResult containing the result of the fit.

IFitResult * AIDA::IFitter::fit ( IBaseHistogram & hist,
std::string model,
std::vector< double > & initialParameters ) [pure 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:
hist   The IBaseHistogram to be fitted.
model   The string defining the function to be used.
initialParameters   The 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.

IFitResult * AIDA::IFitter::fit ( IBaseHistogram & hist,
std::string model ) [pure 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:
hist   The IBaseHistogram to be fitted.
model   The string defining the function to be used.
Returns:
The IFitResult containing the result of the fit.

IFitResult * AIDA::IFitter::fit ( IBaseHistogram & hist,
IFunction & func ) [pure 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:
hist   The IBaseHistogram to be fitted.
func   The IFunction to fit on the data.
Returns:
The IFitResult containing the result of the fit.

IFitResult * AIDA::IFitter::fit ( IFitData & fitData,
IFunction & func ) [pure virtual]
 

Fit an IFunction to an IFitData. The result of the fit is an IFitResult.

Parameters:
fitData   The IFitData to be fitted.
func   The IFunction to fit on the data.
Returns:
The IFitResult containing the results of the fit.

std::string AIDA::IFitter::fitMethodName ( ) [pure virtual]
 

Get the name of the fit method currently in use.

Returns:
The name of the fit method.

IFitParameterSettings & AIDA::IFitter::fitParameterSettings ( std::string name ) [pure 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.

const std::vector< std::string > & AIDA::IFitter::listParameterSettings ( ) [pure virtual]
 

Get a vector of names of all parameter settings defined in the fitter.

void AIDA::IFitter::resetConstraints ( ) [pure virtual]
 

Reset all the constraints.

void AIDA::IFitter::resetParameterSettings ( ) [pure virtual]
 

Reset all parameter settings which fitter remebers.

bool AIDA::IFitter::setConstraint ( std::string expr ) [pure virtual]
 

Set a general constraint in the parameter space. The constraint is a parsed expression. PENDING: The syntax to be fixed.

bool AIDA::IFitter::setEngine ( std::string name ) [pure virtual]
 

Set the optimization engine which is used internally for fitting.

Parameters:
name   The 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.

bool AIDA::IFitter::setFitMethod ( std::string name ) [pure virtual]
 

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

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

void AIDA::IFitter::setUseFunctionGradient ( bool useGrad ) [pure virtual]
 

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

Parameters:
useGrad   If true the IFitter will use the analytical derivatives if provided by the IFunction.

bool AIDA::IFitter::useFunctionGradient ( ) [pure 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.


The documentation for this interface was generated from the following file:
Generated at Tue Feb 18 15:48:24 2003 for AIDA_Interfaces by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001