CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CkfTrajectoryBuilderESProducer.cc
Go to the documentation of this file.
3 
8 
15 
19 
21 #include <string>
22 #include <memory>
23 
24 using namespace edm;
25 
27 {
28  std::string myName = p.getParameter<std::string>("ComponentName");
29  pset_ = p;
30  setWhatProduced(this,myName);
31 }
32 
34 
35 boost::shared_ptr<TrajectoryBuilder>
37 {
38  std::string updatorName = pset_.getParameter<std::string>("updator");
39  std::string propagatorAlongName = pset_.getParameter<std::string>("propagatorAlong");
40  std::string propagatorOppositeName = pset_.getParameter<std::string>("propagatorOpposite");
41  std::string estimatorName = pset_.getParameter<std::string>("estimator");
42  std::string recHitBuilderName = pset_.getParameter<std::string>("TTRHBuilder");
43  std::string measurementTrackerName = pset_.getParameter<std::string>("MeasurementTrackerName");
44  std::string filterName = pset_.getParameter<std::string>("trajectoryFilterName");
45 
46 
48  edm::ESHandle<Propagator> propagatorAlongHandle;
49  edm::ESHandle<Propagator> propagatorOppositeHandle;
52  edm::ESHandle<MeasurementTracker> measurementTrackerHandle;
54 
55  iRecord.getRecord<TrackingComponentsRecord>().get(updatorName,updatorHandle);
56  iRecord.getRecord<TrackingComponentsRecord>().get(propagatorAlongName,propagatorAlongHandle);
57  iRecord.getRecord<TrackingComponentsRecord>().get(propagatorOppositeName,propagatorOppositeHandle);
58  iRecord.getRecord<TrackingComponentsRecord>().get(estimatorName,estimatorHandle);
59  iRecord.getRecord<TransientRecHitRecord>().get(recHitBuilderName,recHitBuilderHandle);
60  iRecord.get(measurementTrackerName, measurementTrackerHandle);
61  iRecord.get(filterName, filterHandle);
62 
63  _trajectoryBuilder =
64  boost::shared_ptr<TrajectoryBuilder>(new CkfTrajectoryBuilder(pset_,
65  updatorHandle.product(),
66  propagatorAlongHandle.product(),
67  propagatorOppositeHandle.product(),
68  estimatorHandle.product(),
69  recHitBuilderHandle.product(),
70  measurementTrackerHandle.product(),
71  filterHandle.product()) );
72  return _trajectoryBuilder;
73 }
74 
75 
T getParameter(std::string const &) const
boost::shared_ptr< TrajectoryBuilder > produce(const CkfComponentsRecord &)
void get(HolderT &iHolder) const
CkfTrajectoryBuilderESProducer(const edm::ParameterSet &p)
T const * product() const
Definition: ESHandle.h:62