test
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 //
11 // Author :
12 // H. Sakulin HEPHY Vienna
13 //
14 // Migrated to CMSSW:
15 // I. Mikulec
16 //
17 //--------------------------------------------------
18 #ifndef L1TriggerGlobalMuonTrigger_L1MuGMTLFMatchQualLUT_h
19 #define L1TriggerGlobalMuonTrigger_L1MuGMTLFMatchQualLUT_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:
44 
46  L1MuGMTLFMatchQualLUT() : L1MuGMTLUT("LFMatchQual",
47  "DTRPC CSCRPC DTCSC CSCDT CSCbRPC DTfRPC",
48  "delta_eta(4) delta_phi(3)",
49  "mq(6)", 7, true) {
51  } ;
52 
54  virtual ~L1MuGMTLFMatchQualLUT() {};
55 
57  unsigned SpecificLookup_mq (int idx, unsigned delta_eta, unsigned delta_phi) const {
58  std::vector<unsigned> addr(2);
59  addr[0] = delta_eta;
60  addr[1] = delta_phi;
61  return Lookup(idx, addr) [0];
62  };
63 
65  unsigned SpecificLookup (int idx, unsigned delta_eta, unsigned delta_phi) const {
66  std::vector<unsigned> addr(2);
67  addr[0] = delta_eta;
68  addr[1] = delta_phi;
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] ,addr[1]);
79 
80  };
81 
82  private:
84  void InitParameters();
85 
87  unsigned TheLookupFunction (int idx, unsigned delta_eta, unsigned delta_phi) const;
88 
90  float m_EtaWeights[6];
91  float m_PhiWeights[6];
93 };
94 #endif
95 
96 
97 
98 
99 
100 
101 
102 
103 
104 
105 
106 
107 
108 
109 
110 
111 
112 
113 
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
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:115
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:201
double delta_phi(double ph11, double phi2)
Definition: AnglesUtil.h:91
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
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
unsigned TheLookupFunction(int idx, unsigned delta_eta, unsigned delta_phi) const
The lookup function - here the functionality of the LUT is implemented.