CMS 3D CMS Logo

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