CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GsfTrajectorySmootherESProducer.cc
Go to the documentation of this file.
2 
7 
17 
18 #include <string>
19 #include <memory>
20 
22 {
23  std::string myname = p.getParameter<std::string>("ComponentName");
24  pset_ = p;
25  setWhatProduced(this,myname);
26 }
27 
29 
30 boost::shared_ptr<TrajectorySmoother>
32  //
33  // material effects
34  //
35  std::string matName = pset_.getParameter<std::string>("MaterialEffectsUpdator");
37  iRecord.getRecord<TrackingComponentsRecord>().get(matName,matProducer);
38  //
39  // propagator
40  //
41  std::string geomName = pset_.getParameter<std::string>("GeometricalPropagator");
42  edm::ESHandle<Propagator> geomProducer;
43  iRecord.getRecord<TrackingComponentsRecord>().get(geomName,geomProducer);
44  GsfPropagatorWithMaterial propagator(*geomProducer.product(),*matProducer.product());
45  //
46  // merger
47  //
48  std::string mergerName = pset_.getParameter<std::string>("Merger");
49 // edm::ESHandle<MultiTrajectoryStateMerger> mergerProducer;
50 // iRecord.get(mergerName,mergerProducer);
52  iRecord.getRecord<TrackingComponentsRecord>().get(mergerName,mergerProducer);
53  MultiTrajectoryStateMerger merger(*mergerProducer.product());
54  //
55  // estimator
56  //
57  // double chi2Cut = pset_.getParameter<double>("ChiSquarCut");
58  double chi2Cut(100.);
60  //
61  // geometry
62  std::string gname = pset_.getParameter<std::string>("RecoGeometry");
64  iRecord.getRecord<RecoGeometryRecord>().get(gname,geo);
65  // create algorithm
66  //
67  // bool matBefUpd = pset_.getParameter<bool>("MaterialBeforeUpdate");
68  double scale = pset_.getParameter<double>("ErrorRescaling");
69  return boost::shared_ptr<TrajectorySmoother>(new GsfTrajectorySmoother(propagator,
71  estimator,merger,
72 // matBefUpd,
73  scale,
74  true,//BM should this be taken from parameterSet?
75  geo.product()));
76 }
T getParameter(std::string const &) const
tuple propagator
tuple estimator
Definition: HLT_FULL_cff.py:50
GsfTrajectorySmootherESProducer(const edm::ParameterSet &p)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
boost::shared_ptr< TrajectorySmoother > produce(const TrajectoryFitterRecord &)