CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_1/src/RecoVertex/KalmanVertexFit/interface/KalmanVertexUpdator.h

Go to the documentation of this file.
00001 #ifndef KalmanVertexUpdator_H
00002 #define KalmanVertexUpdator_H
00003 
00004 #include "RecoVertex/VertexPrimitives/interface/VertexUpdator.h"
00005 #include "RecoVertex/KalmanVertexFit/interface/KVFHelper.h"
00006 
00012 template <unsigned int N>
00013 class KalmanVertexUpdator: public VertexUpdator<N> {
00014 
00015 public:
00016 
00017   typedef typename CachingVertex<N>::RefCountedVertexTrack RefCountedVertexTrack;
00018   typedef typename VertexTrack<N>::RefCountedLinearizedTrackState RefCountedLinearizedTrackState;
00019 
00025    CachingVertex<N> add(const CachingVertex<N> & oldVertex,
00026         const RefCountedVertexTrack track) const;
00027 
00033    CachingVertex<N> remove(const CachingVertex<N> & oldVertex,
00034         const RefCountedVertexTrack track) const;
00035 
00040    VertexUpdator<N> * clone() const
00041    {
00042     return new KalmanVertexUpdator(* this);
00043    }
00044 
00049   CachingVertex<N> update(const CachingVertex<N> & oldVertex,
00050                          const RefCountedVertexTrack track, float weight,
00051                          int sign ) const;
00052 
00053   VertexState positionUpdate (const VertexState & oldVertex,
00054          const RefCountedLinearizedTrackState linearizedTrack, 
00055          const float weight, int sign) const;
00056 
00057   std::pair <bool, double> chi2Increment(const VertexState & oldVertex, 
00058          const VertexState & newVertexState,
00059          const RefCountedLinearizedTrackState linearizedTrack, 
00060          float weight) const; 
00061 
00062 private:
00063 
00064   typedef ROOT::Math::SVector<double,N> AlgebraicVectorN;
00065   typedef ROOT::Math::SVector<double,N-2> AlgebraicVectorM;
00066   typedef ROOT::Math::SMatrix<double,N,3,ROOT::Math::MatRepStd<double,N,3> > AlgebraicMatrixN3;
00067   typedef ROOT::Math::SMatrix<double,N,N-2,ROOT::Math::MatRepStd<double,N,N-2> > AlgebraicMatrixNM;
00068   typedef ROOT::Math::SMatrix<double,N-2,3,ROOT::Math::MatRepStd<double,N-2,3> > AlgebraicMatrixM3;
00069   typedef ROOT::Math::SMatrix<double,N,N,ROOT::Math::MatRepSym<double,N> > AlgebraicSymMatrixNN;
00070   typedef ROOT::Math::SMatrix<double,N+1,N+1,ROOT::Math::MatRepSym<double,N+1> > AlgebraicSymMatrixOO;
00071   typedef ROOT::Math::SMatrix<double,N+1,N+1,ROOT::Math::MatRepStd<double,N+1,N+1> > AlgebraicMatrixOO;
00072   typedef ROOT::Math::SMatrix<double,N-2,N-2,ROOT::Math::MatRepSym<double,N-2> > AlgebraicSymMatrixMM;
00073 
00074   KVFHelper<N> helper;
00075 
00076 };
00077 
00078 #endif