File indexing completed on 2022-06-10 01:53:50
0001 #ifndef tdr_regionizer_ref_h
0002 #define tdr_regionizer_ref_h
0003
0004 #include "L1Trigger/Phase2L1ParticleFlow/interface/regionizer/regionizer_base_ref.h"
0005 #include "L1Trigger/Phase2L1ParticleFlow/interface/regionizer/tdr_regionizer_elements_ref.h"
0006
0007 namespace edm {
0008 class ParameterSet;
0009 }
0010
0011 namespace l1ct {
0012 class TDRRegionizerEmulator : public RegionizerEmulator {
0013 public:
0014 TDRRegionizerEmulator(unsigned int netaslices,
0015 unsigned int ntk,
0016 unsigned int ncalo,
0017 unsigned int nem,
0018 unsigned int nmu,
0019 int nclocks,
0020 bool dosort);
0021
0022
0023 TDRRegionizerEmulator(const edm::ParameterSet& iConfig);
0024
0025 ~TDRRegionizerEmulator() override;
0026
0027 static const int NTK_SECTORS = 9, NTK_LINKS = 2;
0028 static const int NCALO_SECTORS = 4, NCALO_LINKS = 4;
0029 static const int NEMCALO_SECTORS = 4, NEMCALO_LINKS = 4;
0030 static const int NMU_LINKS = 2;
0031 static const int MAX_TK_EVT = 108, MAX_EMCALO_EVT = 162, MAX_CALO_EVT = 162,
0032 MAX_MU_EVT = 162;
0033
0034 static const int NUMBER_OF_SMALL_REGIONS = 18;
0035 static const int NETA_SMALL = 2;
0036
0037 void initSectorsAndRegions(const RegionizerDecodedInputs& in, const std::vector<PFInputRegion>& out) override;
0038
0039
0040 void run(const RegionizerDecodedInputs& in, std::vector<PFInputRegion>& out) override;
0041
0042
0043 void fillLinks(const RegionizerDecodedInputs& in, std::vector<std::vector<l1ct::TkObjEmu>>& links);
0044 void fillLinks(const RegionizerDecodedInputs& in, std::vector<std::vector<l1ct::HadCaloObjEmu>>& links);
0045 void fillLinks(const RegionizerDecodedInputs& in, std::vector<std::vector<l1ct::EmCaloObjEmu>>& links);
0046 void fillLinks(const RegionizerDecodedInputs& in, std::vector<std::vector<l1ct::MuObjEmu>>& links);
0047
0048
0049 void toFirmware(const std::vector<l1ct::TkObjEmu>& emu, TkObj fw[NTK_SECTORS][NTK_LINKS]);
0050 void toFirmware(const std::vector<l1ct::HadCaloObjEmu>& emu, HadCaloObj fw[NCALO_SECTORS][NCALO_LINKS]);
0051 void toFirmware(const std::vector<l1ct::EmCaloObjEmu>& emu, EmCaloObj fw[NCALO_SECTORS][NCALO_LINKS]);
0052 void toFirmware(const std::vector<l1ct::MuObjEmu>& emu, MuObj fw[NMU_LINKS]);
0053
0054 private:
0055 unsigned int netaslices_, ntk_, ncalo_, nem_, nmu_, nregions_;
0056 int nclocks_;
0057 bool dosort_, init_;
0058
0059 std::vector<tdr_regionizer::Regionizer<l1ct::TkObjEmu>> tkRegionizers_;
0060 std::vector<tdr_regionizer::Regionizer<l1ct::HadCaloObjEmu>> hadCaloRegionizers_;
0061 std::vector<tdr_regionizer::Regionizer<l1ct::EmCaloObjEmu>> emCaloRegionizers_;
0062 std::vector<tdr_regionizer::Regionizer<l1ct::MuObjEmu>> muRegionizers_;
0063 };
0064
0065 }
0066
0067 #endif