CMS 3D CMS Logo

HGCalBackendLayer1Processor.cc
Go to the documentation of this file.
2 
4 
7  clusteringDummy_ = std::make_unique<HGCalClusteringDummyImpl>(conf.getParameterSet("C2d_parameters"));
8  truncation_ = std::make_unique<HGCalStage1TruncationImpl>(conf.getParameterSet("truncation_parameters"));
9 }
10 
12  l1t::HGCalClusterBxCollection& collCluster2D) {
13  if (clusteringDummy_)
14  clusteringDummy_->setGeometry(geometry());
15  if (truncation_)
16  truncation_->setGeometry(geometry());
17 
18  std::unordered_map<uint32_t, std::vector<edm::Ptr<l1t::HGCalTriggerCell>>> tcs_per_fpga;
19 
20  for (unsigned i = 0; i < collHandle->size(); ++i) {
21  edm::Ptr<l1t::HGCalTriggerCell> tc_ptr(collHandle, i);
22  uint32_t module = geometry()->getModuleFromTriggerCell(tc_ptr->detId());
23  uint32_t fpga = geometry()->getStage1FpgaFromModule(module);
24  tcs_per_fpga[fpga].push_back(tc_ptr);
25  }
26 
27  std::vector<edm::Ptr<l1t::HGCalTriggerCell>> truncated_tcs;
28  for (auto& fpga_tcs : tcs_per_fpga) {
29  truncation_->run(fpga_tcs.first, fpga_tcs.second, truncated_tcs);
30  }
31  clusteringDummy_->clusterizeDummy(truncated_tcs, collCluster2D);
32 }
HGCalBackendLayer1Processor(const edm::ParameterSet &conf)
virtual unsigned getStage1FpgaFromModule(const unsigned module_id) const =0
ParameterSet const & getParameterSet(std::string const &) const
void run(const edm::Handle< l1t::HGCalTriggerCellBxCollection > &collHandle, l1t::HGCalClusterBxCollection &collCluster2D) override
unsigned size(int bx) const
uint32_t detId() const
const HGCalTriggerGeometryBase * geometry() const
virtual unsigned getModuleFromTriggerCell(const unsigned trigger_cell_det_id) const =0
std::unique_ptr< HGCalClusteringDummyImpl > clusteringDummy_
#define DEFINE_EDM_PLUGIN(factory, type, name)
std::unique_ptr< HGCalStage1TruncationImpl > truncation_