CMS 3D CMS Logo

L1MuGMTMIAUEtaConvLUT.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_L1MuGMTMIAUEtaConvLUT_h
19 #define L1TriggerGlobalMuonTrigger_L1MuGMTMIAUEtaConvLUT_h
20 
21 //---------------
22 // C++ Headers --
23 //---------------
24 
25 //----------------------
26 // Base Class Headers --
27 //----------------------
29 
30 //------------------------------------
31 // Collaborating Class Declarations --
32 //------------------------------------
33 
34 // ---------------------
35 // -- Class Interface --
36 // ---------------------
37 
39 public:
41 
44  : L1MuGMTLUT("MIAUEtaConv",
45  "MIP_DT MIP_BRPC ISO_DT ISO_BRPC MIP_CSC MIP_FRPC ISO_CSC ISO_FRPC",
46  "eta_in(6)",
47  "eta_out(4)",
48  6,
49  true) {
51  };
52 
54  ~L1MuGMTMIAUEtaConvLUT() override {}
55 
57  unsigned SpecificLookup_eta_out(int idx, unsigned eta_in) const {
58  std::vector<unsigned> addr(1);
59  addr[0] = eta_in;
60  return Lookup(idx, addr)[0];
61  };
62 
64  unsigned SpecificLookup(int idx, unsigned eta_in) const {
65  std::vector<unsigned> addr(1);
66  addr[0] = eta_in;
67  return LookupPacked(idx, addr);
68  };
69 
71 
72  unsigned LookupFunctionPacked(int idx, unsigned address) const override {
73  std::vector<unsigned> addr = u2vec(address, m_Inputs);
74  return TheLookupFunction(idx, addr[0]);
75  };
76 
77 private:
79  void InitParameters();
80 
82  unsigned TheLookupFunction(int idx, unsigned eta_in) const;
83 
85 };
86 #endif
unsigned SpecificLookup_eta_out(int idx, unsigned eta_in) const
specific lookup function for eta_out
L1MuGMTMIAUEtaConvLUT()
constuctor using function-lookup
unsigned SpecificLookup(int idx, unsigned eta_in) const
specific lookup function for entire output field
unsigned LookupPacked(int idx, unsigned) const
Definition: L1MuGMTLUT.h:272
~L1MuGMTMIAUEtaConvLUT() override
destructor
std::vector< unsigned > u2vec(unsigned value, const std::vector< port > &widths) const
generate composite address or value from compact unsigned
Definition: L1MuGMTLUT.h:251
std::vector< unsigned > Lookup(int idx, const std::vector< unsigned > &address) const
additional lookup function (std::vector -> vector)
Definition: L1MuGMTLUT.h:121
std::vector< port > m_Inputs
Definition: L1MuGMTLUT.h:214
unsigned LookupFunctionPacked(int idx, unsigned address) const override
access to lookup function with packed input and output
void InitParameters()
Initialize scales, configuration parameters, alignment constants, ...
unsigned TheLookupFunction(int idx, unsigned eta_in) const
The lookup function - here the functionality of the LUT is implemented.