00001 #ifndef FourMomentumKinematicConstraint_H 00002 #define FourMomentumKinematicConstraint_H 00003 00004 #include "RecoVertex/KinematicFitPrimitives/interface/KinematicConstraint.h" 00005 #include "RecoVertex/KinematicFitPrimitives/interface/ParticleMass.h" 00006 00017 class FourMomentumKinematicConstraint : public KinematicConstraint 00018 { 00019 00020 public: 00021 00027 FourMomentumKinematicConstraint(const AlgebraicVector& momentum, 00028 const AlgebraicVector& deviation); 00029 00034 virtual std::pair<AlgebraicVector,AlgebraicVector> value(const AlgebraicVector& exPoint) const; 00035 00036 virtual std::pair<AlgebraicMatrix, AlgebraicVector> derivative(const AlgebraicVector& exPoint) const; 00037 00038 00043 virtual std::pair<AlgebraicMatrix, AlgebraicVector> derivative(const std::vector<RefCountedKinematicParticle> par) const; 00044 00045 virtual std::pair<AlgebraicVector, AlgebraicVector> value(const std::vector<RefCountedKinematicParticle> par) const; 00046 00047 00052 virtual int numberOfEquations() const; 00053 00054 virtual AlgebraicVector deviations(int nStates) const; 00055 00056 virtual FourMomentumKinematicConstraint * clone() const 00057 {return new FourMomentumKinematicConstraint(*this);} 00058 00059 private: 00060 00061 AlgebraicVector mm; 00062 AlgebraicVector dd; 00063 00064 }; 00065 #endif