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);
73 auto& triggerCellCollOutput = std::get<0>(triggerCollOutput);
74 auto& triggerSumCollOutput = std::get<1>(triggerCollOutput);
75 auto& autoEncoderCollOutput = std::get<2>(triggerCollOutput);
79 std::unordered_map<uint32_t, std::vector<l1t::HGCalTriggerCell>> tc_modules;
80 for (
const auto& trigCell : collInput) {
82 tc_modules[
module].push_back(trigCell);
85 for (
const auto& module_trigcell : tc_modules) {
86 std::vector<l1t::HGCalTriggerCell> trigCellVecOutput;
87 std::vector<l1t::HGCalTriggerCell> trigCellVecCoarsened;
88 std::vector<l1t::HGCalTriggerCell> trigCellVecNotSelected;
89 std::vector<l1t::HGCalTriggerSums> trigSumsVecOutput;
90 std::vector<l1t::HGCalConcentratorData> ae_EncodedLayerOutput;
97 coarsenerImpl_->coarsen(module_trigcell.second, trigCellVecCoarsened);
101 thresholdImpl_->select(trigCellVecCoarsened, trigCellVecOutput, trigCellVecNotSelected);
106 geometry()->getModuleSize(module_trigcell.first),
107 module_trigcell.second,
109 trigCellVecNotSelected);
112 geometry()->getModuleSize(module_trigcell.first),
113 trigCellVecCoarsened,
115 trigCellVecNotSelected);
123 trigCellVecCoarsened,
125 ae_EncodedLayerOutput);
128 trigCellVecOutput = trigCellVecCoarsened;
138 thresholdImpl_->select(module_trigcell.second, trigCellVecOutput, trigCellVecNotSelected);
142 geometry()->getModuleSize(module_trigcell.first),
143 module_trigcell.second,
145 trigCellVecNotSelected);
152 module_trigcell.second,
154 ae_EncodedLayerOutput);
157 trigCellVecOutput = module_trigcell.second;
168 trigSumImpl_->doSum(module_trigcell.first, module_trigcell.second, trigSumsVecOutput);
170 trigSumImpl_->doSum(module_trigcell.first, trigCellVecNotSelected, trigSumsVecOutput);
174 for (
const auto& trigCell : trigCellVecOutput) {
175 triggerCellCollOutput.push_back(0, trigCell);
177 for (
const auto& trigSums : trigSumsVecOutput) {
178 triggerSumCollOutput.push_back(0, trigSums);
180 for (
const auto& aeVal : ae_EncodedLayerOutput) {
181 autoEncoderCollOutput.push_back(0, aeVal);
std::unique_ptr< HGCalConcentratorBestChoiceImpl > bestChoiceImpl_
T getParameter(std::string const &) const
static constexpr int kNSubDetectors_
std::unique_ptr< HGCalConcentratorSuperTriggerCellImpl > superTriggerCellImpl_
std::unique_ptr< HGCalConcentratorThresholdImpl > thresholdImpl_
void run(const edm::Handle< l1t::HGCalTriggerCellBxCollection > &triggerCellCollInput, std::tuple< l1t::HGCalTriggerCellBxCollection, l1t::HGCalTriggerSumsBxCollection, l1t::HGCalConcentratorDataBxCollection > &triggerCollOutput) override
bool fixedDataSizePerHGCROC_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
HGCalConcentratorProcessorSelection(const edm::ParameterSet &conf)
const HGCalTriggerGeometryBase * geometry() const
virtual unsigned getModuleFromTriggerCell(const unsigned trigger_cell_det_id) const =0
std::unique_ptr< HGCalConcentratorAutoEncoderImpl > autoEncoderImpl_
HGCalTriggerTools triggerTools_
bool allTrigCellsInTrigSums_
std::unique_ptr< HGCalConcentratorCoarsenerImpl > coarsenerImpl_
#define DEFINE_EDM_PLUGIN(factory, type, name)
std::vector< SelectionType > selectionType_
std::vector< unsigned > coarsenTriggerCells_
std::unique_ptr< HGCalConcentratorTrigSumImpl > trigSumImpl_
static constexpr int kHighDensityThickness_