CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/RecoVertex/TrimmedKalmanVertexFinder/interface/TrimmedVertexFinder.h

Go to the documentation of this file.
00001 #ifndef _RecoVertex_TrimmedVertexFinder_H_
00002 #define _RecoVertex_TrimmedVertexFinder_H_
00003 
00004 #include "RecoVertex/VertexPrimitives/interface/TransientVertex.h"
00005 #include "TrackingTools/TransientTrack/interface/TransientTrack.h"
00006 #include "RecoVertex/VertexPrimitives/interface/CachingVertex.h"
00007 #include "RecoVertex/VertexPrimitives/interface/VertexFitter.h"
00008 #include "RecoVertex/VertexPrimitives/interface/VertexUpdator.h"
00009 #include "RecoVertex/VertexPrimitives/interface/VertexTrackCompatibilityEstimator.h"
00010 #include <vector>
00011 
00028 class TrimmedVertexFinder {
00029 
00030 public:
00031 
00032   typedef ReferenceCountingPointer<VertexTrack<5> > RefCountedVertexTrack;
00033   typedef ReferenceCountingPointer<LinearizedTrackState<5> > RefCountedLinearizedTrackState;
00034 
00035   TrimmedVertexFinder(const VertexFitter<5> * vf, 
00036                       const VertexUpdator<5> * vu, 
00037                       const VertexTrackCompatibilityEstimator<5> * ve);
00038 
00041   TrimmedVertexFinder(const TrimmedVertexFinder & other);
00042   ~TrimmedVertexFinder();
00043 
00047   std::vector<TransientVertex> 
00048     vertices(std::vector<reco::TransientTrack> & remain) const;
00049   
00054   std::vector<TransientVertex> 
00055     vertices(std::vector<reco::TransientTrack> & remain,
00056         const reco::BeamSpot & s, bool use_beamspot=true ) const;
00057 
00060   float trackCompatibilityCut() const { return theMinProb; }
00061 
00064   void setTrackCompatibilityCut(float cut) { theMinProb = cut; }
00065 
00068   TrimmedVertexFinder * clone() const {
00069     return new TrimmedVertexFinder(*this);
00070   }
00071 
00072 
00073 private:
00074 
00075   // finds least compatible track
00076   // returns vtxTracks.end() if all tracks are compatible
00077   //
00078   std::vector<RefCountedVertexTrack>::iterator theWorst(
00079     const CachingVertex<5> & vtx, 
00080     std::vector<RefCountedVertexTrack> & vtxTracks, 
00081     float cut) const;
00082 
00083   VertexFitter<5> * theFitter;
00084   VertexUpdator<5> * theUpdator;
00085   VertexTrackCompatibilityEstimator<5> * theEstimator;
00086   float theMinProb;
00087 
00088 };
00089 
00090 #endif