CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ConfigurableAdaptiveFitter.cc
Go to the documentation of this file.
6 // #include "RecoVertex/LinearizationPointFinders/interface/GenericLinearizationPointFinder.h"
7 // #include "RecoVertex/KalmanVertexFit/interface/KalmanVertexFitter.h"
8 // #include "RecoVertex/LinearizationPointFinders/interface/ZeroLinearizationPointFinder.h"
15 
16 using namespace std;
17 
18 namespace {
19  edm::ParameterSet mydefaults() {
21  ret.addParameter<string>("annealing", "geom");
22  ret.addParameter<bool>("smoothing", true);
23  ret.addParameter<double>("sigmacut", 3.0);
24  ret.addParameter<double>("Tini", 256.0);
25  ret.addParameter<double>("ratio", 0.25);
26 
27  ret.addParameter<double>("maxshift", 0.0001);
28  ret.addParameter<double>("maxlpshift", 0.1);
29  ret.addParameter<int>("maxstep", 30);
30  ret.addParameter<double>("weightthreshold", 0.001);
31  return ret;
32  }
33 } // namespace
34 
36 
39  m.augment(mydefaults());
40  ConfigurableAnnealing ann(m);
42  // ZeroLinearizationPointFinder linpt;
43  // KalmanVertexFitter kvf;
44  // GenericLinearizationPointFinder linpt ( kvf );
46  bool s = m.getParameter<bool>("smoothing");
47  VertexSmoother<5>* smoother = nullptr;
48  if (s) {
49  smoother = new KalmanVertexSmoother();
50  } else {
51  smoother = new DummyVertexSmoother<5>();
52  }
54 
55  if (theFitter)
56  delete theFitter;
57  AdaptiveVertexFitter* fitter = new AdaptiveVertexFitter(ann, linpt, updator, estimator, *smoother);
58  delete smoother;
59  fitter->setParameters(m);
60  theFitter = fitter;
61 }
62 
64  /*
65  if (theFitter) delete theFitter;
66  theFitter=0;
67  */
68 }
69 
71 
73 
75 
77 
78 namespace {
79  const ConfFitterBuilder<ConfigurableAdaptiveFitter> t("avf", "AdaptiveVertexFitter");
80 }
tuple ret
prodAgent to be discontinued
void augment(ParameterSet const &from)
edm::ParameterSet defaults() const override
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:135
void configure(const edm::ParameterSet &) override
void setParameters(double maxshift=0.0001, double maxlpshift=0.1, unsigned maxstep=30, double weightthreshold=.001)
const VertexFitter< 5 > * theFitter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
ConfigurableAdaptiveFitter * clone() const override