00001 #ifndef _ConfigurableTrimmedVertexFinder_H_ 00002 #define _ConfigurableTrimmedVertexFinder_H_ 00003 00004 #include "RecoVertex/VertexPrimitives/interface/VertexReconstructor.h" 00005 #include "RecoVertex/TrimmedKalmanVertexFinder/interface/TrimmedVertexFinder.h" 00006 #include "RecoVertex/TrimmedKalmanVertexFinder/interface/TrimmedTrackFilter.h" 00007 #include <vector> 00008 00043 class ConfigurableTrimmedVertexFinder : public VertexReconstructor { 00044 00045 public: 00046 00047 ConfigurableTrimmedVertexFinder(const VertexFitter<5> * vf, 00048 const VertexUpdator<5> * vu, 00049 const VertexTrackCompatibilityEstimator<5> * ve); 00050 00051 virtual ~ConfigurableTrimmedVertexFinder() {} 00052 00053 virtual vector<TransientVertex> 00054 vertices(const vector<reco::TransientTrack> & tracks) const; 00055 00056 vector<TransientVertex> 00057 vertices( const vector<reco::TransientTrack> & tracks, 00058 vector<reco::TransientTrack>& unused) const; 00059 00062 float ptCut() const { return theFilter.ptCut(); } 00063 const TrimmedTrackFilter & trackFilter() const { 00064 return theFilter; 00065 } 00066 float trackCompatibilityCut() const { return theTrackCompatibilityToPV; } 00067 float trackCompatibilityToSV() const { return theTrackCompatibilityToSV; } 00068 float vertexFitProbabilityCut() const { return theVtxFitProbCut; } 00069 int maxNbOfVertices() const { return theMaxNbOfVertices; } 00070 00073 void setPtCut(float cut) { theFilter.setPtCut(cut); } 00074 void setTrackCompatibilityCut(float cut) { 00075 theTrackCompatibilityToPV = cut; 00076 } 00077 void setTrackCompatibilityToSV(float cut) { 00078 theTrackCompatibilityToSV = cut; 00079 } 00080 void setVertexFitProbabilityCut(float cut) { theVtxFitProbCut = cut; } 00081 void setMaxNbOfVertices(int max) { theMaxNbOfVertices = max; } 00082 00085 virtual ConfigurableTrimmedVertexFinder * clone() const { 00086 return new ConfigurableTrimmedVertexFinder(*this); 00087 } 00088 00089 protected: 00090 00091 virtual void resetEvent(const vector<reco::TransientTrack> & tracks) const {} 00092 00093 virtual void analyseInputTracks(const vector<reco::TransientTrack> & tracks) 00094 const {} 00095 00096 virtual void 00097 analyseClusterFinder(const vector<TransientVertex> & vts, 00098 const vector<reco::TransientTrack> & remain) 00099 const {} 00100 00101 virtual void analyseVertexCandidates(const vector<TransientVertex> & vts) 00102 const {} 00103 00104 virtual void analyseFoundVertices(const vector<TransientVertex> & vts) 00105 const {} 00106 00107 00108 private: 00109 00110 // separate tracks passing the filter 00111 // void separateTracks(vector<TransientTrack>& filtered, 00112 // vector<TransientTrack>& unused) const; 00113 00114 // find vertex candidates 00115 vector<TransientVertex> 00116 vertexCandidates(const vector<reco::TransientTrack> & tracks, 00117 vector<reco::TransientTrack>& unused) const; 00118 00119 // remove bad candidates 00120 vector<TransientVertex> 00121 clean(const vector<TransientVertex> & candidates) const; 00122 00123 // 00124 mutable TrimmedVertexFinder theClusterFinder; 00125 float theVtxFitProbCut; 00126 float theTrackCompatibilityToPV; 00127 float theTrackCompatibilityToSV; 00128 int theMaxNbOfVertices; 00129 TrimmedTrackFilter theFilter; 00130 00131 }; 00132 00133 #endif