CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1MuGMTLFMergeRankEtaQLUT.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_L1MuGMTLFMergeRankEtaQLUT_h
19 #define L1TriggerGlobalMuonTrigger_L1MuGMTLFMergeRankEtaQLUT_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, BRPC, CSC, FRPC};
44 
46  L1MuGMTLFMergeRankEtaQLUT() : L1MuGMTLUT("LFMergeRankEtaQ",
47  "DT BRPC CSC FRPC",
48  "eta(6) q(3)",
49  "flag(1) rank_etaq(7)", 8, false) {
51  } ;
52 
55 
57  unsigned SpecificLookup_flag (int idx, unsigned eta, unsigned q) const {
58  std::vector<unsigned> addr(2);
59  addr[0] = eta;
60  addr[1] = q;
61  return Lookup(idx, addr) [0];
62  };
63 
65  unsigned SpecificLookup_rank_etaq (int idx, unsigned eta, unsigned q) const {
66  std::vector<unsigned> addr(2);
67  addr[0] = eta;
68  addr[1] = q;
69  return Lookup(idx, addr) [1];
70  };
71 
73  unsigned SpecificLookup (int idx, unsigned eta, unsigned q) const {
74  std::vector<unsigned> addr(2);
75  addr[0] = eta;
76  addr[1] = q;
77  return LookupPacked(idx, addr);
78  };
79 
80 
81 
83 
84  virtual unsigned LookupFunctionPacked (int idx, unsigned address) const {
85  std::vector<unsigned> addr = u2vec(address, m_Inputs);
86  return TheLookupFunction(idx ,addr[0] ,addr[1]);
87 
88  };
89 
90  private:
92  void InitParameters();
93 
95  unsigned TheLookupFunction (int idx, unsigned eta, unsigned q) const;
96 
98 };
99 #endif
100 
101 
102 
103 
104 
105 
106 
107 
108 
109 
110 
111 
112 
113 
114 
115 
116 
117 
118 
L1MuGMTLFMergeRankEtaQLUT()
constuctor using function-lookup
unsigned SpecificLookup(int idx, unsigned eta, unsigned q) const
specific lookup function for entire output field
T eta() const
std::vector< unsigned > Lookup(int idx, const std::vector< unsigned > &address) const
additional lookup function (std::vector -&gt; vector)
Definition: L1MuGMTLUT.h:115
unsigned TheLookupFunction(int idx, unsigned eta, unsigned q) const
The lookup function - here the functionality of the LUT is implemented.
void InitParameters()
Initialize scales, configuration parameters, alignment constants, ...
std::vector< port > m_Inputs
Definition: L1MuGMTLUT.h:201
unsigned SpecificLookup_rank_etaq(int idx, unsigned eta, unsigned q) const
specific lookup function for rank_etaq
unsigned SpecificLookup_flag(int idx, unsigned eta, unsigned q) const
specific lookup function for flag
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
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:239
virtual ~L1MuGMTLFMergeRankEtaQLUT()
destructor
volatile std::atomic< bool > shutdown_flag false
unsigned LookupPacked(int idx, unsigned) const
Definition: L1MuGMTLUT.h:260