CMS 3D CMS Logo

GsfTrajectoryFitterESProducer.cc
Go to the documentation of this file.
2 
7 
17 
18 #include <string>
19 #include <memory>
20 
21 #include <iostream>
22 
24 {
25  std::string myname = p.getParameter<std::string>("ComponentName");
26  pset_ = p;
27  setWhatProduced(this,myname);
28 }
29 
31 
32 std::shared_ptr<TrajectoryFitter>
34  //
35  // material effects
36  //
37  std::string matName = pset_.getParameter<std::string>("MaterialEffectsUpdator");
39  iRecord.getRecord<TrackingComponentsRecord>().get(matName,matProducer);
40  //
41  // propagator
42  //
43  std::string geomName = pset_.getParameter<std::string>("GeometricalPropagator");
44  edm::ESHandle<Propagator> geomProducer;
45  iRecord.getRecord<TrackingComponentsRecord>().get(geomName,geomProducer);
46  GsfPropagatorWithMaterial propagator(*geomProducer.product(),*matProducer.product());
47  //
48  // merger
49  //
50  std::string mergerName = pset_.getParameter<std::string>("Merger");
51 // edm::ESHandle<MultiTrajectoryStateMerger> mergerProducer;
52 // iRecord.get(mergerName,mergerProducer);
54  iRecord.getRecord<TrackingComponentsRecord>().get(mergerName,mergerProducer);
55  MultiTrajectoryStateMerger merger(*mergerProducer.product());
56  //
57  // estimator
58  //
59  // double chi2Cut = pset_.getParameter<double>("ChiSquarCut");
60  double chi2Cut(100.);
62 
63  // geometry
64  std::string gname = pset_.getParameter<std::string>("RecoGeometry");
66  iRecord.getRecord<RecoGeometryRecord>().get(gname,geo);
67  //
68  // create algorithm
69  //
70  return std::shared_ptr<TrajectoryFitter>(new GsfTrajectoryFitter(propagator,
72  estimator,merger,
73  geo.product()));
74 }
T getParameter(std::string const &) const
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
GsfTrajectoryFitterESProducer(const edm::ParameterSet &p)
std::shared_ptr< TrajectoryFitter > produce(const TrajectoryFitterRecord &)