CMS 3D CMS Logo

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

#include <HGCalConcentratorProcessorSelection.h>

Inheritance diagram for HGCalConcentratorProcessorSelection:
HGCalProcessorBaseT< InputCollection, OutputCollection >

Public Member Functions

 HGCalConcentratorProcessorSelection (const edm::ParameterSet &conf)
 
void run (const edm::Handle< l1t::HGCalTriggerCellBxCollection > &triggerCellCollInput, l1t::HGCalTriggerCellBxCollection &triggerCellCollOutput, const edm::EventSetup &es) 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, const edm::EventSetup &es)=0
 
void setGeometry (const HGCalTriggerGeometryBase *const geom)
 
virtual ~HGCalProcessorBaseT ()
 

Private Types

enum  SelectionType { thresholdSelect, bestChoiceSelect, superTriggerCellSelect }
 

Private Attributes

std::unique_ptr< HGCalConcentratorSelectionImplconcentratorProcImpl_
 
std::unique_ptr< HGCalConcentratorSuperTriggerCellImplconcentratorSTCImpl_
 
SelectionType selectionType_
 
HGCalTriggerTools triggerTools_
 

Additional Inherited Members

- Protected Attributes inherited from HGCalProcessorBaseT< InputCollection, OutputCollection >
const HGCalTriggerGeometryBasegeometry_
 

Detailed Description

Definition at line 12 of file HGCalConcentratorProcessorSelection.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

HGCalConcentratorProcessorSelection::HGCalConcentratorProcessorSelection ( const edm::ParameterSet conf)

Definition at line 8 of file HGCalConcentratorProcessorSelection.cc.

References bestChoiceSelect, concentratorProcImpl_, concentratorSTCImpl_, Exception, edm::ParameterSet::getParameter(), muonSelectionTypeValueMapProducer_cff::selectionType, selectionType_, AlCaHLTBitMon_QueryRunRegistry::string, superTriggerCellSelect, and thresholdSelect.

11  if (selectionType == "thresholdSelect") {
13  concentratorProcImpl_ = std::make_unique<HGCalConcentratorSelectionImpl>(conf);
14  } else if (selectionType == "bestChoiceSelect") {
16  concentratorProcImpl_ = std::make_unique<HGCalConcentratorSelectionImpl>(conf);
17  } else if (selectionType == "superTriggerCellSelect") {
19  concentratorSTCImpl_ = std::make_unique<HGCalConcentratorSuperTriggerCellImpl>(conf);
20  } else {
21  throw cms::Exception("HGCTriggerParameterError")
22  << "Unknown type of concentrator selection '" << selectionType << "'";
23  }
24 }
T getParameter(std::string const &) const
HGCalProcessorBaseT< edm::Handle< l1t::HGCalTriggerCellBxCollection >, l1t::HGCalTriggerCellBxCollection > HGCalConcentratorProcessorBase
std::unique_ptr< HGCalConcentratorSelectionImpl > concentratorProcImpl_
std::unique_ptr< HGCalConcentratorSuperTriggerCellImpl > concentratorSTCImpl_

Member Function Documentation

void HGCalConcentratorProcessorSelection::run ( const edm::Handle< l1t::HGCalTriggerCellBxCollection > &  triggerCellCollInput,
l1t::HGCalTriggerCellBxCollection triggerCellCollOutput,
const edm::EventSetup es 
)
override

Definition at line 26 of file HGCalConcentratorProcessorSelection.cc.

References bestChoiceSelect, concentratorProcImpl_, concentratorSTCImpl_, HGCalProcessorBaseT< InputCollection, OutputCollection >::geometry_, HGCalTriggerGeometryBase::getModuleFromTriggerCell(), BXVector< T >::push_back(), selectionType_, superTriggerCellSelect, and thresholdSelect.

28  {
30  concentratorProcImpl_->eventSetup(es);
31  const l1t::HGCalTriggerCellBxCollection& collInput = *triggerCellCollInput;
32 
33  std::unordered_map<uint32_t, std::vector<l1t::HGCalTriggerCell>> tc_modules;
34  for (const auto& trigCell : collInput) {
35  uint32_t module = geometry_->getModuleFromTriggerCell(trigCell.detId());
36  tc_modules[module].push_back(trigCell);
37  }
39  concentratorSTCImpl_->eventSetup(es);
40 
41  for (const auto& module_trigcell : tc_modules) {
42  std::vector<l1t::HGCalTriggerCell> trigCellVecOutput;
43  switch (selectionType_) {
44  case thresholdSelect:
45  concentratorProcImpl_->thresholdSelectImpl(module_trigcell.second, trigCellVecOutput);
46  break;
47  case bestChoiceSelect:
48  concentratorProcImpl_->bestChoiceSelectImpl(module_trigcell.second, trigCellVecOutput);
49  break;
51  concentratorSTCImpl_->superTriggerCellSelectImpl(module_trigcell.second, trigCellVecOutput);
52  break;
53  default:
54  // Should not happen, selection type checked in constructor
55  break;
56  }
57  for (const auto& trigCell : trigCellVecOutput) {
58  triggerCellCollOutput.push_back(0, trigCell);
59  }
60  }
61 }
const HGCalTriggerGeometryBase * geometry_
std::unique_ptr< HGCalConcentratorSelectionImpl > concentratorProcImpl_
std::unique_ptr< HGCalConcentratorSuperTriggerCellImpl > concentratorSTCImpl_
virtual unsigned getModuleFromTriggerCell(const unsigned trigger_cell_det_id) const =0
Definition: vlib.h:208
void push_back(int bx, T object)

Member Data Documentation

std::unique_ptr<HGCalConcentratorSelectionImpl> HGCalConcentratorProcessorSelection::concentratorProcImpl_
private
std::unique_ptr<HGCalConcentratorSuperTriggerCellImpl> HGCalConcentratorProcessorSelection::concentratorSTCImpl_
private
SelectionType HGCalConcentratorProcessorSelection::selectionType_
private
HGCalTriggerTools HGCalConcentratorProcessorSelection::triggerTools_
private

Definition at line 29 of file HGCalConcentratorProcessorSelection.h.