28 const std::string& clusteringAlgoWrapperName = clusteringParamConfig.getParameter<
std::string>(
"AlgoName");
29 const std::string& sortingTruncationAlgoWrapperName =
36 sortingTruncationAlgoWrapperName, sortingTruncationParamConfig)};
38 for (
const auto& interpretationPset : conf.
getParameter<std::vector<edm::ParameterSet>>(
"energy_interpretations")) {
39 std::unique_ptr<HGCalTriggerClusterInterpreterBase> interpreter{
41 interpreter->initialize(interpretationPset);
47 std::pair<l1t::HGCalMulticlusterBxCollection, l1t::HGCalClusterBxCollection>& be_output)
override {
54 std::unordered_map<uint32_t, std::vector<edm::Ptr<l1t::HGCalCluster>>> tcs_per_fpga;
56 for (
unsigned i = 0;
i < collHandle->
size(); ++
i) {
65 for (
auto& fpga : stage2_fpgas) {
66 tcs_per_fpga[fpga].push_back(tc_ptr);
75 for (
auto& fpga_tcs : tcs_per_fpga) {
77 std::vector<std::pair<GlobalPoint, double>> seedPositionsEnergy;
83 std::pair<const std::vector<edm::Ptr<l1t::HGCalCluster>>&,
const std::vector<std::pair<GlobalPoint, double>>&>
84 inputClustersAndSeeds{fpga_tcs.second, seedPositionsEnergy};
90 std::pair<l1t::HGCalMulticlusterBxCollection&, l1t::HGCalClusterBxCollection&>
91 outputMulticlustersAndRejectedClusters_perFPGA{collCluster3D_perFPGA, rejectedClusters_perFPGA};
95 outputMulticlustersAndRejectedClusters_perFPGA);
101 interpreter->setGeometry(
geometry());
102 interpreter->interpret(collCluster3D_perFPGA_sorted);
105 for (
const auto& collcluster : collCluster3D_perFPGA_sorted) {
106 collCluster3D_sorted.
push_back(0, collcluster);
108 for (
const auto& rejectedcluster : rejectedClusters_perFPGA) {
109 rejectedClusters.
push_back(0, rejectedcluster);
130 "HGCalBackendLayer2Processor3DClusteringSA");
T getParameter(std::string const &) const
std::unique_ptr< HGCalStage2FilteringWrapperBase > multiclusteringSortingTruncationWrapper_
virtual unsigned getStage1FpgaFromModule(const unsigned module_id) const =0
HGCalStage2ClusterDistribution distributor_
std::unique_ptr< HGCalHistoClusteringWrapperBase > multiclusteringHistoClusteringWrapper_
ParameterSet const & getParameterSet(std::string const &) const
std::vector< std::unique_ptr< HGCalTriggerClusterInterpreterBase > > energy_interpreters_
unsigned size(int bx) const
virtual geom_set getStage2FpgasFromStage1Fpga(const unsigned stage1_id) const =0
void run(const edm::Handle< l1t::HGCalClusterBxCollection > &collHandle, std::pair< l1t::HGCalMulticlusterBxCollection, l1t::HGCalClusterBxCollection > &be_output) override
const HGCalTriggerGeometryBase * geometry() const
virtual unsigned getModuleFromTriggerCell(const unsigned trigger_cell_det_id) const =0
HGCalBackendLayer2Processor3DClusteringSA(const edm::ParameterSet &conf)
ParameterSet const & getParameterSet(ParameterSetID const &id)
const edm::ParameterSet conf_
std::unordered_set< unsigned > geom_set
#define DEFINE_EDM_PLUGIN(factory, type, name)
HGCalTriggerGeometryBase::geom_set getStage2FPGAs(const unsigned stage1_fpga, const HGCalTriggerGeometryBase::geom_set &stage2_fpgas, const edm::Ptr< l1t::HGCalCluster > &tc_ptr) const
std::unique_ptr< HGCalHistoSeedingImpl > multiclusteringHistoSeeding_
void push_back(int bx, T object)