L1Trigger
L1THGCal
plugins
backend
HGCalTowerMapProcessor.cc
Go to the documentation of this file.
1
#include "
L1Trigger/L1THGCal/interface/HGCalProcessorBase.h
"
2
3
#include "
DataFormats/L1THGCal/interface/HGCalTriggerSums.h
"
4
#include "
DataFormats/L1THGCal/interface/HGCalTowerMap.h
"
5
#include "
DataFormats/L1THGCal/interface/HGCalTower.h
"
6
7
#include "
Geometry/Records/interface/CaloGeometryRecord.h
"
8
#include "
L1Trigger/L1THGCal/interface/HGCalTriggerGeometryBase.h
"
9
#include "
L1Trigger/L1THGCal/interface/backend/HGCalTowerMap2DImpl.h
"
10
11
class
HGCalTowerMapProcessor
:
public
HGCalTowerMapProcessorBase
{
12
public
:
13
HGCalTowerMapProcessor
(
const
edm::ParameterSet
& conf) :
HGCalTowerMapProcessorBase
(conf) {
14
towermap2D_
= std::make_unique<HGCalTowerMap2DImpl>(conf.
getParameterSet
(
"towermap_parameters"
));
15
}
16
17
void
run
(
const
edm::Handle<l1t::HGCalTriggerSumsBxCollection>
& collHandle,
18
l1t::HGCalTowerMapBxCollection
& collTowerMap,
19
const
edm::EventSetup
& es)
override
{
20
es.
get
<
CaloGeometryRecord
>().
get
(
""
,
triggerGeometry_
);
21
towermap2D_
->eventSetup(es);
22
23
/* create a persistent vector of pointers to the trigger-sums */
24
std::vector<edm::Ptr<l1t::HGCalTriggerSums>> triggerSumsPtrs;
25
for
(
unsigned
i
= 0;
i
< collHandle->
size
(); ++
i
) {
26
edm::Ptr<l1t::HGCalTriggerSums>
ptr(collHandle,
i
);
27
triggerSumsPtrs.push_back(ptr);
28
}
29
30
/* call to towerMap2D clustering */
31
towermap2D_
->buildTowerMap2D(triggerSumsPtrs, collTowerMap);
32
}
33
34
private
:
35
edm::ESHandle<HGCalTriggerGeometryBase>
triggerGeometry_
;
36
37
/* algorithms instances */
38
std::unique_ptr<HGCalTowerMap2DImpl>
towermap2D_
;
39
};
40
41
DEFINE_EDM_PLUGIN
(
HGCalTowerMapFactory
,
HGCalTowerMapProcessor
,
"HGCalTowerMapProcessor"
);
mps_fire.i
i
Definition:
mps_fire.py:428
CaloGeometryRecord
Definition:
CaloGeometryRecord.h:30
HGCalTowerMapProcessor
Definition:
HGCalTowerMapProcessor.cc:11
HGCalTriggerSums.h
edm::Handle
Definition:
AssociativeIterator.h:50
BXVector
Definition:
BXVector.h:15
HGCalTowerMapProcessor::run
void run(const edm::Handle< l1t::HGCalTriggerSumsBxCollection > &collHandle, l1t::HGCalTowerMapBxCollection &collTowerMap, const edm::EventSetup &es) override
Definition:
HGCalTowerMapProcessor.cc:17
edm::EventSetup::get
T get() const
Definition:
EventSetup.h:87
HGCalTriggerGeometryBase.h
edm::ESHandle< HGCalTriggerGeometryBase >
HGCalTowerMap2DImpl.h
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition:
PluginFactory.h:124
CaloGeometryRecord.h
HGCalTowerMapProcessor::towermap2D_
std::unique_ptr< HGCalTowerMap2DImpl > towermap2D_
Definition:
HGCalTowerMapProcessor.cc:38
edm::ParameterSet
Definition:
ParameterSet.h:47
HGCalTower.h
edmplugin::PluginFactory
Definition:
PluginFactory.h:34
HGCalTowerMapProcessor::triggerGeometry_
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_
Definition:
HGCalTowerMapProcessor.cc:35
edm::EventSetup
Definition:
EventSetup.h:58
get
#define get
edm::Ptr
Definition:
AssociationVector.h:31
HGCalProcessorBase.h
HGCalTowerMapProcessor::HGCalTowerMapProcessor
HGCalTowerMapProcessor(const edm::ParameterSet &conf)
Definition:
HGCalTowerMapProcessor.cc:13
HGCalTowerMap.h
BXVector::size
unsigned size(int bx) const
HGCalProcessorBaseT
Definition:
HGCalProcessorBaseT.h:10
edm::ParameterSet::getParameterSet
ParameterSet const & getParameterSet(std::string const &) const
Definition:
ParameterSet.cc:2128
Generated for CMSSW Reference Manual by
1.8.16