Go to the documentation of this file.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 "FWCore/ParameterSet/interface/ParameterSet.h"
00008 #include <vector>
00009
00044 class ConfigurableTrimmedVertexFinder : public VertexReconstructor {
00045
00046 public:
00047
00048 ConfigurableTrimmedVertexFinder(const VertexFitter<5> * vf,
00049 const VertexUpdator<5> * vu,
00050 const VertexTrackCompatibilityEstimator<5> * ve);
00051
00052 virtual ~ConfigurableTrimmedVertexFinder() {}
00053
00054 virtual std::vector<TransientVertex>
00055 vertices(const std::vector<reco::TransientTrack> & tracks) const;
00056
00057 virtual std::vector<TransientVertex>
00058 vertices(const std::vector<reco::TransientTrack> & tracks,
00059 const reco::BeamSpot & spot ) const;
00060
00061 std::vector<TransientVertex>
00062 vertices( const std::vector<reco::TransientTrack> & tracks,
00063 std::vector<reco::TransientTrack>& unused,
00064 const reco::BeamSpot & spot, bool use_spot ) const;
00065
00068 float ptCut() const { return theFilter.ptCut(); }
00069 const TrimmedTrackFilter & trackFilter() const {
00070 return theFilter;
00071 }
00072 float trackCompatibilityCut() const { return theTrackCompatibilityToPV; }
00073 float trackCompatibilityToSV() const { return theTrackCompatibilityToSV; }
00074 float vertexFitProbabilityCut() const { return theVtxFitProbCut; }
00075 int maxNbOfVertices() const { return theMaxNbOfVertices; }
00076
00079 void setParameters ( const edm::ParameterSet & );
00080
00081 void setPtCut(float cut) { theFilter.setPtCut(cut); }
00082 void setTrackCompatibilityCut(float cut) {
00083 theTrackCompatibilityToPV = cut;
00084 }
00085 void setTrackCompatibilityToSV(float cut) {
00086 theTrackCompatibilityToSV = cut;
00087 }
00088 void setVertexFitProbabilityCut(float cut) { theVtxFitProbCut = cut; }
00089 void setMaxNbOfVertices(int max) { theMaxNbOfVertices = max; }
00090
00093 virtual ConfigurableTrimmedVertexFinder * clone() const {
00094 return new ConfigurableTrimmedVertexFinder(*this);
00095 }
00096
00097 protected:
00098
00099 virtual void resetEvent(const std::vector<reco::TransientTrack> & tracks) const {}
00100
00101 virtual void analyseInputTracks(const std::vector<reco::TransientTrack> & tracks)
00102 const {}
00103
00104 virtual void
00105 analyseClusterFinder(const std::vector<TransientVertex> & vts,
00106 const std::vector<reco::TransientTrack> & remain)
00107 const {}
00108
00109 virtual void analyseVertexCandidates(const std::vector<TransientVertex> & vts)
00110 const {}
00111
00112 virtual void analyseFoundVertices(const std::vector<TransientVertex> & vts)
00113 const {}
00114
00115
00116 private:
00117
00118
00119
00120
00121
00122
00123 std::vector<TransientVertex>
00124 vertexCandidates(const std::vector<reco::TransientTrack> & tracks,
00125 std::vector<reco::TransientTrack>& unused,
00126 const reco::BeamSpot & spot, bool use_spot ) const;
00127
00128
00129 std::vector<TransientVertex>
00130 clean(const std::vector<TransientVertex> & candidates) const;
00131
00132
00133 mutable TrimmedVertexFinder theClusterFinder;
00134 float theVtxFitProbCut;
00135 float theTrackCompatibilityToPV;
00136 float theTrackCompatibilityToSV;
00137 int theMaxNbOfVertices;
00138 TrimmedTrackFilter theFilter;
00139
00140 };
00141
00142 #endif