10 fixedDataSizePerHGCROC_(conf.getParameter<
bool>(
"fixedDataSizePerHGCROC")),
11 coarsenTriggerCells_(conf.getParameter<
std::
vector<unsigned>>(
"coarsenTriggerCells")),
12 selectionType_(kNSubDetectors_) {
16 <<
"Inconsistent number of sub-detectors (should be " <<
kNSubDetectors_ <<
")";
23 thresholdImpl_ = std::make_unique<HGCalConcentratorThresholdImpl>(conf);
25 trigSumImpl_ = std::make_unique<HGCalConcentratorTrigSumImpl>(conf);
29 bestChoiceImpl_ = std::make_unique<HGCalConcentratorBestChoiceImpl>(conf);
31 trigSumImpl_ = std::make_unique<HGCalConcentratorTrigSumImpl>(conf);
32 }
else if (
selectionType[subdet] ==
"superTriggerCellSelect") {
40 <<
"Unknown type of concentrator selection '" <<
selectionType[subdet] <<
"'";
46 coarsenerImpl_ = std::make_unique<HGCalConcentratorCoarsenerImpl>(conf);
52 std::pair<l1t::HGCalTriggerCellBxCollection, l1t::HGCalTriggerSumsBxCollection>& triggerCollOutput,
66 auto& triggerCellCollOutput = triggerCollOutput.first;
67 auto& triggerSumCollOutput = triggerCollOutput.second;
71 std::unordered_map<uint32_t, std::vector<l1t::HGCalTriggerCell>> tc_modules;
72 for (
const auto& trigCell : collInput) {
74 tc_modules[module].push_back(trigCell);
77 for (
const auto& module_trigcell : tc_modules) {
78 std::vector<l1t::HGCalTriggerCell> trigCellVecOutput;
79 std::vector<l1t::HGCalTriggerCell> trigCellVecCoarsened;
80 std::vector<l1t::HGCalTriggerCell> trigCellVecNotSelected;
81 std::vector<l1t::HGCalTriggerSums> trigSumsVecOutput;
88 coarsenerImpl_->coarsen(module_trigcell.second, trigCellVecCoarsened);
92 thresholdImpl_->select(trigCellVecCoarsened, trigCellVecOutput, trigCellVecNotSelected);
98 module_trigcell.second,
100 trigCellVecNotSelected);
104 trigCellVecCoarsened,
106 trigCellVecNotSelected);
113 trigCellVecOutput = trigCellVecCoarsened;
123 thresholdImpl_->select(module_trigcell.second, trigCellVecOutput, trigCellVecNotSelected);
128 module_trigcell.second,
130 trigCellVecNotSelected);
136 trigCellVecOutput = module_trigcell.second;
146 trigSumImpl_->doSum(module_trigcell.first, trigCellVecNotSelected, trigSumsVecOutput);
149 for (
const auto& trigCell : trigCellVecOutput) {
150 triggerCellCollOutput.push_back(0, trigCell);
152 for (
const auto& trigSums : trigSumsVecOutput) {
153 triggerSumCollOutput.push_back(0, trigSums);