CMS 3D CMS Logo

TrackerMTDRecoGeometryESProducer.cc
Go to the documentation of this file.
12 
20 
21 #include <memory>
22 #include <string>
23 
25 public:
27 
28  std::unique_ptr<GeometricSearchTracker> produce(const TrackerRecoGeometryRecord &);
29 
30  static void fillDescriptions(edm::ConfigurationDescriptions &descriptions);
31 
32 private:
38 };
39 
40 using namespace edm;
41 
43  : usePhase2Stacks_(p.getParameter<bool>("usePhase2Stacks")) {
44  auto c = setWhatProduced(this);
45 
46  tTopToken_ = c.consumes();
47  geomToken_ = c.consumes(edm::ESInputTag("", p.getUntrackedParameter<std::string>("trackerGeometryLabel")));
48  mtdgeomToken_ = c.consumes();
49  mtdTopToken_ = c.consumes();
50 }
51 
52 std::unique_ptr<GeometricSearchTracker> TrackerMTDRecoGeometryESProducer::produce(
53  const TrackerRecoGeometryRecord &iRecord) {
54  TrackerGeometry const &tG = iRecord.get(geomToken_);
55  MTDGeometry const &mG = iRecord.get(mtdgeomToken_);
56 
58  return std::unique_ptr<GeometricSearchTracker>(
59  builder.build(tG.trackerDet(), &tG, &iRecord.get(tTopToken_), &mG, &iRecord.get(mtdTopToken_), usePhase2Stacks_));
60 }
61 
64 
65  desc.add<bool>("usePhase2Stacks", false);
66  desc.addUntracked<std::string>("trackerGeometryLabel", "");
67  descriptions.addDefault(desc);
68 }
69 
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
std::unique_ptr< GeometricSearchTracker > produce(const TrackerRecoGeometryRecord &)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::ESGetToken< MTDTopology, MTDTopologyRcd > mtdTopToken_
GeometricDet const * trackerDet() const
void addDefault(ParameterSetDescription const &psetDescription)
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopToken_
TrackerMTDRecoGeometryESProducer(const edm::ParameterSet &p)
GeometricSearchTracker * build(const GeometricDet *theGeometricTracker, const TrackerGeometry *theGeomDetGeometry, const TrackerTopology *tTopo, const bool usePhase2Stacks=false) __attribute__((cold))
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:61
edm::ESGetToken< MTDGeometry, MTDDigiGeometryRecord > mtdgeomToken_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
HLT enums.
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const