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/HGCalTriggerCell.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/HGCalTriggerBackendAlgorithmBase.h
"
10
#include "
L1Trigger/L1THGCal/interface/backend/HGCalTowerMap2DImpl.h
"
11
12
class
HGCalTowerMapProcessor
:
public
HGCalTowerMapProcessorBase
{
13
public
:
14
HGCalTowerMapProcessor
(
const
edm::ParameterSet
& conf) :
HGCalTowerMapProcessorBase
(conf) {
15
towermap2D_
= std::make_unique<HGCalTowerMap2DImpl>(conf.
getParameterSet
(
"towermap_parameters"
));
16
}
17
18
void
run
(
const
edm::Handle<l1t::HGCalTriggerCellBxCollection>
& collHandle,
19
l1t::HGCalTowerMapBxCollection
& collTowerMap,
20
const
edm::EventSetup
& es)
override
{
21
es.
get
<
CaloGeometryRecord
>().
get
(
""
,
triggerGeometry_
);
22
towermap2D_
->eventSetup(es);
23
24
/* create a persistent vector of pointers to the trigger-cells */
25
std::vector<edm::Ptr<l1t::HGCalTriggerCell>> triggerCellsPtrs;
26
for
(
unsigned
i
= 0;
i
< collHandle->
size
(); ++
i
) {
27
edm::Ptr<l1t::HGCalTriggerCell>
ptr(collHandle,
i
);
28
triggerCellsPtrs.push_back(ptr);
29
}
30
31
/* call to towerMap2D clustering */
32
towermap2D_
->buildTowerMap2D(triggerCellsPtrs, collTowerMap);
33
}
34
35
private
:
36
edm::ESHandle<HGCalTriggerGeometryBase>
triggerGeometry_
;
37
38
/* algorithms instances */
39
std::unique_ptr<HGCalTowerMap2DImpl>
towermap2D_
;
40
};
41
42
DEFINE_EDM_PLUGIN
(
HGCalTowerMapFactory
,
HGCalTowerMapProcessor
,
"HGCalTowerMapProcessor"
);
HGCalTowerMapProcessor::run
void run(const edm::Handle< l1t::HGCalTriggerCellBxCollection > &collHandle, l1t::HGCalTowerMapBxCollection &collTowerMap, const edm::EventSetup &es) override
Definition:
HGCalTowerMapProcessor.cc:18
mps_fire.i
i
Definition:
mps_fire.py:355
CaloGeometryRecord
Definition:
CaloGeometryRecord.h:30
HGCalTowerMapProcessor
Definition:
HGCalTowerMapProcessor.cc:12
edm::Handle
Definition:
AssociativeIterator.h:50
BXVector
Definition:
BXVector.h:15
edm::EventSetup::get
T get() const
Definition:
EventSetup.h:73
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:39
edm::ParameterSet
Definition:
ParameterSet.h:36
HGCalTower.h
edmplugin::PluginFactory
Definition:
PluginFactory.h:34
HGCalTowerMapProcessor::triggerGeometry_
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_
Definition:
HGCalTowerMapProcessor.cc:36
HGCalTriggerBackendAlgorithmBase.h
edm::EventSetup
Definition:
EventSetup.h:57
get
#define get
edm::Ptr
Definition:
AssociationVector.h:31
HGCalProcessorBase.h
HGCalTowerMapProcessor::HGCalTowerMapProcessor
HGCalTowerMapProcessor(const edm::ParameterSet &conf)
Definition:
HGCalTowerMapProcessor.cc:14
HGCalTowerMap.h
BXVector::size
unsigned size(int bx) const
HGCalTriggerCell.h
HGCalProcessorBaseT
Definition:
HGCalProcessorBaseT.h:10
edm::ParameterSet::getParameterSet
ParameterSet const & getParameterSet(std::string const &) const
Definition:
ParameterSet.cc:2121
Generated for CMSSW Reference Manual by
1.8.16