CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1MuGMTMIAUPhiPro1LUT.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
10 // $Date: 2007/04/02 15:45:39 $
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_L1MuGMTMIAUPhiPro1LUT_h
21 #define L1TriggerGlobalMuonTrigger_L1MuGMTMIAUPhiPro1LUT_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  L1MuGMTMIAUPhiPro1LUT() : L1MuGMTLUT("MIAUPhiPro1",
49  "MIP_DT MIP_BRPC ISO_DT ISO_BRPC MIP_CSC MIP_FRPC ISO_CSC ISO_FRPC",
50  "phi_fine(3) eta(4) pt(5) charge(1)",
51  "cphi_fine(1) cphi_ofs(3)", 11, false) {
53  } ;
54 
56  virtual ~L1MuGMTMIAUPhiPro1LUT() {};
57 
59  unsigned SpecificLookup_cphi_fine (int idx, unsigned phi_fine, unsigned eta, unsigned pt, unsigned charge) const {
60  std::vector<unsigned> addr(4);
61  addr[0] = phi_fine;
62  addr[1] = eta;
63  addr[2] = pt;
64  addr[3] = charge;
65  return Lookup(idx, addr) [0];
66  };
67 
69  unsigned SpecificLookup_cphi_ofs (int idx, unsigned phi_fine, unsigned eta, unsigned pt, unsigned charge) const {
70  std::vector<unsigned> addr(4);
71  addr[0] = phi_fine;
72  addr[1] = eta;
73  addr[2] = pt;
74  addr[3] = charge;
75  return Lookup(idx, addr) [1];
76  };
77 
79  unsigned SpecificLookup (int idx, unsigned phi_fine, unsigned eta, unsigned pt, unsigned charge) const {
80  std::vector<unsigned> addr(4);
81  addr[0] = phi_fine;
82  addr[1] = eta;
83  addr[2] = pt;
84  addr[3] = charge;
85  return LookupPacked(idx, addr);
86  };
87 
88 
89 
91 
92  virtual unsigned LookupFunctionPacked (int idx, unsigned address) const {
93  std::vector<unsigned> addr = u2vec(address, m_Inputs);
94  return TheLookupFunction(idx ,addr[0] ,addr[1] ,addr[2] ,addr[3]);
95 
96  };
97 
98  private:
100  void InitParameters();
101 
103  unsigned TheLookupFunction (int idx, unsigned phi_fine, unsigned eta, unsigned pt, unsigned charge) const;
104 
106  float m_calo_align; // angle between nominal phi=0 and start of calo region 0
107 };
108 #endif
109 
110 
111 
112 
113 
114 
115 
116 
117 
118 
119 
120 
121 
122 
123 
124 
125 
126 
127 
char * address
Definition: mlp_lapack.h:14
virtual ~L1MuGMTMIAUPhiPro1LUT()
destructor
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:117
double charge(const std::vector< uint8_t > &Ampls)
unsigned SpecificLookup(int idx, unsigned phi_fine, unsigned eta, unsigned pt, unsigned charge) const
specific lookup function for entire output field
void InitParameters()
Initialize scales, configuration parameters, alignment constants, ...
unsigned SpecificLookup_cphi_fine(int idx, unsigned phi_fine, unsigned eta, unsigned pt, unsigned charge) const
specific lookup function for cphi_fine
std::vector< port > m_Inputs
Definition: L1MuGMTLUT.h:203
L1MuGMTMIAUPhiPro1LUT()
constuctor using function-lookup
unsigned SpecificLookup_cphi_ofs(int idx, unsigned phi_fine, unsigned eta, unsigned pt, unsigned charge) const
specific lookup function for cphi_ofs
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
unsigned TheLookupFunction(int idx, unsigned phi_fine, unsigned eta, unsigned pt, unsigned charge) const
The lookup function - here the functionality of the LUT is implemented.
std::vector< unsigned > u2vec(unsigned value, const std::vector< port > &widths) const
generate composite address or value from compact unsigned
Definition: L1MuGMTLUT.h:241
virtual unsigned LookupFunctionPacked(int idx, unsigned address) const
access to lookup function with packed input and output
float m_calo_align
Private data members (LUT parameters);.
unsigned LookupPacked(int idx, unsigned) const
Definition: L1MuGMTLUT.h:262