17#ifndef __TrackConstraint_H
18#define __TrackConstraint_H
22#include "analysis/OrcaKinFit/BaseConstraint.h"
30 namespace OrcaKinFit {
81 virtual void setFOList(std::vector <TrackFitObject*>* fitobjects_
84 for (
int i = 0; i < (int) fitobjects_->size(); i++) {
87 sign.push_back(i == 0 ? 1 : -1);
91 virtual void addToFOList(TrackFitObject& fitobject,
int flag = 1
95 flags.push_back(flag);
96 sign.push_back(sign.size() == 0 ? 1 : -1);
145 std::vector <double> sign;
Abstract base class for constraints of kinematic fits.
Abstract base class for constraints of kinematic fits.
virtual void addToFOList(TrackFitObject &fitobject, int flag=1)
Adds one TrackFitObject objects to the list.
virtual double getValue() const =0
Returns the value of the constraint.
FitObjectContainer::iterator FitObjectIterator
Iterator through vector of pointers to TrackFitObjects.
virtual int getGlobalNum() const
Accesses position of constraint in global constraint list.
std::vector< double > derivatives
The derivatives.
int globalNum
Position of constraint in global constraint list.
FitObjectContainer fitobjects
The FitObjectContainer.
virtual ~TrackConstraint()
Virtual destructor.
TrackConstraint()
Creates an empty TrackConstraint object.
std::vector< TrackFitObject * > FitObjectContainer
Vector of pointers to TrackFitObjects.
virtual void invalidateCache() const
Invalidates any cached values for the next event.
virtual void setGlobalNum(int iglobal)
Sets position of constraint in global constraint list.
virtual void setFOList(std::vector< TrackFitObject * > *fitobjects_)
Adds several TrackFitObject objects to the list.
virtual void add2ndDerivativesToMatrix(double *M, int idim, double lambda) const
Adds second order derivatives to global covariance matrix M.
FitObjectContainer::const_iterator ConstFitObjectIterator
Constant iterator through vector of pointers to TrackFitObjects.
virtual void addToGlobalChi2DerVector(double *y, int idim, double lambda) const
Add lambda times derivatives of chi squared to global derivative matrix.
std::vector< int > flags
The flags can be used to divide the FitObjectContainer into several subsets used for example to imple...
virtual void getDerivatives(int idim, double der[]) const =0
Get first order derivatives.
virtual void add1stDerivativesToMatrix(double *M, int idim) const
Adds first order derivatives to global covariance matrix M.
Abstract base class for different kinds of events.