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 filterName = pset_.getParameter<std::string>("trajectoryFilterName");
45  std::string inOutFilterName = pset_.getParameter<std::string>("inOutTrajectoryFilterName");
46  bool useSameTrajFilter = pset_.getParameter<bool>("useSameTrajFilter");
47 
49  edm::ESHandle<Propagator> propagatorAlongHandle;
50  edm::ESHandle<Propagator> propagatorOppositeHandle;
54  edm::ESHandle<TrajectoryFilter> inOutFilterHandle;
55 
56  iRecord.getRecord<TrackingComponentsRecord>().get(updatorName,updatorHandle);
57  iRecord.getRecord<TrackingComponentsRecord>().get(propagatorAlongName,propagatorAlongHandle);
58  iRecord.getRecord<TrackingComponentsRecord>().get(propagatorOppositeName,propagatorOppositeHandle);
59  iRecord.getRecord<TrackingComponentsRecord>().get(estimatorName,estimatorHandle);
60  iRecord.getRecord<TransientRecHitRecord>().get(recHitBuilderName,recHitBuilderHandle);
61  iRecord.get(filterName, filterHandle);
62  if (useSameTrajFilter) {
63  inOutFilterHandle = filterHandle;
64  } else {
65  iRecord.get(inOutFilterName, inOutFilterHandle);
66  }
67 
68  _trajectoryBuilder =
69  boost::shared_ptr<TrajectoryBuilder>(new GroupedCkfTrajectoryBuilder(pset_,
70  updatorHandle.product(),
71  propagatorAlongHandle.product(),
72  propagatorOppositeHandle.product(),
73  estimatorHandle.product(),
74  recHitBuilderHandle.product(),
75  filterHandle.product(),
76  inOutFilterHandle.product()) );
77  return _trajectoryBuilder;
78 }
79 
80 
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