CMS 3D CMS Logo

L1MuGMTLFEtaConvLUT.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_L1MuGMTLFEtaConvLUT_h
19 #define L1TriggerGlobalMuonTrigger_L1MuGMTLFEtaConvLUT_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 // ---------------------
37 // -- Class Interface --
38 // ---------------------
39 
40 
42 
43  public:
44  enum {DT, bRPC, CSC, fRPC};
45 
47  L1MuGMTLFEtaConvLUT() : L1MuGMTLUT("LFEtaConv",
48  "DT bRPC CSC fRPC",
49  "eta_regional(6)",
50  "eta_gmt(6)", 6, true) {
52  } ;
53 
55  virtual ~L1MuGMTLFEtaConvLUT() {};
56 
58  unsigned SpecificLookup_eta_gmt (int idx, unsigned eta_regional) const {
59  std::vector<unsigned> addr(1);
60  addr[0] = eta_regional;
61  return Lookup(idx, addr) [0];
62  };
63 
65  unsigned SpecificLookup (int idx, unsigned eta_regional) const {
66  std::vector<unsigned> addr(1);
67  addr[0] = eta_regional;
68  return LookupPacked(idx, addr);
69  };
70 
71 
72 
74 
75  virtual unsigned LookupFunctionPacked (int idx, unsigned address) const {
76  std::vector<unsigned> addr = u2vec(address, m_Inputs);
77  return TheLookupFunction(idx ,addr[0]);
78 
79  };
80 
81  private:
83  void InitParameters();
84 
86  unsigned TheLookupFunction (int idx, unsigned eta_regional) const;
87 
88 };
89 #endif
90 
91 
92 
93 
94 
95 
96 
97 
98 
99 
100 
101 
102 
103 
104 
105 
106 
107 
108 
virtual unsigned LookupFunctionPacked(int idx, unsigned address) const
access to lookup function with packed input and output
unsigned SpecificLookup_eta_gmt(int idx, unsigned eta_regional) const
specific lookup function for eta_gmt
std::vector< unsigned > Lookup(int idx, const std::vector< unsigned > &address) const
additional lookup function (std::vector -> vector)
Definition: L1MuGMTLUT.h:115
L1MuGMTLFEtaConvLUT()
constuctor using function-lookup
std::vector< port > m_Inputs
Definition: L1MuGMTLUT.h:201
unsigned SpecificLookup(int idx, unsigned eta_regional) const
specific lookup function for entire output field
unsigned TheLookupFunction(int idx, unsigned eta_regional) const
The lookup function - here the functionality of the LUT is implemented.
void InitParameters()
Initialize scales, configuration parameters, alignment constants, ...
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
virtual ~L1MuGMTLFEtaConvLUT()
destructor