MarlinKinfit  0.4.0
Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
VertexFitObject Class Reference

Class that represents vertices. More...

#include <VertexFitObject.h>

Inheritance diagram for VertexFitObject:
BaseFitObject

Classes

struct  TrackDescriptor
 

Public Types

enum  {
  VX = 1, VY = 2, VZ = 4, VXY = 3,
  VXYZ =7, PX = 8, PY = 16, PZ = 32,
  PXY = 24, PXYZ = 56, E = 64, EPXYZ = 120,
  THE_FULL_MONTY = 127
}
 

Public Member Functions

 VertexFitObject (const char *name_, double x, double y, double z)
 Constructor.
 
 VertexFitObject (const VertexFitObject &rhs)
 Copy Constructor.
 
VertexFitObjectoperator= (const VertexFitObject &rhs)
 assignment
 
virtual VertexFitObjectcopy () const
 Return a new copy of itself.
 
virtual VertexFitObjectassign (const BaseFitObject &source)
 Assign from anther object, if of same type. More...
 
virtual ~VertexFitObject ()
 Destructor.
 
virtual int getNPar () const
 Get total number of parameters of this FitObject.
 
virtual const char * getParamName (int ilocal) const
 Get object's name. More...
 
virtual void getVertexEx (ThreeVector &p) const
 Get vertex into existing 3-vector.
 
virtual ThreeVector getVertex () const
 Get vertex.
 
virtual void getVertexDerivativeEx (int ilocal, ThreeVector &p) const
 Get derivative of vertex w.r.t. parameter ilocal into existing 3-vector.
 
virtual ThreeVector getVertexDerivative (int ilocal) const
 Get derivative of vertex w.r.t. parameter ilocal.
 
virtual void getDerivatives (double der[], int idim) const
 
virtual std::ostream & print (std::ostream &os) const
 print object to ostream More...
 
virtual TrackParticleFitObjectgetTrack (int i) const
 get track i
 
virtual void addTrack (TrackParticleFitObject *track, bool inbound, bool measured)
 add track More...
 
virtual void addConstraints (BaseFitter &fitter, int mask=THE_FULL_MONTY)
 Create constraints and add them to a BaseFit object.
 
virtual ThreeVector estimatePosition ()
 Estimate vertex position.
 
virtual void initForFit ()
 Initialize this object and attatched tracks for fit with initial estimates.
 
virtual double getFirstDerivative_Meta_Local (int iMeta, int ilocal, int metaSet) const
 
virtual double getSecondDerivative_Meta_Local (int iMeta, int ilocal, int jlocal, int metaSet) const
 
- Public Member Functions inherited from BaseFitObject
 BaseFitObject ()
 Default constructor.
 
 BaseFitObject (const BaseFitObject &rhs)
 Copy constructor. More...
 
BaseFitObjectoperator= (const BaseFitObject &rhs)
 Assignment. More...
 
virtual ~BaseFitObject ()
 Virtual destructor.
 
virtual bool setParam (int ilocal, double par_, bool measured_, bool fixed_=false)
 Set value and measured flag of parameter i; return: significant change. More...
 
virtual bool setParam (int ilocal, double par_)
 Set value of parameter ilocal; return: significant change. More...
 
virtual bool updateParams (double p[], int idim)
 Read values from global vector, readjust vector; return: significant change. More...
 
virtual bool setMParam (int ilocal, double mpar_)
 Set measured value of parameter ilocal; return: success. More...
 
virtual bool setError (int ilocal, double err_)
 Set error of parameter ilocal; return: success. More...
 
virtual bool setCov (int ilocal, int jlocal, double cov_)
 Set covariance of parameters ilocal and jlocal; return: success. More...
 
virtual bool setGlobalParNum (int ilocal, int iglobal)
 Set number of parameter ilocal in global list return true signals OK. More...
 
virtual bool fixParam (int ilocal, bool fix=true)
 Fix a parameter (fix=true), or release it (fix=false) More...
 
virtual bool releaseParam (int ilocal)
 Release a parameter. More...
 
virtual bool isParamFixed (int ilocal) const
 Returns whether parameter is fixed. More...
 
virtual double getParam (int ilocal) const
 Get current value of parameter ilocal. More...
 
virtual const char * getName () const
 Get object's name.
 
virtual void setName (const char *name_)
 Set object's name.
 
virtual double getMParam (int ilocal) const
 Get measured value of parameter ilocal. More...
 
virtual double getError (int ilocal) const
 Get error of parameter ilocal. More...
 
virtual double getCov (int ilocal, int jlocal) const
 Get covariance between parameters ilocal and jlocal. More...
 
virtual double getRho (int ilocal, int jlocal) const
 Get correlation coefficient between parameters ilocal and jlocal. More...
 
virtual bool isParamMeasured (int ilocal) const
 Get measured flag for parameter ilocal. More...
 
virtual int getGlobalParNum (int ilocal) const
 Get global parameter number of parameter ilocal. More...
 
virtual int getNMeasured () const
 Get number of measured parameters of this FitObject.
 
virtual int getNUnmeasured () const
 Get number of unmeasured parameters of this FitObject.
 
virtual int getNFree () const
 Get number of free parameters of this FitObject.
 
virtual int getNFixed () const
 Get number of fixed parameters of this FitObject.
 
virtual double getChi2 () const
 Get chi squared from measured and fitted parameters.
 
