MarlinKinfit  0.4.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SoftGaussMassConstraint Class Reference

Implements constraint 0 = mass1 - mass2 - m. More...

#include <SoftGaussMassConstraint.h>

Inheritance diagram for SoftGaussMassConstraint:
SoftGaussParticleConstraint BaseSoftConstraint BaseConstraint

Public Member Functions

 SoftGaussMassConstraint (double sigma_, double mass_=0.)
 Constructor. More...
 
virtual ~SoftGaussMassConstraint ()
 Virtual destructor.
 
virtual double getValue () const
 Returns the value of the constraint function.
 
virtual void getDerivatives (int idim, double der[]) const
 Get first order derivatives. More...
 
virtual double getMass (int flag=1)
 Get the actual invariant mass of the fit objects with a given flag. More...
 
virtual void setMass (double mass_)
 Sets the target mass of the constraint. More...
 
- Public Member Functions inherited from SoftGaussParticleConstraint
 SoftGaussParticleConstraint (double sigma_)
 Creates an empty SoftGaussParticleConstraint object. More...
 
virtual ~SoftGaussParticleConstraint ()
 Virtual destructor.
 
virtual void setFOList (std::vector< ParticleFitObject * > *fitobjects_)
 Adds several ParticleFitObject objects to the list. More...
 
virtual void addToFOList (ParticleFitObject &fitobject, int flag=1)
 Adds one ParticleFitObject objects to the list.
 
virtual void resetFOList ()
 Resests ParticleFitObject list.
 
virtual double getChi2 () const
 Returns the chi2.
 
virtual double getError () const
 Returns the error on the value of the constraint.
 
virtual double getSigma () const
 Returns the sigma.
 
virtual double setSigma (double sigma_)
 Sets the sigma. More...
 
virtual void add2ndDerivativesToMatrix (double *M, int idim) const
 Adds second order derivatives to global covariance matrix M. More...
 
virtual void addToGlobalChi2DerVector (double *y, int idim) const
 Add derivatives of chi squared to global derivative matrix. More...
 
virtual void invalidateCache () const
 Invalidates any cached values for the next event.
 
void test1stDerivatives ()
 
void test2ndDerivatives ()
 
double num1stDerivative (int ifo, int ilocal, double eps)
 Evaluates numerically the 1st derivative w.r.t. a parameter. More...
 
double num2ndDerivative (int ifo1, int ilocal1, double eps1, int ifo2, int ilocal2, double eps2)
 Evaluates numerically the 2nd derivative w.r.t. 2 parameters. More...
 
int getVarBasis () const
 
- Public Member Functions inherited from BaseSoftConstraint
virtual ~BaseSoftConstraint ()
 Virtual destructor.
 
- Public Member Functions inherited from BaseConstraint
 BaseConstraint ()
 Creates an empty BaseConstraint object.
 
 BaseConstraint (const BaseConstraint &rhs)
 Copy constructor. More...
 
BaseConstraintoperator= (const BaseConstraint &rhs)
 Assignment. More...
 
virtual ~BaseConstraint ()
 Virtual destructor.
 
virtual const char * getName () const
 Returns the name of the constraint.
 
virtual void setName (const char *name_)
 Set object's name.
 
virtual std::ostream & print (std::ostream &os) const
 print object to ostream More...
 

Protected Member Functions

virtual bool secondDerivatives (int i, int j, double *derivatives) const
 Second derivatives with respect to the 4-vectors of Fit objects i and j; result false if all derivatives are zero. More...
 
virtual bool firstDerivatives (int i, double *derivatives) const
 First derivatives with respect to the 4-vector of Fit objects i; result false if all derivatives are zero. More...
 

Protected Attributes

double mass
 The mass difference between object sets 1 and 2.
 
- Protected Attributes inherited from SoftGaussParticleConstraint
FitObjectContainer fitobjects
 The FitObjectContainer.
 
std::vector< double > derivatives
 The derivatives.
 
std::vector< int > flags
 The flags can be used to divide the FitObjectContainer into several subsets used for example to implement an equal mass constraint (see MassConstraint). More...
 
double sigma
 The sigma of the Gaussian.
 
- Protected Attributes inherited from BaseSoftConstraint
char * name
 
- Protected Attributes inherited from BaseConstraint
char * name
 

Additional Inherited Members

- Protected Types inherited from SoftGaussParticleConstraint
enum  { VAR_BASIS =BaseDefs::VARBASIS_EPXYZ }
 
typedef std::vector
< ParticleFitObject * > 
FitObjectContainer
 Vector of pointers to ParticleFitObjects.
 
typedef
FitObjectContainer::iterator 
FitObjectIterator
 Iterator through vector of pointers to ParticleFitObjects.
 
typedef
FitObjectContainer::const_iterator 
ConstFitObjectIterator
 Constant iterator through vector of pointers to ParticleFitObjects.
 

Detailed Description

Implements constraint 0 = mass1 - mass2 - m.

This class implements different mass constraints:

Author: Jenny List, Benno List Last update:

Date:
2008/02/12 16:43:26

by:

Author:
blist

Constructor & Destructor Documentation

SoftGaussMassConstraint::SoftGaussMassConstraint ( double  sigma_,
double  mass_ = 0. 
)

Constructor.

Parameters
sigma_The sigma value
mass_The mass difference between object sets 1 and 2

Member Function Documentation

bool SoftGaussMassConstraint::firstDerivatives ( int  i,
double *  derivatives 
) const
protectedvirtual

First derivatives with respect to the 4-vector of Fit objects i; result false if all derivatives are zero.

Parameters
inumber of 1st FitObject
derivativesThe result 4-vector

Implements SoftGaussParticleConstraint.

References SoftGaussParticleConstraint::fitobjects, SoftGaussParticleConstraint::flags, ParticleFitObject::getE(), ParticleFitObject::getPx(), ParticleFitObject::getPy(), and ParticleFitObject::getPz().

void SoftGaussMassConstraint::getDerivatives ( int  idim,
double  der[] 
) const
virtual

Get first order derivatives.

Call this with a predefined array "der" with the necessary number of entries!

Parameters
idimFirst dimension of the array
derArray of derivatives, at least idim x idim

Implements SoftGaussParticleConstraint.

References SoftGaussParticleConstraint::fitobjects, and SoftGaussParticleConstraint::flags.

double SoftGaussMassConstraint::getMass ( int  flag = 1)
virtual

Get the actual invariant mass of the fit objects with a given flag.

Parameters
flagThe flag

References SoftGaussParticleConstraint::fitobjects, and SoftGaussParticleConstraint::flags.

bool SoftGaussMassConstraint::secondDerivatives ( int  i,
int  j,
double *  derivatives 
) const
protectedvirtual

Second derivatives with respect to the 4-vectors of Fit objects i and j; result false if all derivatives are zero.

Parameters
inumber of 1st FitObject
jnumber of 2nd FitObject
derivativesThe result 4x4 matrix

Implements SoftGaussParticleConstraint.

References SoftGaussParticleConstraint::fitobjects, SoftGaussParticleConstraint::flags, ParticleFitObject::getE(), ParticleFitObject::getPx(), ParticleFitObject::getPy(), and ParticleFitObject::getPz().

void SoftGaussMassConstraint::setMass ( double  mass_)
virtual

Sets the target mass of the constraint.

Parameters
mass_The new mass

References mass.


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