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 
ConfigurationDescriptions.h
TrackerRecoGeometryESProducer::usePhase2Stacks_
bool usePhase2Stacks_
Definition: TrackerRecoGeometryESProducer.cc:31
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
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
ESProducer.h
TrackerRecoGeometryRecord.h
TrackerRecoGeometryRecord
Definition: TrackerRecoGeometryRecord.h:14
TrackerTopology.h
TrackerRecoGeometryESProducer::produce
std::unique_ptr< GeometricSearchTracker > produce(const TrackerRecoGeometryRecord &)
Definition: TrackerRecoGeometryESProducer.cc:50
TrackerTopologyRcd.h
GeometricSearchTrackerBuilder.h
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
TrackerRecoGeometryESProducer::geomToken_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
Definition: TrackerRecoGeometryESProducer.cc:29
edm::ParameterSet
Definition: ParameterSet.h:47
TrackerRecoGeometryESProducer
Definition: TrackerRecoGeometryESProducer.cc:20
TrackerRecoGeometryESProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: TrackerRecoGeometryESProducer.cc:59
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
ModuleFactory.h
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
TrackerRecoGeometryESProducer::tTopToken_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopToken_
Definition: TrackerRecoGeometryESProducer.cc:30
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
EventSetup.h
TrackerRecoGeometryESProducer::TrackerRecoGeometryESProducer
TrackerRecoGeometryESProducer(const edm::ParameterSet &p)
Definition: TrackerRecoGeometryESProducer.cc:36
edm::ESProducer
Definition: ESProducer.h:104
ParameterSet.h
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
edm::ConfigurationDescriptions::addDefault
void addDefault(ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:99
TrackerGeometry
Definition: TrackerGeometry.h:14