virtual double getDChi2DParam (int ilocal) const
 Get derivative of chi squared w.r.t. parameter ilocal. More...
 
virtual double getD2Chi2DParam2 (int ilocal, int jlocal) const
 Get second derivative of chi squared w.r.t. parameters ilocal1 and ilocal2. More...
 
virtual std::ostream & printParams (std::ostream &os) const
 print the parameters and errors More...
 
virtual std::ostream & printRhoValues (std::ostream &os) const
 print the correlation coefficients More...
 
virtual std::ostream & print1stDerivatives (std::ostream &os) const
 print the 1st derivatives wrt metaSet 0 (E, px, py, pz) More...
 
virtual std::ostream & print2ndDerivatives (std::ostream &os) const
 print the 2nd derivatives wrt metaSet 0 (E, px, py, pz) More...
 
virtual void invalidateCache () const
 invalidate any cached quantities
 
virtual void addToGlobCov (double *glcov, int idim) const
 Add covariance matrix elements to global covariance matrix of size idim x idim. More...
 
virtual void addToGlobalChi2DerVector (double *y, int idim) const
 Add derivatives of chi squared to global derivative vector. More...
 
virtual void addToGlobalChi2DerMatrix (double *M, int idim) const
 Add 2nd derivatives of chi squared to global derivative matrix. More...
 
virtual void addToGlobalChi2DerVector (double *y, int idim, double lambda, double der[], int metaSet) const
 Add derivatives of momentum vector to global derivative vector. More...
 
virtual void addTo1stDerivatives (double M[], int idim, double der[], int kglobal, int metaSet) const
 
virtual void addTo2ndDerivatives (double der2[], int idim, double factor[], int metaSet) const
 
virtual void addTo2ndDerivatives (double M[], int idim, double lambda, double der[], int metaSet) const
 
virtual void initCov ()
 
virtual double getError2 (double der[], int metaset) const
 

Protected Types

enum  { NPAR = 3 }
 init covariance matrix to dummy values More...
 
typedef std::vector
< TrackDescriptor
TContainer
 
typedef TContainer::iterator TIterator
 
typedef std::vector
< BaseConstraint * > 
CContainer
 
typedef CContainer::iterator CIterator
 

Protected Member Functions

virtual void updateCache () const
 
virtual void addVertexConstraints (BaseFitter &fitter, int axis)
 generate vertex constraints
 
virtual void addMomentumConstraint (BaseFitter &fitter, int axis)
 generate momentum constraints
 
- Protected Member Functions inherited from BaseFitObject
virtual bool calculateCovInv () const
 Calculate the inverse of the covariance matrix.
 

Protected Attributes

TContainer tracks
 
CContainer constraints
 
- Protected Attributes inherited from BaseFitObject
char * name
 
double par [BaseDefs::MAXPAR]
 fit parameters
 
double mpar [BaseDefs::MAXPAR]
 measured parameters
 
bool measured [BaseDefs::MAXPAR]
 measured flag
 
bool fixed [BaseDefs::MAXPAR]
 fixed flag
 
int globalParNum [BaseDefs::MAXPAR]
 global paramter number for each parameter
 
double cov [BaseDefs::MAXPAR][BaseDefs::MAXPAR]
 local covariance matrix
 
double covinv [BaseDefs::MAXPAR][BaseDefs::MAXPAR]
 inverse pf local covariance matrix
 
bool covinvvalid
 flag for valid inverse covariance matrix
 
bool cachevalid
 flag for valid cache
 

Additional Inherited Members

- Static Protected Attributes inherited from BaseFitObject
static const double eps2 = 0.0001
 

Detailed Description

Class that represents vertices.

A VertexFitObject represents a vertex, parametrized by its coordinates (x, y, z).

A VertexFitObject is a BaseFitObject, and therefore the vertex coordinates can enter a fit, either as measured values for a measured (primary) vertex, or as unmeasured values for a decay vertex.

Additionally, a VertexFitObject keeps a list of outgoing tracks and knows its incoming track (if any), which enables the VertexFitObject to set a list of constraints (VertexConstraint and TrackMomentumConstraint objects) for a fitter object.

Author:Benno List, Jenny List

Date:
2008/01/30 09:14:55
Author:
blist

Member Enumeration Documentation

anonymous enum
protected

init covariance matrix to dummy values

Calculate the inverse of the covariance matrix Calculate chi2 Copy another VertexFitObject Number of parameters

Member Function Documentation

void VertexFitObject::addTrack ( TrackParticleFitObject track,
bool  inbound,
bool  measured 
)
virtual

add track

Parameters
trackThe track
inboundIs track decaying vertex (inbound=true), or originating?
measuredIs this a measured track?
VertexFitObject & VertexFitObject::assign ( const BaseFitObject source)
virtual

Assign from anther object, if of same type.

Parameters
sourceThe source object

Reimplemented from BaseFitObject.

References BaseFitObject::assign().

Referenced by operator=(), and VertexFitObject().

const char * VertexFitObject::getParamName ( int  ilocal) const
virtual

Get object's name.

Set object's name Get name of parameter ilocal

Parameters
ilocalLocal parameter number

Reimplemented from BaseFitObject.

std::ostream & VertexFitObject::print ( std::ostream &  os) const
virtual

print object to ostream

Parameters
osThe output stream

Implements BaseFitObject.

References BaseFitObject::getName(), and BaseFitObject::printParams().


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