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 
ConfigurationDescriptions.h
electrons_cff.bool
bool
Definition: electrons_cff.py:366
edm::ESInputTag
Definition: ESInputTag.h:87
TrackerGeometry.h
ESHandle.h
edm
HLT enums.
Definition: AlignableModifier.h:19
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
MTDGeometry.h
TrackerMTDRecoGeometryESProducer::TrackerMTDRecoGeometryESProducer
TrackerMTDRecoGeometryESProducer(const edm::ParameterSet &p)
Definition: TrackerMTDRecoGeometryESProducer.cc:42
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
ESProducer.h
TrackerMTDRecoGeometryESProducer::mtdTopToken_
edm::ESGetToken< MTDTopology, MTDTopologyRcd > mtdTopToken_
Definition: TrackerMTDRecoGeometryESProducer.cc:36
MTDDigiGeometryRecord.h
TrackerRecoGeometryRecord.h
TrackerMTDRecoGeometryESProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: TrackerMTDRecoGeometryESProducer.cc:62
TrackerRecoGeometryRecord
Definition: TrackerRecoGeometryRecord.h:14
TrackerMTDRecoGeometryESProducer
Definition: TrackerMTDRecoGeometryESProducer.cc:24
TrackerMTDRecoGeometryESProducer::usePhase2Stacks_
bool usePhase2Stacks_
Definition: TrackerMTDRecoGeometryESProducer.cc:37
TrackerTopology.h
TrackerTopologyRcd.h
GeometricSearchTrackerBuilder.h
TrackerMTDRecoGeometryESProducer::geomToken_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
Definition: TrackerMTDRecoGeometryESProducer.cc:33
ParameterSetDescription.h
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition: DependentRecordImplementation.h:109
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TrackerDigiGeometryRecord.h
TrackerMTDRecoGeometryESProducer::tTopToken_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopToken_
Definition: TrackerMTDRecoGeometryESProducer.cc:34
TrackerMTDRecoGeometryESProducer::produce
std::unique_ptr< GeometricSearchTracker > produce(const TrackerRecoGeometryRecord &)
Definition: TrackerMTDRecoGeometryESProducer.cc:52
edm::ParameterSet
Definition: ParameterSet.h:47
TrackerGeometry::trackerDet
GeometricDet const * trackerDet() const
Definition: TrackerGeometry.h:81
GeometricDet.h
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord >
GeometricSearchTrackerBuilder
Definition: GeometricSearchTrackerBuilder.h:15
GeometricSearchTrackerBuilder::build
GeometricSearchTracker * build(const GeometricDet *theGeometricTracker, const TrackerGeometry *theGeomDetGeometry, const TrackerTopology *tTopo, const bool usePhase2Stacks=false) __attribute__((cold))
Definition: GeometricSearchTrackerBuilder.cc:23
MTDGeometry
Definition: MTDGeometry.h:14
ModuleFactory.h
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
MTDTopologyRcd.h
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
EventSetup.h
edm::ESProducer
Definition: ESProducer.h:104
TrackerMTDRecoGeometryESProducer::mtdgeomToken_
edm::ESGetToken< MTDGeometry, MTDDigiGeometryRecord > mtdgeomToken_
Definition: TrackerMTDRecoGeometryESProducer.cc:35
ParameterSet.h
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
edm::ConfigurationDescriptions::addDefault
void addDefault(ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:99
MTDTopology.h
TrackerGeometry
Definition: TrackerGeometry.h:14