10 fixedDataSizePerHGCROC_(conf.getParameter<
bool>(
"fixedDataSizePerHGCROC")),
11 allTrigCellsInTrigSums_(conf.getParameter<
bool>(
"allTrigCellsInTrigSums")),
12 coarsenTriggerCells_(conf.getParameter<
std::
vector<unsigned>>(
"coarsenTriggerCells")),
13 selectionType_(kNSubDetectors_) {
17 <<
"Inconsistent number of sub-detectors (should be " <<
kNSubDetectors_ <<
")";
24 thresholdImpl_ = std::make_unique<HGCalConcentratorThresholdImpl>(conf);
26 trigSumImpl_ = std::make_unique<HGCalConcentratorTrigSumImpl>(conf);
30 bestChoiceImpl_ = std::make_unique<HGCalConcentratorBestChoiceImpl>(conf);
32 trigSumImpl_ = std::make_unique<HGCalConcentratorTrigSumImpl>(conf);
33 }
else if (
selectionType[subdet] ==
"superTriggerCellSelect") {
45 <<
"Unknown type of concentrator selection '" <<
selectionType[subdet] <<
"'";
51 coarsenerImpl_ = std::make_unique<HGCalConcentratorCoarsenerImpl>(conf);
74 auto& triggerCellCollOutput = std::get<0>(triggerCollOutput);
75 auto& triggerSumCollOutput = std::get<1>(triggerCollOutput);
76 auto& autoEncoderCollOutput = std::get<2>(triggerCollOutput);
80 std::unordered_map<uint32_t, std::vector<l1t::HGCalTriggerCell>> tc_modules;
81 for (
const auto& trigCell : collInput) {
83 tc_modules[
module].push_back(trigCell);
86 for (
const auto& module_trigcell : tc_modules) {
87 std::vector<l1t::HGCalTriggerCell> trigCellVecOutput;
88 std::vector<l1t::HGCalTriggerCell> trigCellVecCoarsened;
89 std::vector<l1t::HGCalTriggerCell> trigCellVecNotSelected;
90 std::vector<l1t::HGCalTriggerSums> trigSumsVecOutput;
91 std::vector<l1t::HGCalConcentratorData> ae_EncodedLayerOutput;
98 coarsenerImpl_->coarsen(module_trigcell.second, trigCellVecCoarsened);
102 thresholdImpl_->select(trigCellVecCoarsened, trigCellVecOutput, trigCellVecNotSelected);
108 module_trigcell.second,
110 trigCellVecNotSelected);
114 trigCellVecCoarsened,
116 trigCellVecNotSelected);
124 trigCellVecCoarsened,
126 ae_EncodedLayerOutput);
129 trigCellVecOutput = trigCellVecCoarsened;
139 thresholdImpl_->select(module_trigcell.second, trigCellVecOutput, trigCellVecNotSelected);
144 module_trigcell.second,
146 trigCellVecNotSelected);
153 module_trigcell.second,
155 ae_EncodedLayerOutput);
158 trigCellVecOutput = module_trigcell.second;
169 trigSumImpl_->doSum(module_trigcell.first, module_trigcell.second, trigSumsVecOutput);
171 trigSumImpl_->doSum(module_trigcell.first, trigCellVecNotSelected, trigSumsVecOutput);
175 for (
const auto& trigCell : trigCellVecOutput) {
176 triggerCellCollOutput.push_back(0, trigCell);
178 for (
const auto& trigSums : trigSumsVecOutput) {
179 triggerSumCollOutput.push_back(0, trigSums);
181 for (
const auto& aeVal : ae_EncodedLayerOutput) {
182 autoEncoderCollOutput.push_back(0, aeVal);