CMS 3D CMS Logo

TrackerRecoGeometryESProducer.cc
Go to the documentation of this file.
8 
16 
17 #include <memory>
18 #include <string>
19 
21 public:
23 
24  std::unique_ptr<GeometricSearchTracker> produce(const TrackerRecoGeometryRecord &);
25 
26  static void fillDescriptions(edm::ConfigurationDescriptions &descriptions);
27 
28 private:
32 };
33 
34 using namespace edm;
35 
37  : usePhase2Stacks_(p.getParameter<bool>("usePhase2Stacks")) {
38  auto c = setWhatProduced(this);
39 
40  // 08-Oct-2007 - Patrick Janot
41  // Allow several reco geometries to be created, corresponding to the labelled
42  // TrackerDigiGeometry's - that must created beforehand. Useful to handle an
43  // aligned and a misaligned geometry in the same job.
44  // The default parameter ("") makes this change transparent to the user
45  // See FastSimulation/Configuration/data/ for examples of cfi's.
46  tTopToken_ = c.consumes();
47  geomToken_ = c.consumes(edm::ESInputTag("", p.getUntrackedParameter<std::string>("trackerGeometryLabel")));
48 }
49 
50 std::unique_ptr<GeometricSearchTracker> TrackerRecoGeometryESProducer::produce(
51  const TrackerRecoGeometryRecord &iRecord) {
52  TrackerGeometry const &tG = iRecord.get(geomToken_);
53 
55  return std::unique_ptr<GeometricSearchTracker>(
56  builder.build(tG.trackerDet(), &tG, &iRecord.get(tTopToken_), usePhase2Stacks_));
57 }
58 
61 
62  desc.add<bool>("usePhase2Stacks", false);
63  desc.addUntracked<std::string>("trackerGeometryLabel", "");
64  descriptions.addDefault(desc);
65 }
66 
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
std::unique_ptr< GeometricSearchTracker > produce(const TrackerRecoGeometryRecord &)
GeometricDet const * trackerDet() const
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
void addDefault(ParameterSetDescription const &psetDescription)
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
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
HLT enums.
TrackerRecoGeometryESProducer(const edm::ParameterSet &p)
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopToken_