|
MarlinKinfit
0.4.0
|
Implements a constraint of the form efact*sum(E)+pxfact*sum(px)+pyfact*sum(py)+pzfact*sum(pz)=value. More...
#include <MomentumConstraint.h>
Public Member Functions | |
| MomentumConstraint (double efact_=0, double pxfact_=0, double pyfact_=0, double pzfact_=0, double value_=0) | |
| virtual double | getValue () const |
| Returns the value of the constraint. | |
| virtual void | getDerivatives (int idim, double der[]) const |
| Get first order derivatives. More... | |
| virtual void | invalidateCache () const |
| Invalidates any cached values for the next event. | |
| virtual int | getVarBasis () const |
Public Member Functions inherited from ParticleConstraint | |
| ParticleConstraint () | |
| Creates an empty ParticleConstraint object. | |
| virtual | ~ParticleConstraint () |
| 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. | |
Public Member Functions inherited from BaseHardConstraint | |
| virtual | ~BaseHardConstraint () |
| Virtual destructor. | |
| virtual void | add1stDerivativesToMatrix (double *M, int idim) const |
| Adds first order derivatives to global covariance matrix M. More... | |
| virtual void | add2ndDerivativesToMatrix (double *M, int idim, double lambda) const |
| Adds second order derivatives to global covariance matrix M. More... | |
| virtual void | addToGlobalChi2DerVector (double *y, int idim, double lambda) const |
| Add lambda times derivatives of chi squared to global derivative vector. More... | |
| virtual double | dirDer (double *p, double *w, int idim, double mu=1) |
| Calculate directional derivative. More... | |
| virtual double | dirDerAbs (double *p, double *w, int idim, double mu=1) |
| Calculate directional derivative for abs(c) More... | |
| virtual double | getError () const |
| Returns the error on the value of the constraint. | |
| virtual int | getGlobalNum () const |
| Accesses position of constraint in global constraint list. | |
| virtual void | setGlobalNum (int iglobal) |
| Sets position of constraint in global constraint list. More... | |
| virtual void | printFirstDerivatives () const |
| virtual void | printSecondDerivatives () const |
| virtual void | test1stDerivatives () |
| virtual void | test2ndDerivatives () |
| virtual double | num1stDerivative (int ifo, int ilocal, double eps) |
| Evaluates numerically the 1st derivative w.r.t. a parameter. More... | |
| virtual 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... | |
Public Member Functions inherited from BaseConstraint | |
| BaseConstraint () | |
| Creates an empty BaseConstraint object. | |
| BaseConstraint (const BaseConstraint &rhs) | |
| Copy constructor. More... | |
| BaseConstraint & | operator= (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 Types | |
| enum | { VAR_BASIS =0 } |
Protected Types inherited from BaseHardConstraint | |
|
typedef std::vector < BaseFitObject * > | 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. | |
Protected Member Functions | |
| void | updateCache () const |
| 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 | efact |
| double | pxfact |
| double | pyfact |
| double | pzfact |
| double | value |
| bool | cachevalid |
| int | nparams |
Protected Attributes inherited from BaseHardConstraint | |
| 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... | |
| int | globalNum |
| Position of constraint in global constraint list. | |
Protected Attributes inherited from BaseConstraint | |
| char * | name |
Additional Inherited Members | |
Related Functions inherited from BaseConstraint | |
| std::ostream & | operator<< (std::ostream &os, const BaseConstraint &bc) |
| Prints out a BaseConstraint, using its print method. More... | |
Implements a constraint of the form efact*sum(E)+pxfact*sum(px)+pyfact*sum(py)+pzfact*sum(pz)=value.
Author: Jenny List, Benno List Last update:
by:
| MomentumConstraint::MomentumConstraint | ( | double | efact_ = 0, |
| double | pxfact_ = 0, |
||
| double | pyfact_ = 0, |
||
| double | pzfact_ = 0, |
||
| double | value_ = 0 |
||
| ) |
| efact_ | Factor for energy sum |
| pxfact_ | Factor for px sum |
| pyfact_ | Factor for py sum |
| pzfact_ | Factor for pz sum |
| value_ | Target value of sum |
|
protectedvirtual |
First derivatives with respect to the 4-vector of Fit objects i; result false if all derivatives are zero.
| i | number of 1st FitObject |
| derivatives | The result 4-vector |
Implements BaseHardConstraint.
|
virtual |
Get first order derivatives.
Call this with a predefined array "der" with the necessary number of entries!
| idim | First dimension of the array |
| der | Array of derivatives, at least idim x idim |
Implements BaseHardConstraint.
References BaseHardConstraint::fitobjects, ParticleFitObject::getDE(), ParticleFitObject::getDPx(), ParticleFitObject::getDPy(), and ParticleFitObject::getDPz().
|
protectedvirtual |
Second derivatives with respect to the 4-vectors of Fit objects i and j; result false if all derivatives are zero.
| i | number of 1st FitObject |
| j | number of 2nd FitObject |
| derivatives | The result 4x4 matrix |
Implements BaseHardConstraint.
1.8.6