MarlinKinfit  0.4.0
Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
OPALFitterGSL Class Reference

Description of the fit algorithm and interface: More...

#include <OPALFitterGSL.h>

Inheritance diagram for OPALFitterGSL:
BaseFitter

Public Member Functions

virtual double fit ()
 
virtual int getError () const
 Return error code. More...
 
virtual double getProbability () const
 Get the fit probability of the last fit.
 
virtual double getChi2 () const
 Get the chi**2 of the last fit.
 
virtual int getDoF () const
 Get the number of degrees of freedom of the last fit.
 
virtual int getIterations () const
 Get the number of iterations of the last fit.
 
virtual int getNcon () const
 Get the number of hard constraints of the last fit.
 
virtual int getNsoft () const
 Get the number of soft constraints of the last fit.
 
virtual int getNpar () const
 Get the number of all parameters of the last fit.
 
virtual int getNunm () const
 Get the number of unmeasured parameters of the last fit.
 
virtual bool initialize ()
 
virtual void setDebug (int debuglevel)
 Set the Debug Level.
 
- Public Member Functions inherited from BaseFitter
virtual void addFitObject (BaseFitObject *fitobject_)
 
virtual void addFitObject (BaseFitObject &fitobject_)
 
virtual void addConstraint (BaseConstraint *constraint_)
 
virtual void addConstraint (BaseConstraint &constraint_)
 
virtual void addHardConstraint (BaseHardConstraint *constraint_)
 
virtual void addHardConstraint (BaseHardConstraint &constraint_)
 
virtual void addSoftConstraint (BaseSoftConstraint *constraint_)
 
virtual void addSoftConstraint (BaseSoftConstraint &constraint_)
 
virtual std::vector
< BaseFitObject * > * 
getFitObjects ()
 
virtual std::vector
< BaseHardConstraint * > * 
getConstraints ()
 
virtual std::vector
< BaseSoftConstraint * > * 
getSoftConstraints ()
 
virtual void reset ()
 
virtual BaseTracergetTracer ()
 
virtual const BaseTracergetTracer () const
 
virtual void setTracer (BaseTracer *newTracer)
 
virtual void setTracer (BaseTracer &newTracer)
 
virtual const double * getGlobalCovarianceMatrix (int &idim) const
 
virtual double * getGlobalCovarianceMatrix (int &idim)
 

Protected Types

enum  { NPARMAX =50, NCONMAX =20, NUNMMAX =20 }
 
- Protected Types inherited from BaseFitter
typedef std::vector
< BaseFitObject * > 
FitObjectContainer
 
typedef std::vector
< BaseHardConstraint * > 
ConstraintContainer
 
typedef std::vector
< BaseSoftConstraint * > 
SoftConstraintContainer
 
typedef
FitObjectContainer::iterator 
FitObjectIterator
 
typedef
ConstraintContainer::iterator 
ConstraintIterator
 
typedef
SoftConstraintContainer::iterator 
SoftConstraintIterator
 

Protected Member Functions

virtual bool updateFitObjects (double etaxi[])
 
- Protected Member Functions inherited from BaseFitter
 BaseFitter (const BaseFitter &rhs)
 Copy constructor disabled.
 
BaseFitteroperator= (const BaseFitter &rhs)
 Assignment disabled.
 

Static Protected Member Functions

static void ini_gsl_permutation (gsl_permutation *&p, unsigned int size)
 
static void ini_gsl_vector (gsl_vector *&v, int unsigned size)
 
static void ini_gsl_matrix (gsl_matrix *&m, int unsigned size1, unsigned int size2)
 
static void debug_print (gsl_matrix *m, const char *name)
 
static void debug_print (gsl_vector *v, const char *name)
 

Protected Attributes

int npar
 
int nmea
 
int nunm
 
int ncon
 
int ierr
 
int nit
 
double fitprob
 
double chi2
 
- Protected Attributes inherited from BaseFitter
FitObjectContainer fitobjects
 
ConstraintContainer constraints
 
SoftConstraintContainer softconstraints
 
int covDim
 dimension of global covariance matrix
 
double * cov
 global covariance matrix of last fit problem
 
bool covValid
 Flag whether global covariance is valid.
 
BaseTracertracer
 

Additional Inherited Members

- Public Attributes inherited from BaseFitter
std::map< std::string, double > traceValues
 

Detailed Description

Description of the fit algorithm and interface:

The OPALFitter object holds a set (fitobjects) of BaseFitObject objects, which represent the objects (particles, jets) whose fourvectors shall be fitted. It also holds a set (constraints) of BaseConstraint objects that represent the constraints (momentum or mass constraints).

OPALFitter::initialize goes over the list of fit objects and determines the number of parameters (measured and unmeasured), and assigns global numbers to them.

OPALFitter::fit first initializes the global parameter numbering using OPALFitter::initialize.

Then it initializes vectors etaxi ( $ \eta\xi$) and y ( $ \vec y$) with the current parameter values.

Next it initializes the matrix Feta that represents $d \vec F / d \vec \eta\xi$

Used methods in OPALFitter::initialize:

Used methods in OPALFitter::updateFitObjects:

Used methods in OPALFitter::fit:

Interaction between Constraints and Particles

The Fitter does not care how the constraints and BaseFitObject objects interact. The constraints are expressed in terms of four-vector components of the BaseFitObjects. A constraint object keeps a set of BaseFitObject objects, and, using the chain rule, calculates its derivatives w.r.t. the global parameters.

Member Function Documentation

double OPALFitterGSL::fit ( )
virtual
int OPALFitterGSL::getError ( ) const
virtual

Return error code.

Error code meanings:

  • 0: No error
  • 1: out of iterations
  • 2: crazy chi^2
  • 3: minimum step size reached, chiK still increasing
  • 4: (step size decreased)
  • 5: (keep going)Get the error code of the last fit: 0=OK, 1=failed

Implements BaseFitter.


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