CMS 3D CMS Logo

SiTrackerMultiRecHitUpdatorESProducer.cc
Go to the documentation of this file.
1 // user includes
14 
15 // system includes
16 #include <string>
17 #include <memory>
18 
20 public:
22  ~SiTrackerMultiRecHitUpdatorESProducer() override = default;
23  std::unique_ptr<SiTrackerMultiRecHitUpdator> produce(const MultiRecHitRecord&);
24 
25 private:
27  bool debug_;
28  std::vector<double> annealingProgram_;
30 
33 };
34 
35 using namespace edm;
36 
38  : myname_(p.getParameter<std::string>("ComponentName")),
39  sname_(p.getParameter<std::string>("TTRHBuilder")),
40  hitpropagator_(p.getParameter<std::string>("HitPropagator")),
41  debug_(p.getParameter<bool>("Debug")),
42  annealingProgram_(p.getParameter<std::vector<double> >("AnnealingProgram")),
43  chi2Cut1D_(p.getParameter<double>("ChiSquareCut1D")),
44  chi2Cut2D_(p.getParameter<double>("ChiSquareCut2D")) {
45  auto cc = setWhatProduced(this, myname_);
46  ttrhbToken = cc.consumes(edm::ESInputTag("", sname_));
48 }
49 
50 std::unique_ptr<SiTrackerMultiRecHitUpdator> SiTrackerMultiRecHitUpdatorESProducer::produce(
51  const MultiRecHitRecord& iRecord) {
52  const TransientTrackingRecHitBuilder* hbuilder = &iRecord.get(ttrhbToken);
53  const TrackingRecHitPropagator* hhitpropagator = &iRecord.get(ttrhpToken);
54 
55  return std::make_unique<SiTrackerMultiRecHitUpdator>(
56  hbuilder, hhitpropagator, chi2Cut1D_, chi2Cut2D_, annealingProgram_, debug_);
57 }
58 
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49
~SiTrackerMultiRecHitUpdatorESProducer() override=default
edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecord > ttrhbToken
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:61
edm::ESGetToken< TrackingRecHitPropagator, CkfComponentsRecord > ttrhpToken
HLT enums.
std::unique_ptr< SiTrackerMultiRecHitUpdator > produce(const MultiRecHitRecord &)
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const