RecoTracker
GeometryESProducer
plugins
TrackerRecoGeometryESProducer.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
9
#include "
FWCore/Framework/interface/EventSetup.h
"
10
#include "
FWCore/Framework/interface/ESHandle.h
"
11
#include "
FWCore/Framework/interface/ModuleFactory.h
"
12
#include "
FWCore/Framework/interface/ESProducer.h
"
13
#include "
FWCore/ParameterSet/interface/ConfigurationDescriptions.h
"
14
#include "
FWCore/ParameterSet/interface/ParameterSetDescription.h
"
15
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
16
17
#include <memory>
18
#include <string>
19
20
class
TrackerRecoGeometryESProducer
:
public
edm::ESProducer
{
21
public
:
22
TrackerRecoGeometryESProducer
(
const
edm::ParameterSet
&
p
);
23
24
std::unique_ptr<GeometricSearchTracker>
produce
(
const
TrackerRecoGeometryRecord
&);
25
26
static
void
fillDescriptions
(
edm::ConfigurationDescriptions
&descriptions);
27
28
private
:
29
edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord>
geomToken_
;
30
edm::ESGetToken<TrackerTopology, TrackerTopologyRcd>
tTopToken_
;
31
bool
usePhase2Stacks_
;
32
};
33
34
using namespace
edm
;
35
36
TrackerRecoGeometryESProducer::TrackerRecoGeometryESProducer
(
const
edm::ParameterSet
&
p
)
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
54
GeometricSearchTrackerBuilder
builder;
55
return
std::unique_ptr<GeometricSearchTracker>(
56
builder.
build
(tG.
trackerDet
(), &tG, &iRecord.
get
(
tTopToken_
),
usePhase2Stacks_
));
57
}
58
59
void
TrackerRecoGeometryESProducer::fillDescriptions
(
edm::ConfigurationDescriptions
&descriptions) {
60
edm::ParameterSetDescription
desc
;
61
62
desc
.add<
bool
>(
"usePhase2Stacks"
,
false
);
63
desc
.addUntracked<
std::string
>(
"trackerGeometryLabel"
,
""
);
64
descriptions.
addDefault
(
desc
);
65
}
66
67
DEFINE_FWK_EVENTSETUP_MODULE
(
TrackerRecoGeometryESProducer
);
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
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
TrackerDigiGeometryRecord.h
TrackerRecoGeometryESProducer::geomToken_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
Definition:
TrackerRecoGeometryESProducer.cc:29
edm::ParameterSet
Definition:
ParameterSet.h:47
AlCaHLTBitMon_ParallelJobs.p
def p
Definition:
AlCaHLTBitMon_ParallelJobs.py:153
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
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
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:19
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:56
edm::ConfigurationDescriptions::addDefault
void addDefault(ParameterSetDescription const &psetDescription)
Definition:
ConfigurationDescriptions.cc:99
TrackerGeometry
Definition:
TrackerGeometry.h:14
Generated for CMSSW Reference Manual by
1.8.16