Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:29:06

0001 #include "RecoVertex/ConfigurableVertexReco/interface/ConfigurableKalmanFitter.h"
0002 #include "RecoVertex/KalmanVertexFit/interface/KalmanVertexFitter.h"
0003 
0004 namespace {
0005   edm::ParameterSet mydefaults() {
0006     edm::ParameterSet ret;
0007     ret.addParameter<double>("maxDistance", 0.01);
0008     ret.addParameter<int>("maxNbrOfIterations", 10);
0009     return ret;
0010   }
0011 }  // namespace
0012 
0013 ConfigurableKalmanFitter::ConfigurableKalmanFitter() : AbstractConfFitter(KalmanVertexFitter()) {}
0014 
0015 void ConfigurableKalmanFitter::configure(const edm::ParameterSet& n) {
0016   edm::ParameterSet m = n;
0017   m.augment(mydefaults());
0018   if (theFitter)
0019     delete theFitter;
0020   theFitter = new KalmanVertexFitter(m);
0021 }
0022 
0023 ConfigurableKalmanFitter::~ConfigurableKalmanFitter() {
0024   // if (theFitter) delete theFitter;
0025 }
0026 
0027 ConfigurableKalmanFitter::ConfigurableKalmanFitter(const ConfigurableKalmanFitter& o) : AbstractConfFitter(o) {}
0028 
0029 ConfigurableKalmanFitter* ConfigurableKalmanFitter::clone() const { return new ConfigurableKalmanFitter(*this); }
0030 
0031 edm::ParameterSet ConfigurableKalmanFitter::defaults() const { return mydefaults(); }
0032 
0033 #include "RecoVertex/ConfigurableVertexReco/interface/ConfFitterBuilder.h"
0034 
0035 namespace {
0036   const ConfFitterBuilder<ConfigurableKalmanFitter> t("kalman", "Standard Kalman Filter");
0037   const ConfFitterBuilder<ConfigurableKalmanFitter> s("default", "Standard Kalman Filter");
0038 }  // namespace