CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/RecoVertex/ConfigurableVertexReco/src/ConfigurableTrimmedKalmanFinder.cc

Go to the documentation of this file.
00001 #include "RecoVertex/ConfigurableVertexReco/interface/ConfigurableTrimmedKalmanFinder.h"
00002 #include "RecoVertex/TrimmedKalmanVertexFinder/interface/KalmanTrimmedVertexFinder.h"
00003 
00004 namespace {
00005   edm::ParameterSet mydefaults ()
00006   {
00007     edm::ParameterSet ret;
00008     ret.addParameter<double>("ptcut",0.);
00009     ret.addParameter<double>("trkcutpv",0.05);
00010     ret.addParameter<double>("trkcutsv",0.01);
00011     ret.addParameter<double>("vtxcut",0.01);
00012     return ret;
00013   }
00014 }
00015 
00016 ConfigurableTrimmedKalmanFinder::ConfigurableTrimmedKalmanFinder() :
00017     theRector( new KalmanTrimmedVertexFinder() )
00018 {}
00019 
00020 void ConfigurableTrimmedKalmanFinder::configure(
00021     const edm::ParameterSet & n )
00022 {
00023   if ( theRector ) delete theRector;
00024   edm::ParameterSet m=n;
00025   m.augment ( mydefaults() );
00026   KalmanTrimmedVertexFinder * tmp = new KalmanTrimmedVertexFinder();
00027   tmp->setPtCut ( m.getParameter<double>("ptcut") );
00028   tmp->setTrackCompatibilityCut ( m.getParameter<double>("trkcutpv") );
00029   tmp->setTrackCompatibilityToSV ( m.getParameter<double>("trkcutsv") );
00030   tmp->setVertexFitProbabilityCut ( m.getParameter<double>( "vtxcut" ) );
00031   theRector = tmp;
00032 }
00033 
00034 ConfigurableTrimmedKalmanFinder::~ConfigurableTrimmedKalmanFinder()
00035 {
00036   if ( theRector ) delete theRector;
00037 }
00038 
00039 ConfigurableTrimmedKalmanFinder::ConfigurableTrimmedKalmanFinder 
00040     ( const ConfigurableTrimmedKalmanFinder & o ) :
00041   theRector ( o.theRector->clone() )
00042 {}
00043 
00044 
00045 ConfigurableTrimmedKalmanFinder * ConfigurableTrimmedKalmanFinder::clone() const
00046 {
00047   return new ConfigurableTrimmedKalmanFinder ( *this );
00048 }
00049 
00050 std::vector < TransientVertex > ConfigurableTrimmedKalmanFinder::vertices ( 
00051     const std::vector < reco::TransientTrack > & t,
00052     const reco::BeamSpot & s ) const
00053 {
00054   return theRector->vertices ( t, s );
00055 }
00056 
00057 std::vector < TransientVertex > ConfigurableTrimmedKalmanFinder::vertices ( 
00058     const std::vector < reco::TransientTrack > & prims,
00059     const std::vector < reco::TransientTrack > & secs,
00060     const reco::BeamSpot & s ) const
00061 {
00062   return theRector->vertices ( prims, secs, s );
00063 }
00064 
00065 std::vector < TransientVertex > ConfigurableTrimmedKalmanFinder::vertices ( 
00066     const std::vector < reco::TransientTrack > & t ) const
00067 {
00068   return theRector->vertices ( t );
00069 }
00070 
00071 edm::ParameterSet ConfigurableTrimmedKalmanFinder::defaults() const
00072 {
00073   return mydefaults();
00074 }
00075 
00076 #include "RecoVertex/ConfigurableVertexReco/interface/ConfRecoBuilder.h"
00077 
00078 namespace {
00079   ConfRecoBuilder < ConfigurableTrimmedKalmanFinder > t ( "tkf", "Trimmed Kalman Vertex Finder" );
00080 }