CMS 3D CMS Logo

MultiRecHitCollectorESProducer.cc
Go to the documentation of this file.
4 
12 
17 
18 #include <string>
19 #include <memory>
20 
21 using namespace edm;
22 
24  std::string myname = iConfig.getParameter<std::string>("ComponentName");
25  setConf(iConfig);
26  setWhatProduced(this, myname);
27 }
28 
30 
31 std::unique_ptr<MultiRecHitCollector> MultiRecHitCollectorESProducer::produce(const MultiRecHitRecord& iRecord) {
32  std::string mode = "Grouped";
33  if (conf_.getParameter<std::string>("Mode") == "Simple")
34  mode = "Simple";
35 
36  std::string mrhupdator = conf_.getParameter<std::string>("MultiRecHitUpdator");
37  std::string propagatorAlongName = conf_.getParameter<std::string>("propagatorAlong");
38  std::string estimatorName = conf_.getParameter<std::string>("estimator");
39  std::string measurementTrackerName = conf_.getParameter<std::string>("MeasurementTrackerName");
40  bool debug = conf_.getParameter<bool>("Debug");
41 
43  iRecord.get(mrhupdator, mrhuhandle);
44  ESHandle<Propagator> propagatorhandle;
45  iRecord.getRecord<CkfComponentsRecord>().getRecord<TrackingComponentsRecord>().get(propagatorAlongName,
46  propagatorhandle);
48  iRecord.getRecord<CkfComponentsRecord>().getRecord<TrackingComponentsRecord>().get(estimatorName, estimatorhandle);
49  ESHandle<MeasurementTracker> measurementhandle;
50  iRecord.getRecord<CkfComponentsRecord>().get(measurementTrackerName, measurementhandle);
51  ESHandle<TrackerTopology> trackerTopologyHandle;
52  iRecord.getRecord<CkfComponentsRecord>().getRecord<TrackerTopologyRcd>().get(trackerTopologyHandle);
53 
54  if (mode == "Grouped") {
55  std::string propagatorOppositeName = conf_.getParameter<std::string>("propagatorOpposite");
56  ESHandle<Propagator> propagatorOppositehandle;
57  iRecord.getRecord<CkfComponentsRecord>().getRecord<TrackingComponentsRecord>().get(propagatorOppositeName,
58  propagatorOppositehandle);
59  return std::make_unique<GroupedDAFHitCollector>(measurementhandle.product(),
60  mrhuhandle.product(),
61  estimatorhandle.product(),
62  propagatorhandle.product(),
63  propagatorOppositehandle.product(),
64  debug);
65  } else {
66  return std::make_unique<SimpleDAFHitCollector>(trackerTopologyHandle.product(),
67  measurementhandle.product(),
68  mrhuhandle.product(),
69  estimatorhandle.product(),
70  propagatorhandle.product(),
71  debug);
72  }
73 }
edm::eventsetup::DependentRecordImplementation::getRecord
const DepRecordT getRecord() const
Definition: DependentRecordImplementation.h:50
Chi2MeasurementEstimatorBase.h
Propagator.h
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
MultiRecHitRecord
Definition: MultiRecHitRecord.h:12
MessageLogger.h
ESHandle.h
edm
HLT enums.
Definition: AlignableModifier.h:19
ALCARECOPromptCalibProdSiPixelAli0T_cff.mode
mode
Definition: ALCARECOPromptCalibProdSiPixelAli0T_cff.py:96
ESProducer.h
HLT_FULL_cff.measurementTrackerName
measurementTrackerName
Definition: HLT_FULL_cff.py:10318
MakerMacros.h
debug
#define debug
Definition: HDRShower.cc:19
CkfComponentsRecord
Definition: CkfComponentsRecord.h:22
MultiRecHitCollectorESProducer.h
MultiRecHitCollectorESProducer::produce
std::unique_ptr< MultiRecHitCollector > produce(const MultiRecHitRecord &)
Definition: MultiRecHitCollectorESProducer.cc:31
GroupedDAFHitCollector.h
edm::ESHandle
Definition: DTSurvey.h:22
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition: DependentRecordImplementation.h:109
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:47
edm::get
T const & get(Event const &event, InputTag const &tag) noexcept(false)
Definition: Event.h:675
ModuleFactory.h
SimpleDAFHitCollector.h
Frameworkfwd.h
EventSetup.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
MultiRecHitCollectorESProducer::~MultiRecHitCollectorESProducer
~MultiRecHitCollectorESProducer() override
Definition: MultiRecHitCollectorESProducer.cc:29
SiTrackerMultiRecHitUpdator.h
MultiRecHitCollectorESProducer::MultiRecHitCollectorESProducer
MultiRecHitCollectorESProducer(const edm::ParameterSet &iConfig)
Definition: MultiRecHitCollectorESProducer.cc:23
MeasurementTracker.h