CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MuonCkfTrajectoryBuilderESProducer.cc
Go to the documentation of this file.
3 
6 //#include "FWCore/Framework/interface/ModuleFactory.h"
8 
13 //#include "TrackingTools/PatternTools/interface/MeasurementEstimator.h"
17 
20 
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 propagatorProximityName = pset_.getParameter<std::string>("propagatorProximity");
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 
48  edm::ESHandle<Propagator> propagatorAlongHandle;
49  edm::ESHandle<Propagator> propagatorOppositeHandle;
50  edm::ESHandle<Propagator> propagatorProximityHandle;
53  edm::ESHandle<MeasurementTracker> measurementTrackerHandle;
54  edm::ESHandle<TrajectoryFilter> trajectoryFilterHandle;
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(propagatorProximityName,propagatorProximityHandle);
60  iRecord.getRecord<TrackingComponentsRecord>().get(estimatorName,estimatorHandle);
61  iRecord.getRecord<TransientRecHitRecord>().get(recHitBuilderName,recHitBuilderHandle);
62  iRecord.get(measurementTrackerName, measurementTrackerHandle);
63  iRecord.get(filterName,trajectoryFilterHandle);
64 
65  _trajectoryBuilder =
66  boost::shared_ptr<TrajectoryBuilder>(new MuonCkfTrajectoryBuilder(pset_,
67  updatorHandle.product(),
68  propagatorAlongHandle.product(),
69  propagatorOppositeHandle.product(),
70  propagatorProximityHandle.product(),
71  estimatorHandle.product(),
72  recHitBuilderHandle.product(),
73  measurementTrackerHandle.product(),
74  trajectoryFilterHandle.product()) );
75  return _trajectoryBuilder;
76 }
77 
78 
T getParameter(std::string const &) const
boost::shared_ptr< TrajectoryBuilder > produce(const CkfComponentsRecord &)
MuonCkfTrajectoryBuilderESProducer(const edm::ParameterSet &p)
void get(HolderT &iHolder) const
T const * product() const
Definition: ESHandle.h:62