CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1MuGMTLFPhiProEtaConvLUT.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
10 // $Date: 2007/03/23 18:51:35 $
11 // $Revision: 1.2 $
12 //
13 // Author :
14 // H. Sakulin HEPHY Vienna
15 //
16 // Migrated to CMSSW:
17 // I. Mikulec
18 //
19 //--------------------------------------------------
20 #ifndef L1TriggerGlobalMuonTrigger_L1MuGMTLFPhiProEtaConvLUT_h
21 #define L1TriggerGlobalMuonTrigger_L1MuGMTLFPhiProEtaConvLUT_h
22 
23 //---------------
24 // C++ Headers --
25 //---------------
26 
27 
28 //----------------------
29 // Base Class Headers --
30 //----------------------
32 
33 //------------------------------------
34 // Collaborating Class Declarations --
35 //------------------------------------
36 
37 // ---------------------
38 // -- Class Interface --
39 // ---------------------
40 
41 
43 
44  public:
45  enum {DT, BRPC, CSC, FRPC};
46 
48  L1MuGMTLFPhiProEtaConvLUT() : L1MuGMTLUT("LFPhiProEtaConv",
49  "DT BRPC CSC FRPC",
50  "eta_in(6)",
51  "eta_out(4)", 6, true) {
53  } ;
54 
57 
59  unsigned SpecificLookup_eta_out (int idx, unsigned eta_in) const {
60  std::vector<unsigned> addr(1);
61  addr[0] = eta_in;
62  return Lookup(idx, addr) [0];
63  };
64 
66  unsigned SpecificLookup (int idx, unsigned eta_in) const {
67  std::vector<unsigned> addr(1);
68  addr[0] = eta_in;
69  return LookupPacked(idx, addr);
70  };
71 
72 
73 
75 
76  virtual unsigned LookupFunctionPacked (int idx, unsigned address) const {
77  std::vector<unsigned> addr = u2vec(address, m_Inputs);
78  return TheLookupFunction(idx ,addr[0]);
79 
80  };
81 
82  private:
84  void InitParameters();
85 
87  unsigned TheLookupFunction (int idx, unsigned eta_in) const;
88 
90 };
91 #endif
92 
93 
94 
95 
96 
97 
98 
99 
100 
101 
102 
103 
104 
105 
106 
107 
108 
109 
110 
void InitParameters()
Initialize scales, configuration parameters, alignment constants, ...
char * address
Definition: mlp_lapack.h:14
virtual ~L1MuGMTLFPhiProEtaConvLUT()
destructor
std::vector< unsigned > Lookup(int idx, const std::vector< unsigned > &address) const
additional lookup function (std::vector -&gt; vector)
Definition: L1MuGMTLUT.h:117
unsigned SpecificLookup(int idx, unsigned eta_in) const
specific lookup function for entire output field
unsigned SpecificLookup_eta_out(int idx, unsigned eta_in) const
specific lookup function for eta_out
L1MuGMTLFPhiProEtaConvLUT()
constuctor using function-lookup
std::vector< port > m_Inputs
Definition: L1MuGMTLUT.h:203
unsigned TheLookupFunction(int idx, unsigned eta_in) const
The lookup function - here the functionality of the LUT is implemented.
virtual unsigned LookupFunctionPacked(int idx, unsigned address) const
access to lookup function with packed input and output
std::vector< unsigned > u2vec(unsigned value, const std::vector< port > &widths) const
generate composite address or value from compact unsigned
Definition: L1MuGMTLUT.h:240
unsigned LookupPacked(int idx, unsigned) const
Definition: L1MuGMTLUT.h:261