CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
HGCalBackendLayer1Processor Class Reference

#include <HGCalBackendLayer1Processor.h>

Inheritance diagram for HGCalBackendLayer1Processor:
HGCalProcessorBaseT< InputCollection, OutputCollection >

Public Member Functions

 HGCalBackendLayer1Processor (const edm::ParameterSet &conf)
 
void run (const edm::Handle< l1t::HGCalTriggerCellBxCollection > &collHandle, l1t::HGCalClusterBxCollection &collCluster2D) override
 
- Public Member Functions inherited from HGCalProcessorBaseT< InputCollection, OutputCollection >
 HGCalProcessorBaseT (const edm::ParameterSet &conf)
 
const std::string & name () const
 
virtual void run (const InputCollection &inputColl, OutputCollection &outColl)=0
 
virtual void setGeometry (const HGCalTriggerGeometryBase *const geom)
 
virtual ~HGCalProcessorBaseT ()
 

Private Attributes

std::unique_ptr< HGCalClusteringDummyImplclusteringDummy_
 
std::unique_ptr< HGCalStage1TruncationImpltruncation_
 

Additional Inherited Members

- Protected Member Functions inherited from HGCalProcessorBaseT< InputCollection, OutputCollection >
const HGCalTriggerGeometryBasegeometry () const
 

Detailed Description

Definition at line 12 of file HGCalBackendLayer1Processor.h.

Constructor & Destructor Documentation

◆ HGCalBackendLayer1Processor()

HGCalBackendLayer1Processor::HGCalBackendLayer1Processor ( const edm::ParameterSet conf)

Definition at line 5 of file HGCalBackendLayer1Processor.cc.

References clusteringDummy_, edm::ParameterSet::getParameterSet(), and truncation_.

7  clusteringDummy_ = std::make_unique<HGCalClusteringDummyImpl>(conf.getParameterSet("C2d_parameters"));
8  truncation_ = std::make_unique<HGCalStage1TruncationImpl>(conf.getParameterSet("truncation_parameters"));
9 }
ParameterSet const & getParameterSet(std::string const &) const
HGCalProcessorBaseT< edm::Handle< l1t::HGCalTriggerCellBxCollection >, l1t::HGCalClusterBxCollection > HGCalBackendLayer1ProcessorBase
std::unique_ptr< HGCalClusteringDummyImpl > clusteringDummy_
std::unique_ptr< HGCalStage1TruncationImpl > truncation_

Member Function Documentation

◆ run()

void HGCalBackendLayer1Processor::run ( const edm::Handle< l1t::HGCalTriggerCellBxCollection > &  collHandle,
l1t::HGCalClusterBxCollection collCluster2D 
)
override

Definition at line 11 of file HGCalBackendLayer1Processor.cc.

References clusteringDummy_, l1t::HGCalTriggerCell::detId(), HGCalProcessorBaseT< InputCollection, OutputCollection >::geometry(), HGCalTriggerGeometryBase::getModuleFromTriggerCell(), HGCalTriggerGeometryBase::getStage1FpgaFromModule(), mps_fire::i, callgraph::module, BXVector< T >::size(), and truncation_.

12  {
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 }
virtual unsigned getStage1FpgaFromModule(const unsigned module_id) const =0
unsigned size(int bx) const
const HGCalTriggerGeometryBase * geometry() const
virtual unsigned getModuleFromTriggerCell(const unsigned trigger_cell_det_id) const =0
std::unique_ptr< HGCalClusteringDummyImpl > clusteringDummy_
std::unique_ptr< HGCalStage1TruncationImpl > truncation_

Member Data Documentation

◆ clusteringDummy_

std::unique_ptr<HGCalClusteringDummyImpl> HGCalBackendLayer1Processor::clusteringDummy_
private

Definition at line 20 of file HGCalBackendLayer1Processor.h.

Referenced by HGCalBackendLayer1Processor(), and run().

◆ truncation_

std::unique_ptr<HGCalStage1TruncationImpl> HGCalBackendLayer1Processor::truncation_
private

Definition at line 21 of file HGCalBackendLayer1Processor.h.

Referenced by HGCalBackendLayer1Processor(), and run().