Geometry
CaloEventSetup
plugins
CaloTopologyBuilder.cc
Go to the documentation of this file.
1
#include "
Geometry/CaloEventSetup/plugins/CaloTopologyBuilder.h
"
2
#include "
Geometry/CaloTopology/interface/CaloSubdetectorTopology.h
"
3
#include "
Geometry/CaloTopology/interface/EcalBarrelTopology.h
"
4
#include "
Geometry/CaloTopology/interface/EcalEndcapTopology.h
"
5
#include "
Geometry/CaloTopology/interface/EcalPreshowerTopology.h
"
6
#include "
DataFormats/EcalDetId/interface/EcalSubdetector.h
"
7
8
CaloTopologyBuilder::CaloTopologyBuilder
(
const
edm::ParameterSet
&
/*iConfig*/
)
9
: geometryToken_{
setWhatProduced
(
this
, &
CaloTopologyBuilder::produceCalo
)
10
.consumesFrom<
CaloGeometry
,
CaloGeometryRecord
>(
edm::ESInputTag
{})} {}
11
12
CaloTopologyBuilder::~CaloTopologyBuilder
() {}
13
14
//
15
// member functions
16
//
17
18
// ------------ method called to produce the data ------------
19
CaloTopologyBuilder::ReturnType
CaloTopologyBuilder::produceCalo
(
const
CaloTopologyRecord
& iRecord) {
20
const
auto
&
geometry
= iRecord.
get
(
geometryToken_
);
21
22
ReturnType
ct = std::make_unique<CaloTopology>();
23
//ECAL parts
24
ct->setSubdetTopology(
DetId::Ecal
,
EcalBarrel
, std::make_unique<EcalBarrelTopology>(
geometry
));
25
ct->setSubdetTopology(
DetId::Ecal
,
EcalEndcap
, std::make_unique<EcalEndcapTopology>(
geometry
));
26
ct->setSubdetTopology(
DetId::Ecal
,
EcalPreshower
, std::make_unique<EcalPreshowerTopology>());
27
return
ct;
28
}
EcalPreshowerTopology.h
edm::ESInputTag
Definition:
ESInputTag.h:87
CaloTopologyBuilder::CaloTopologyBuilder
CaloTopologyBuilder(const edm::ParameterSet &iP)
Definition:
CaloTopologyBuilder.cc:8
CaloTopologyBuilder::geometryToken_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geometryToken_
Definition:
CaloTopologyBuilder.h:45
CaloGeometryRecord
Definition:
CaloGeometryRecord.h:30
geometry
Definition:
geometry.py:1
CaloTopologyBuilder::~CaloTopologyBuilder
~CaloTopologyBuilder() override
Definition:
CaloTopologyBuilder.cc:12
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition:
ESProducer.h:163
EcalBarrelTopology.h
CaloTopologyRecord
Definition:
CaloTopologyRecord.h:10
EcalBarrel
Definition:
EcalSubdetector.h:10
CaloGeometry
Definition:
CaloGeometry.h:21
CaloTopologyBuilder::produceCalo
ReturnType produceCalo(const CaloTopologyRecord &)
Definition:
CaloTopologyBuilder.cc:19
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition:
DependentRecordImplementation.h:103
EcalSubdetector.h
EcalEndcap
Definition:
EcalSubdetector.h:10
edm::ParameterSet
Definition:
ParameterSet.h:47
EcalEndcapTopology.h
CaloTopologyBuilder.h
CaloTopologyBuilder::ReturnType
std::unique_ptr< CaloTopology > ReturnType
Definition:
CaloTopologyBuilder.h:39
DetId::Ecal
Definition:
DetId.h:27
EcalPreshower
Definition:
EcalSubdetector.h:10
CaloSubdetectorTopology.h
Generated for CMSSW Reference Manual by
1.8.16