00001 #include "RecoVertex/ConfigurableVertexReco/interface/ConfigurableKalmanFitter.h" 00002 #include "RecoVertex/KalmanVertexFit/interface/KalmanVertexFitter.h" 00003 00004 namespace { 00005 edm::ParameterSet mydefaults() 00006 { 00007 edm::ParameterSet ret; 00008 ret.addParameter<double>("maxDistance",0.01); 00009 ret.addParameter<int>("maxNbrOfIterations",10); 00010 return ret; 00011 } 00012 } 00013 00014 ConfigurableKalmanFitter::ConfigurableKalmanFitter() : 00015 AbstractConfFitter ( KalmanVertexFitter() ) 00016 {} 00017 00018 void ConfigurableKalmanFitter::configure( 00019 const edm::ParameterSet & n ) 00020 { 00021 edm::ParameterSet m=n; 00022 m.augment ( mydefaults() ); 00023 if (theFitter ) delete theFitter; 00024 theFitter = new KalmanVertexFitter( m ) ; 00025 } 00026 00027 ConfigurableKalmanFitter::~ConfigurableKalmanFitter() 00028 { 00029 // if (theFitter) delete theFitter; 00030 } 00031 00032 ConfigurableKalmanFitter::ConfigurableKalmanFitter 00033 ( const ConfigurableKalmanFitter & o ) : 00034 AbstractConfFitter ( o ) 00035 {} 00036 00037 00038 ConfigurableKalmanFitter * ConfigurableKalmanFitter::clone() const 00039 { 00040 return new ConfigurableKalmanFitter ( *this ); 00041 } 00042 00043 edm::ParameterSet ConfigurableKalmanFitter::defaults() const 00044 { 00045 return mydefaults(); 00046 } 00047 00048 #include "RecoVertex/ConfigurableVertexReco/interface/ConfFitterBuilder.h" 00049 00050 namespace { 00051 ConfFitterBuilder < ConfigurableKalmanFitter > t ( "kalman", "Standard Kalman Filter" ); 00052 ConfFitterBuilder < ConfigurableKalmanFitter > s ( "default", "Standard Kalman Filter" ); 00053 }