RecoTracker
GeometryESProducer
plugins
TrackerMTDRecoGeometryESProducer.cc
Go to the documentation of this file.
1
#include "
Geometry/TrackerNumberingBuilder/interface/GeometricDet.h
"
2
#include "
Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h
"
3
#include "
Geometry/Records/interface/TrackerDigiGeometryRecord.h
"
4
#include "
RecoTracker/Record/interface/TrackerRecoGeometryRecord.h
"
5
#include "
RecoTracker/TkDetLayers/interface/GeometricSearchTrackerBuilder.h
"
6
#include "
DataFormats/TrackerCommon/interface/TrackerTopology.h
"
7
#include "
Geometry/Records/interface/TrackerTopologyRcd.h
"
8
#include "
Geometry/MTDGeometryBuilder/interface/MTDGeometry.h
"
9
#include "
Geometry/MTDNumberingBuilder/interface/MTDTopology.h
"
10
#include "
Geometry/Records/interface/MTDTopologyRcd.h
"
11
#include "
Geometry/Records/interface/MTDDigiGeometryRecord.h
"
12
13
#include "
FWCore/Framework/interface/EventSetup.h
"
14
#include "
FWCore/Framework/interface/ESHandle.h
"
15
#include "
FWCore/Framework/interface/ModuleFactory.h
"
16
#include "
FWCore/Framework/interface/ESProducer.h
"
17
#include "
FWCore/ParameterSet/interface/ConfigurationDescriptions.h
"
18
#include "
FWCore/ParameterSet/interface/ParameterSetDescription.h
"
19
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
20
21
#include <memory>
22
#include <string>
23
24
class
TrackerMTDRecoGeometryESProducer
:
public
edm::ESProducer
{
25
public
:
26
TrackerMTDRecoGeometryESProducer
(
const
edm::ParameterSet
&
p
);
27
28
std::unique_ptr<GeometricSearchTracker>
produce
(
const
TrackerRecoGeometryRecord
&);
29
30
static
void
fillDescriptions
(
edm::ConfigurationDescriptions
&descriptions);
31
32
private
:
33
edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord>
geomToken_
;
34
edm::ESGetToken<TrackerTopology, TrackerTopologyRcd>
tTopToken_
;
35
edm::ESGetToken<MTDGeometry, MTDDigiGeometryRecord>
mtdgeomToken_
;
36
edm::ESGetToken<MTDTopology, MTDTopologyRcd>
mtdTopToken_
;
37
bool
usePhase2Stacks_
;
38
};
39
40
using namespace
edm
;
41
42
TrackerMTDRecoGeometryESProducer::TrackerMTDRecoGeometryESProducer
(
const
edm::ParameterSet
&
p
)
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
57
GeometricSearchTrackerBuilder
builder;
58
return
std::unique_ptr<GeometricSearchTracker>(
59
builder.
build
(tG.
trackerDet
(), &tG, &iRecord.
get
(
tTopToken_
), &mG, &iRecord.
get
(
mtdTopToken_
),
usePhase2Stacks_
));
60
}
61
62
void
TrackerMTDRecoGeometryESProducer::fillDescriptions
(
edm::ConfigurationDescriptions
&descriptions) {
63
edm::ParameterSetDescription
desc
;
64
65
desc
.add<
bool
>(
"usePhase2Stacks"
,
false
);
66
desc
.addUntracked<
std::string
>(
"trackerGeometryLabel"
,
""
);
67
descriptions.
addDefault
(
desc
);
68
}
69
70
DEFINE_FWK_EVENTSETUP_MODULE
(
TrackerMTDRecoGeometryESProducer
);
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
Generated for CMSSW Reference Manual by
1.8.16