CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1MuGMTLFMatchQualLUT.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
10 // $Date: 2007/04/02 15:45:38 $
11 // $Revision: 1.3 $
12 //
13 // Author :
14 // H. Sakulin HEPHY Vienna
15 //
16 // Migrated to CMSSW:
17 // I. Mikulec
18 //
19 //--------------------------------------------------
20 #ifndef L1TriggerGlobalMuonTrigger_L1MuGMTLFMatchQualLUT_h
21 #define L1TriggerGlobalMuonTrigger_L1MuGMTLFMatchQualLUT_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:
46 
48  L1MuGMTLFMatchQualLUT() : L1MuGMTLUT("LFMatchQual",
49  "DTRPC CSCRPC DTCSC CSCDT CSCbRPC DTfRPC",
50  "delta_eta(4) delta_phi(3)",
51  "mq(6)", 7, true) {
53  } ;
54 
56  virtual ~L1MuGMTLFMatchQualLUT() {};
57 
59  unsigned SpecificLookup_mq (int idx, unsigned delta_eta, unsigned delta_phi) const {
60  std::vector<unsigned> addr(2);
61  addr[0] = delta_eta;
62  addr[1] = delta_phi;
63  return Lookup(idx, addr) [0];
64  };
65 
67  unsigned SpecificLookup (int idx, unsigned delta_eta, unsigned delta_phi) const {
68  std::vector<unsigned> addr(2);
69  addr[0] = delta_eta;
70  addr[1] = delta_phi;
71  return LookupPacked(idx, addr);
72  };
73 
74 
75 
77 
78  virtual unsigned LookupFunctionPacked (int idx, unsigned address) const {
79  std::vector<unsigned> addr = u2vec(address, m_Inputs);
80  return TheLookupFunction(idx ,addr[0] ,addr[1]);
81 
82  };
83 
84  private:
86  void InitParameters();
87 
89  unsigned TheLookupFunction (int idx, unsigned delta_eta, unsigned delta_phi) const;
90 
92  float m_EtaWeights[6];
93  float m_PhiWeights[6];
95 };
96 #endif
97 
98 
99 
100 
101 
102 
103 
104 
105 
106 
107 
108 
109 
110 
111 
112 
113 
114 
115 
unsigned SpecificLookup(int idx, unsigned delta_eta, unsigned delta_phi) const
specific lookup function for entire output field
double delta_eta(double eta1, double eta2)
Definition: AnglesUtil.h:98
char * address
Definition: mlp_lapack.h:14
virtual unsigned LookupFunctionPacked(int idx, unsigned address) const
access to lookup function with packed input and output
float m_EtaWeights[6]
Private data members (LUT parameters);.
void InitParameters()
Initialize scales, configuration parameters, alignment constants, ...
L1MuGMTLFMatchQualLUT()
constuctor using function-lookup
std::vector< unsigned > Lookup(int idx, const std::vector< unsigned > &address) const
additional lookup function (std::vector -&gt; vector)
Definition: L1MuGMTLUT.h:117
virtual ~L1MuGMTLFMatchQualLUT()
destructor
unsigned SpecificLookup_mq(int idx, unsigned delta_eta, unsigned delta_phi) const
specific lookup function for mq
std::vector< port > m_Inputs
Definition: L1MuGMTLUT.h:203
double delta_phi(double ph11, double phi2)
Definition: AnglesUtil.h:91
std::vector< unsigned > u2vec(unsigned value, const std::vector< port > &widths) const
generate composite address or value from compact unsigned
Definition: L1MuGMTLUT.h:241
unsigned LookupPacked(int idx, unsigned) const
Definition: L1MuGMTLUT.h:262
unsigned TheLookupFunction(int idx, unsigned delta_eta, unsigned delta_phi) const
The lookup function - here the functionality of the LUT is implemented.