RecoMTD
DetLayers
plugins
MTDDetLayerGeometryESProducer.cc
Go to the documentation of this file.
1
9
#include "
FWCore/Framework/interface/ESProducer.h
"
10
#include "
FWCore/Framework/interface/ModuleFactory.h
"
11
#include "
FWCore/Framework/interface/EventSetup.h
"
12
#include "
FWCore/Framework/interface/ESHandle.h
"
13
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
14
15
#include "
RecoMTD/Records/interface/MTDRecoGeometryRecord.h
"
16
#include "
Geometry/Records/interface/MTDDigiGeometryRecord.h
"
17
#include "
Geometry/MTDGeometryBuilder/interface/MTDGeometry.h
"
18
#include "
Geometry/Records/interface/MTDTopologyRcd.h
"
19
#include "
Geometry/MTDNumberingBuilder/interface/MTDTopology.h
"
20
21
#include "
RecoMTD/DetLayers/interface/ETLDetLayerGeometryBuilder.h
"
22
#include "
RecoMTD/DetLayers/interface/BTLDetLayerGeometryBuilder.h
"
23
#include "
RecoMTD/DetLayers/interface/MTDDetLayerGeometry.h
"
24
25
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
26
27
#include <memory>
28
#include <iostream>
29
30
class
MTDDetLayerGeometryESProducer
:
public
edm::ESProducer
{
31
public
:
33
MTDDetLayerGeometryESProducer
(
const
edm::ParameterSet
&
p
);
34
36
std::unique_ptr<MTDDetLayerGeometry>
produce
(
const
MTDRecoGeometryRecord
&
record
);
37
38
static
void
fillDescriptions
(
edm::ConfigurationDescriptions
&);
39
40
private
:
41
edm::ESGetToken<MTDGeometry, MTDDigiGeometryRecord>
geomToken_
;
42
edm::ESGetToken<MTDTopology, MTDTopologyRcd>
mtdtopoToken_
;
43
};
44
45
using namespace
edm
;
46
47
MTDDetLayerGeometryESProducer::MTDDetLayerGeometryESProducer
(
const
edm::ParameterSet
&
p
) {
48
auto
cc
= setWhatProduced(
this
);
49
geomToken_ =
cc
.consumes();
50
mtdtopoToken_ =
cc
.consumes();
51
}
52
53
std::unique_ptr<MTDDetLayerGeometry>
MTDDetLayerGeometryESProducer::produce
(
const
MTDRecoGeometryRecord
&
record
) {
54
auto
mtdDetLayerGeometry
= std::make_unique<MTDDetLayerGeometry>();
55
auto
mtd
=
record
.getHandle(geomToken_);
56
auto
mtdtopo =
record
.getHandle(mtdtopoToken_);
57
58
//The BTL and ETL builders are now called internally by the MTDDetLayerGeometry.
59
//This allows external plugings to use and build the object.
60
mtdDetLayerGeometry
->buildLayers(&(*
mtd
), &(*mtdtopo));
61
62
// Sort layers properly
63
mtdDetLayerGeometry
->sortLayers();
64
65
return
mtdDetLayerGeometry
;
66
}
67
68
void
MTDDetLayerGeometryESProducer::fillDescriptions
(
edm::ConfigurationDescriptions
&
desc
) {
69
edm::ParameterSetDescription
ps;
70
desc
.addDefault(ps);
71
}
72
73
DEFINE_FWK_EVENTSETUP_MODULE
(
MTDDetLayerGeometryESProducer
);
MessageLogger.h
ESHandle.h
edm
HLT enums.
Definition:
AlignableModifier.h:19
AlCaHLTBitMon_ParallelJobs.p
p
Definition:
AlCaHLTBitMon_ParallelJobs.py:153
MTDDetLayerGeometryESProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &)
Definition:
MTDDetLayerGeometryESProducer.cc:68
MTDGeometry.h
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
ESProducer.h
GlobalPosition_Frontier_DevDB_cff.record
record
Definition:
GlobalPosition_Frontier_DevDB_cff.py:10
MTDDigiGeometryRecord.h
cc
ETLDetLayerGeometryBuilder.h
MTDDetLayerGeometryESProducer
Definition:
MTDDetLayerGeometryESProducer.cc:30
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
MTDDetLayerGeometryESProducer::MTDDetLayerGeometryESProducer
MTDDetLayerGeometryESProducer(const edm::ParameterSet &p)
Constructor.
Definition:
MTDDetLayerGeometryESProducer.cc:47
edm::ParameterSet
Definition:
ParameterSet.h:47
MTDDetLayerGeometryESProducer::produce
std::unique_ptr< MTDDetLayerGeometry > produce(const MTDRecoGeometryRecord &record)
Produce MuonDeLayerGeometry.
Definition:
MTDDetLayerGeometryESProducer.cc:53
MTDDetLayerGeometryESProducer::geomToken_
edm::ESGetToken< MTDGeometry, MTDDigiGeometryRecord > geomToken_
Definition:
MTDDetLayerGeometryESProducer.cc:41
MTDRecoGeometryRecord.h
edm::ESGetToken< MTDGeometry, MTDDigiGeometryRecord >
MTDRecoGeometryRecord
Definition:
MTDRecoGeometryRecord.h:18
ModuleFactory.h
submitPVResolutionJobs.desc
string desc
Definition:
submitPVResolutionJobs.py:251
MTDDetLayerGeometry.h
MTDTopologyRcd.h
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition:
ModuleFactory.h:60
mtdDetLayerGeometry_cfi.mtdDetLayerGeometry
mtdDetLayerGeometry
Definition:
mtdDetLayerGeometry_cfi.py:6
BTLDetLayerGeometryBuilder.h
MTDDetLayerGeometryESProducer::mtdtopoToken_
edm::ESGetToken< MTDTopology, MTDTopologyRcd > mtdtopoToken_
Definition:
MTDDetLayerGeometryESProducer.cc:42
EventSetup.h
edm::ESProducer
Definition:
ESProducer.h:104
ParameterSet.h
mtd_digitizer
Definition:
MTDDigitizer.h:34
MTDTopology.h
Generated for CMSSW Reference Manual by
1.8.16