00001 #ifndef SmartPointingConstraint_H 00002 #define SmartPointingConstraint_H 00003 00004 #include "RecoVertex/KinematicFitPrimitives/interface/KinematicConstraint.h" 00005 00006 00021 class SmartPointingConstraint : public KinematicConstraint 00022 { 00023 public: 00024 00025 SmartPointingConstraint(const GlobalPoint& ref):refPoint(ref) 00026 {} 00027 00032 virtual std::pair<AlgebraicVector, AlgebraicVector> value(const AlgebraicVector& exPoint) const; 00033 00034 virtual std::pair<AlgebraicMatrix, AlgebraicVector> derivative(const AlgebraicVector& exPoint) const; 00035 00040 virtual std::pair<AlgebraicMatrix, AlgebraicVector> derivative(const std::vector<RefCountedKinematicParticle> par) const; 00041 00042 virtual std::pair<AlgebraicVector, AlgebraicVector> value(const std::vector<RefCountedKinematicParticle> par) const; 00043 00044 virtual AlgebraicVector deviations(int nStates) const; 00045 00051 virtual int numberOfEquations() const; 00052 00053 virtual SmartPointingConstraint * clone() const 00054 {return new SmartPointingConstraint(*this);} 00055 00056 private: 00057 00058 std::pair<AlgebraicVector,AlgebraicVector> makeValue(const AlgebraicVector& exPoint)const ; 00059 std::pair<AlgebraicMatrix, AlgebraicVector> makeDerivative(const AlgebraicVector& exPoint) const; 00060 00061 GlobalPoint refPoint; 00062 00063 }; 00064 00065 #endif