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
};
32
33
using namespace
edm
;
34
35
TrackerRecoGeometryESProducer::TrackerRecoGeometryESProducer
(
const
edm::ParameterSet
&
p
) {
36
auto
c
= setWhatProduced(
this
);
37
38
// 08-Oct-2007 - Patrick Janot
39
// Allow several reco geometries to be created, corresponding to the labelled
40
// TrackerDigiGeometry's - that must created beforehand. Useful to handle an
41
// aligned and a misaligned geometry in the same job.
42
// The default parameter ("") makes this change transparent to the user
43
// See FastSimulation/Configuration/data/ for examples of cfi's.
44
c
.setConsumes(geomToken_,
edm::ESInputTag
(
""
,
p
.getUntrackedParameter<
std::string
>(
"trackerGeometryLabel"
)));
45
c
.setConsumes(tTopToken_);
46
}
47
48
std::unique_ptr<GeometricSearchTracker>
TrackerRecoGeometryESProducer::produce
(
49
const
TrackerRecoGeometryRecord
&iRecord) {
50
TrackerGeometry
const
&tG = iRecord.
get
(geomToken_);
51
52
GeometricSearchTrackerBuilder
builder;
53
return
std::unique_ptr<GeometricSearchTracker>(builder.
build
(tG.
trackerDet
(), &tG, &iRecord.
get
(tTopToken_)));
54
}
55
56
void
TrackerRecoGeometryESProducer::fillDescriptions
(
edm::ConfigurationDescriptions
&descriptions) {
57
edm::ParameterSetDescription
desc;
58
59
desc.
addUntracked
<
std::string
>(
"trackerGeometryLabel"
,
""
);
60
descriptions.
addDefault
(desc);
61
}
62
63
DEFINE_FWK_EVENTSETUP_MODULE
(
TrackerRecoGeometryESProducer
);
ConfigurationDescriptions.h
edm::ESInputTag
Definition:
ESInputTag.h:87
GeometricSearchTrackerBuilder::build
GeometricSearchTracker * build(const GeometricDet *theGeometricTracker, const TrackerGeometry *theGeomDetGeometry, const TrackerTopology *tTopo) __attribute__((cold))
Definition:
GeometricSearchTrackerBuilder.cc:24
TrackerGeometry.h
ESHandle.h
edm
HLT enums.
Definition:
AlignableModifier.h:19
AlCaHLTBitMon_ParallelJobs.p
p
Definition:
AlCaHLTBitMon_ParallelJobs.py:153
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
ESProducer.h
TrackerRecoGeometryRecord.h
TrackerRecoGeometryRecord
Definition:
TrackerRecoGeometryRecord.h:11
TrackerTopology.h
TrackerRecoGeometryESProducer::produce
std::unique_ptr< GeometricSearchTracker > produce(const TrackerRecoGeometryRecord &)
Definition:
TrackerRecoGeometryESProducer.cc:48
TrackerTopologyRcd.h
GeometricSearchTrackerBuilder.h
ParameterSetDescription.h
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition:
DependentRecordImplementation.h:112
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSetDescription::addUntracked
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
Definition:
ParameterSetDescription.h:100
TrackerDigiGeometryRecord.h
TrackerRecoGeometryESProducer::geomToken_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
Definition:
TrackerRecoGeometryESProducer.cc:29
edm::ParameterSet
Definition:
ParameterSet.h:36
TrackerRecoGeometryESProducer
Definition:
TrackerRecoGeometryESProducer.cc:20
TrackerRecoGeometryESProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition:
TrackerRecoGeometryESProducer.cc:56
TrackerGeometry::trackerDet
GeometricDet const * trackerDet() const
Definition:
TrackerGeometry.h:81
HltBtagPostValidation_cff.c
c
Definition:
HltBtagPostValidation_cff.py:31
GeometricDet.h
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord >
GeometricSearchTrackerBuilder
Definition:
GeometricSearchTrackerBuilder.h:14
ModuleFactory.h
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:35
edm::ESProducer
Definition:
ESProducer.h:101
ParameterSet.h
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