CMS 3D CMS Logo

tdr_regionizer_ref.h
Go to the documentation of this file.
1 #ifndef tdr_regionizer_ref_h
2 #define tdr_regionizer_ref_h
3 
6 
7 namespace edm {
8  class ParameterSet;
9 }
10 
11 namespace l1ct {
13  public:
14  TDRRegionizerEmulator(unsigned int netaslices,
15  unsigned int ntk,
16  unsigned int ncalo,
17  unsigned int nem,
18  unsigned int nmu,
19  int nclocks,
20  bool dosort);
21 
22  // note: this one will work only in CMSSW
24 
25  ~TDRRegionizerEmulator() override;
26 
27  static const int NTK_SECTORS = 9, NTK_LINKS = 2; // max objects per sector per clock cycle
28  static const int NCALO_SECTORS = 4, NCALO_LINKS = 4;
29  static const int NEMCALO_SECTORS = 4, NEMCALO_LINKS = 4;
30  static const int NMU_LINKS = 2;
31  static const int MAX_TK_EVT = 108, MAX_EMCALO_EVT = 162, MAX_CALO_EVT = 162,
32  MAX_MU_EVT = 162; //all at TMUX 6, per link
33  //assuming 96b for tracks, 64b for emcalo, calo, mu
34  static const int NUMBER_OF_SMALL_REGIONS = 18;
35  static const int NETA_SMALL = 2;
36 
37  void initSectorsAndRegions(const RegionizerDecodedInputs& in, const std::vector<PFInputRegion>& out) override;
38 
39  // TODO: implement
40  void run(const RegionizerDecodedInputs& in, std::vector<PFInputRegion>& out) override;
41 
42  // link emulation from decoded inputs (for simulation)
43  void fillLinks(const RegionizerDecodedInputs& in, std::vector<std::vector<l1ct::TkObjEmu>>& links);
44  void fillLinks(const RegionizerDecodedInputs& in, std::vector<std::vector<l1ct::HadCaloObjEmu>>& links);
45  void fillLinks(const RegionizerDecodedInputs& in, std::vector<std::vector<l1ct::EmCaloObjEmu>>& links);
46  void fillLinks(const RegionizerDecodedInputs& in, std::vector<std::vector<l1ct::MuObjEmu>>& links);
47 
48  // convert links to firmware
49  void toFirmware(const std::vector<l1ct::TkObjEmu>& emu, TkObj fw[NTK_SECTORS][NTK_LINKS]);
50  void toFirmware(const std::vector<l1ct::HadCaloObjEmu>& emu, HadCaloObj fw[NCALO_SECTORS][NCALO_LINKS]);
51  void toFirmware(const std::vector<l1ct::EmCaloObjEmu>& emu, EmCaloObj fw[NCALO_SECTORS][NCALO_LINKS]);
52  void toFirmware(const std::vector<l1ct::MuObjEmu>& emu, MuObj fw[NMU_LINKS]);
53 
54  private:
56  int nclocks_;
57  bool dosort_, init_;
58 
59  std::vector<tdr_regionizer::Regionizer<l1ct::TkObjEmu>> tkRegionizers_;
60  std::vector<tdr_regionizer::Regionizer<l1ct::HadCaloObjEmu>> hadCaloRegionizers_;
61  std::vector<tdr_regionizer::Regionizer<l1ct::EmCaloObjEmu>> emCaloRegionizers_;
62  std::vector<tdr_regionizer::Regionizer<l1ct::MuObjEmu>> muRegionizers_;
63  };
64 
65 } // namespace l1ct
66 
67 #endif
void toFirmware(const std::vector< l1ct::TkObjEmu > &emu, TkObj fw[NTK_SECTORS][NTK_LINKS])
std::vector< tdr_regionizer::Regionizer< l1ct::EmCaloObjEmu > > emCaloRegionizers_
std::vector< tdr_regionizer::Regionizer< l1ct::MuObjEmu > > muRegionizers_
void fillLinks(const RegionizerDecodedInputs &in, std::vector< std::vector< l1ct::TkObjEmu >> &links)
TDRRegionizerEmulator(unsigned int netaslices, unsigned int ntk, unsigned int ncalo, unsigned int nem, unsigned int nmu, int nclocks, bool dosort)
std::vector< tdr_regionizer::Regionizer< l1ct::HadCaloObjEmu > > hadCaloRegionizers_
static const int NUMBER_OF_SMALL_REGIONS
void initSectorsAndRegions(const RegionizerDecodedInputs &in, const std::vector< PFInputRegion > &out) override
void run(const RegionizerDecodedInputs &in, std::vector< PFInputRegion > &out) override
HLT enums.
std::vector< tdr_regionizer::Regionizer< l1ct::TkObjEmu > > tkRegionizers_
Definition: datatypes.h:19