19 template<
typename FECODEC,
typename DATA>
84 template<
typename FECODEC,
typename DATA>
90 calibration_.eventSetup(es);
91 towermap2D_.eventSetup(es);
93 for(
const auto& digi : coll ){
100 digi.decode(codec_, data);
102 for(
const auto& triggercell : data.payload)
105 if( triggercell.hwPt() > 0 )
108 calibration_.calibrateInGeV( calibratedtriggercell);
109 trgcell_product_->push_back( 0, calibratedtriggercell );
122 triggerCellsHandle = evt.
put(
std::move( trgcell_product_ ),
"calibratedTriggerCellsTower");
125 std::vector<edm::Ptr<l1t::HGCalTriggerCell>> triggerCellsPtrs;
126 for(
unsigned i = 0;
i < triggerCellsHandle->
size(); ++
i ) {
128 triggerCellsPtrs.push_back(ptr);
132 towermap2D_.buildTowerMap2D( triggerCellsPtrs, *towermap_product_);
135 towerMapsHandle = evt.
put(
std::move( towermap_product_ ),
"towerMap");
138 std::vector<edm::Ptr<l1t::HGCalTowerMap>> towerMapsPtrs;
139 for(
unsigned i = 0;
i < towerMapsHandle->
size(); ++
i ) {
141 towerMapsPtrs.push_back(ptr);
145 towermap3D_.buildTowerMap3D( towerMapsPtrs, *tower_product_);
148 towersHandle = evt.
put(
std::move( tower_product_ ),
"tower");
158 "HGCTowerAlgoBestChoice");
162 "HGCTowerAlgoThreshold");
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
std::unique_ptr< l1t::HGCalTowerMapBxCollection > towermap_product_
unsigned size(int bx) const
BXVector< HGCalTriggerCell > HGCalTriggerCellBxCollection
std::unique_ptr< l1t::HGCalTriggerCellBxCollection > trgcell_product_
ParameterSet const & getParameterSet(ParameterSetID const &id)
BXVector< HGCalTowerMap > HGCalTowerMapBxCollection
BXVector< HGCalTower > HGCalTowerBxCollection
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_
HGCTowerAlgo< HGCalTriggerCellBestChoiceCodec, HGCalTriggerCellBestChoiceCodec::data_type > HGCTowerAlgoBestChoice
HGCalTriggerCellCalibration calibration_
HGCTowerAlgo< HGCalTriggerCellThresholdCodec, HGCalTriggerCellThresholdCodec::data_type > HGCTowerAlgoThreshold
void putInEvent(edm::Event &evt) final
HGCalTowerMap2DImpl towermap2D_
std::unique_ptr< l1t::HGCalTowerBxCollection > tower_product_
void run(const l1t::HGCFETriggerDigiCollection &coll, const edm::EventSetup &es, edm::Event &evt) final
HGCTowerAlgo(const edm::ParameterSet &conf, edm::ConsumesCollector &cc)
HGCalTowerMap3DImpl towermap3D_
char data[epos_bytes_allocation]
#define DEFINE_EDM_PLUGIN(factory, type, name)
void setProduces(edm::stream::EDProducer<> &prod) const final