CMS 3D CMS Logo

L1MuGMTLFOvlEtaConvLUT.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
10 //
11 // Author :
12 // H. Sakulin HEPHY Vienna
13 //
14 // Migrated to CMSSW:
15 // I. Mikulec
16 //
17 //--------------------------------------------------
18 #ifndef L1TriggerGlobalMuonTrigger_L1MuGMTLFOvlEtaConvLUT_h
19 #define L1TriggerGlobalMuonTrigger_L1MuGMTLFOvlEtaConvLUT_h
20 
21 //---------------
22 // C++ Headers --
23 //---------------
24 
25 
26 //----------------------
27 // Base Class Headers --
28 //----------------------
30 
31 //------------------------------------
32 // Collaborating Class Declarations --
33 //------------------------------------
34 
35 // ---------------------
36 // -- Class Interface --
37 // ---------------------
38 
39 
41 
42  public:
43  enum {DT, CSC, bRPC, fRPC, ovlCSC, ovlDT};
44 
46  L1MuGMTLFOvlEtaConvLUT() : L1MuGMTLUT("LFOvlEtaConv",
47  "DT CSC bRPC fRPC ovlCSC ovlDT",
48  "eta6(6)",
49  "eta_ovl(4)", 6, true) {
51  } ;
52 
54  ~L1MuGMTLFOvlEtaConvLUT() override {};
55 
57  unsigned SpecificLookup_eta_ovl (int idx, unsigned eta6) const {
58  std::vector<unsigned> addr(1);
59  addr[0] = eta6;
60  return Lookup(idx, addr) [0];
61  };
62 
64  unsigned SpecificLookup (int idx, unsigned eta6) const {
65  std::vector<unsigned> addr(1);
66  addr[0] = eta6;
67  return LookupPacked(idx, addr);
68  };
69 
70 
71 
73 
74  unsigned LookupFunctionPacked (int idx, unsigned address) const override {
75  std::vector<unsigned> addr = u2vec(address, m_Inputs);
76  return TheLookupFunction(idx ,addr[0]);
77 
78  };
79 
80  private:
82  void InitParameters();
83 
85  unsigned TheLookupFunction (int idx, unsigned eta6) const;
86 
88 };
89 #endif
90 
91 
92 
93 
94 
95 
96 
97 
98 
99 
100 
101 
102 
103 
104 
105 
106 
107 
108 
unsigned SpecificLookup_eta_ovl(int idx, unsigned eta6) const
specific lookup function for eta_ovl
L1MuGMTLFOvlEtaConvLUT()
constuctor using function-lookup
std::vector< unsigned > Lookup(int idx, const std::vector< unsigned > &address) const
additional lookup function (std::vector -> vector)
Definition: L1MuGMTLUT.h:115
void InitParameters()
Initialize scales, configuration parameters, alignment constants, ...
std::vector< port > m_Inputs
Definition: L1MuGMTLUT.h:201
unsigned TheLookupFunction(int idx, unsigned eta6) const
The lookup function - here the functionality of the LUT is implemented.
~L1MuGMTLFOvlEtaConvLUT() override
destructor
unsigned LookupFunctionPacked(int idx, unsigned address) const override
access to lookup function with packed input and output
unsigned SpecificLookup(int idx, unsigned eta6) const
specific lookup function for entire output field
std::vector< unsigned > u2vec(unsigned value, const std::vector< port > &widths) const
generate composite address or value from compact unsigned
Definition: L1MuGMTLUT.h:239
unsigned LookupPacked(int idx, unsigned) const
Definition: L1MuGMTLUT.h:260