00001 00011 #ifndef __VERTEXCONSTRAINT_H 00012 #define __VERTEXCONSTRAINT_H 00013 00014 #include<vector> 00015 #include<cassert> 00016 #include "BaseConstraint.h" 00017 #include "ThreeVector.h" 00018 00019 class VertexFitObject; 00020 class TrackFitObject; 00021 00022 // Class VertexConstraint: 00024 00033 class VertexConstraint: public BaseConstraint { 00034 public: 00036 VertexConstraint (const VertexFitObject& vertex_, 00037 const TrackFitObject& track_, 00038 int ivertex_, 00039 int axis 00040 ); 00042 virtual ~VertexConstraint(); 00043 00045 virtual double getValue() const; 00046 00049 virtual void getDerivatives(int idim, double der[]) const; 00051 virtual void add1stDerivativesToMatrix(int idim, double *M) const; 00053 virtual void add2ndDerivativesToMatrix(int idim, double *M, double lambda) const; 00054 00056 virtual int getGlobalNum() const {return globalNum;} 00058 virtual void setGlobalNum(int iglobal) {globalNum = iglobal;} 00059 00060 protected: 00061 00063 int globalNum; 00064 00065 const VertexFitObject *vertex; 00066 const TrackFitObject *track; 00067 int ivertex; 00068 ThreeVector factor; 00069 00070 }; 00071 00072 #endif /* #ifndef __VERTEXCONSTRAINT_H */