CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/RecoVertex/VertexTools/interface/VertexTrackFactory.h

Go to the documentation of this file.
00001 #ifndef VertexTrackFactory_H
00002 #define VertexTrackFactory_H
00003 
00004 #include "DataFormats/GeometrySurface/interface/ReferenceCounted.h"
00005 #include "RecoVertex/VertexPrimitives/interface/VertexTrack.h"
00006 #include "RecoVertex/VertexPrimitives/interface/LinearizedTrackState.h"
00007 
00015 template <unsigned int N>
00016 class VertexTrackFactory {
00017 
00018 public:
00019 
00020   typedef ReferenceCountingPointer<RefittedTrackState<N> > RefCountedRefittedTrackState;
00021   typedef ReferenceCountingPointer<VertexTrack<N> > RefCountedVertexTrack;
00022   typedef ReferenceCountingPointer<LinearizedTrackState<N> > RefCountedLinearizedTrackState;
00023   typedef ROOT::Math::SMatrix<double,3,N-2,ROOT::Math::MatRepStd<double,3,N-2> > AlgebraicMatrix3M;
00024   typedef ROOT::Math::SMatrix<double,N+1,N+1,ROOT::Math::MatRepSym<double,N+1> > AlgebraicSymMatrixOO;
00025 
00026   VertexTrackFactory() {}
00027    ~VertexTrackFactory() {}
00028 
00029   RefCountedVertexTrack
00030    vertexTrack(const RefCountedLinearizedTrackState lt, 
00031                const VertexState vs,
00032                float weight = 1.0 ) const {
00033     return RefCountedVertexTrack(new VertexTrack<N>(lt, vs, weight ));
00034   };
00035 
00036   RefCountedVertexTrack
00037    vertexTrack(const RefCountedLinearizedTrackState lt, 
00038                const VertexState vs,
00039                const RefCountedRefittedTrackState & refittedState, 
00040                float smoothedChi2, float weight = 1.0 ) const {
00041     return RefCountedVertexTrack(new VertexTrack<N>(lt, vs, weight, refittedState,
00042                                  smoothedChi2));
00043   };
00044 
00045   RefCountedVertexTrack
00046   vertexTrack(const RefCountedLinearizedTrackState lt, 
00047               const VertexState vs,
00048               const RefCountedRefittedTrackState & refittedState,
00049               float smoothedChi2,
00050               const AlgebraicSymMatrixOO & tVCov, float weight = 1.0 ) const {
00051     return RefCountedVertexTrack(new VertexTrack<N>(lt, vs, weight,
00052                                  refittedState, smoothedChi2, tVCov));
00053   };
00054 };
00055 
00056 #endif