CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch13/src/RecoBTag/SecondaryVertex/interface/SecondaryVertex.h

Go to the documentation of this file.
00001 #ifndef RecoBTag_SecondaryVertex_SecondaryVertex_h
00002 #define RecoBTag_SecondaryVertex_SecondaryVertex_h
00003 
00004 #include "DataFormats/GeometryCommonDetAlgo/interface/Measurement1D.h"
00005 #include "DataFormats/GeometryVector/interface/GlobalVector.h"
00006 #include "DataFormats/VertexReco/interface/Vertex.h"
00007 
00008 namespace reco {
00009 
00010 class SecondaryVertex : public reco::Vertex {
00011     public:
00012         SecondaryVertex() {}
00013         SecondaryVertex(const reco::Vertex &pv,
00014                         const reco::Vertex &sv,
00015                         const GlobalVector &direction,
00016                         bool withPVError = false) :
00017                 reco::Vertex(sv),
00018                 dist2d_(computeDist2d(pv, sv, direction, withPVError)),
00019                 dist3d_(computeDist3d(pv, sv, direction, withPVError)) {}
00020         ~SecondaryVertex() {}
00021 
00022         inline Measurement1D dist2d() const { return dist2d_; }
00023         inline Measurement1D dist3d() const { return dist3d_; }
00024 
00025         static Measurement1D computeDist2d(
00026                 const reco::Vertex &pv, const reco::Vertex &sv,
00027                 const GlobalVector &direction, bool withPVError);
00028         static Measurement1D computeDist3d(
00029                 const reco::Vertex &pv, const reco::Vertex &sv,
00030                 const GlobalVector &direction, bool withPVError);
00031 
00032     private:
00033         Measurement1D dist2d_;
00034         Measurement1D dist3d_;
00035 };
00036 
00037 } // namespace reco
00038 
00039 #endif // RecoBTag_SecondaryVertex_SecondaryVertex_h