Main Page
Namespaces
Classes
Package Documentation
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 "
Geometry/CaloGeometry/interface/CaloGeometry.h
"
7
#include "
DataFormats/EcalDetId/interface/EcalSubdetector.h
"
8
9
10
CaloTopologyBuilder::CaloTopologyBuilder
(
const
edm::ParameterSet
&
/*iConfig*/
)
11
{
12
//the following line is needed to tell the framework what
13
// data is being produced
14
15
// disable
16
// setWhatProduced( this, &CaloTopologyBuilder::produceIdeal );
17
setWhatProduced
(
this
, &
CaloTopologyBuilder::produceCalo
);
18
}
19
20
21
CaloTopologyBuilder::~CaloTopologyBuilder
()
22
{
23
}
24
25
26
//
27
// member functions
28
//
29
30
// ------------ method called to produce the data ------------
31
CaloTopologyBuilder::ReturnType
32
CaloTopologyBuilder::produceCalo
(
const
CaloTopologyRecord
& iRecord )
33
{
34
edm::ESHandle<CaloGeometry>
theGeometry ;
35
iRecord.
getRecord
<
CaloGeometryRecord
>().
get
( theGeometry ) ;
36
37
ReturnType
ct = std::make_unique<CaloTopology>();
38
//ECAL parts
39
ct->setSubdetTopology(
DetId::Ecal
,
40
EcalBarrel
,
41
std::make_unique<EcalBarrelTopology>( *theGeometry ) ) ;
42
ct->setSubdetTopology(
DetId::Ecal
,
43
EcalEndcap
,
44
std::make_unique<EcalEndcapTopology>( *theGeometry ) ) ;
45
ct->setSubdetTopology(
DetId::Ecal
,
46
EcalPreshower
,
47
std::make_unique<EcalPreshowerTopology>());
48
return
ct ;
49
}
EcalSubdetector.h
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition:
ESProducer.h:124
CaloTopologyBuilder::ReturnType
std::unique_ptr< CaloTopology > ReturnType
Definition:
CaloTopologyBuilder.h:40
CaloGeometryRecord
Definition:
CaloGeometryRecord.h:31
CaloTopologyBuilder::~CaloTopologyBuilder
~CaloTopologyBuilder() override
Definition:
CaloTopologyBuilder.cc:21
EcalPreshower
Definition:
EcalSubdetector.h:10
EcalPreshowerTopology.h
DetId::Ecal
Definition:
DetId.h:26
EcalBarrelTopology.h
edm::eventsetup::DependentRecordImplementation::getRecord
const DepRecordT getRecord() const
Definition:
DependentRecordImplementation.h:51
EcalEndcapTopology.h
edm::ESHandle< CaloGeometry >
CaloTopologyRecord
Definition:
CaloTopologyRecord.h:11
CaloTopologyBuilder::produceCalo
ReturnType produceCalo(const CaloTopologyRecord &)
Definition:
CaloTopologyBuilder.cc:32
CaloTopologyBuilder::CaloTopologyBuilder
CaloTopologyBuilder(const edm::ParameterSet &iP)
Definition:
CaloTopologyBuilder.cc:10
CaloGeometry.h
CaloTopologyBuilder.h
EcalBarrel
Definition:
EcalSubdetector.h:10
edm::ParameterSet
Definition:
ParameterSet.h:36
EcalEndcap
Definition:
EcalSubdetector.h:10
CaloSubdetectorTopology.h
Generated for CMSSW Reference Manual by
1.8.11