00001 00010 #ifndef __TTVERTEXCONSTRAINT_H 00011 #define __TTVERTEXCONSTRAINT_H 00012 00013 #include<vector> 00014 #include<cassert> 00015 #include "BaseConstraint.h" 00016 #include "ThreeVector.h" 00017 00018 // Class TTVertexConstraint: 00020 00029 class TrackFitObject; 00030 00031 class TTVertexConstraint: public BaseConstraint { 00032 public: 00034 TTVertexConstraint (const TrackFitObject& t0, 00035 int i0, 00036 const TrackFitObject& t1, 00037 int i1, 00038 int axis 00039 ); 00041 virtual ~TTVertexConstraint(); 00042 00044 virtual double getValue() const; 00045 00048 virtual void getDerivatives(int idim, double der[]) const; 00050 virtual void add1stDerivativesToMatrix(int idim, double *M) const; 00052 virtual void add2ndDerivativesToMatrix(int idim, double *M, double lambda) const; 00053 00055 virtual int getGlobalNum() const {return globalNum;} 00057 virtual void setGlobalNum(int iglobal) {globalNum = iglobal;} 00058 00059 protected: 00060 00062 virtual void invalidateCache() const; 00064 virtual void updateCache() const; 00065 00067 int globalNum; 00068 00069 const TrackFitObject *tracks[2]; 00070 int vnumber[2]; 00071 ThreeVector factor; 00072 double sign[2]; 00073 00074 mutable bool cachevalid; 00075 00076 }; 00077 00078 #endif /* #ifndef __TTVERTEXCONSTRAINT_H */