CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1MuGMTMIAUPhiPro2LUT.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_L1MuGMTMIAUPhiPro2LUT_h
21 #define L1TriggerGlobalMuonTrigger_L1MuGMTMIAUPhiPro2LUT_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 // ---------------------
39 // -- Class Interface --
40 // ---------------------
41 
42 
44 
45  public:
47 
49  L1MuGMTMIAUPhiPro2LUT() : L1MuGMTLUT("MIAUPhiPro2",
50  "MIP_DT MIP_BRPC ISO_DT ISO_BRPC MIP_CSC MIP_FRPC ISO_CSC ISO_FRPC",
51  "cphi_start(5) cphi_fine(1) cphi_ofs(3) charge(1)",
52  "phi_sel(18)", 11, false) {
54  } ;
55 
57  virtual ~L1MuGMTMIAUPhiPro2LUT() {};
58 
60  unsigned SpecificLookup_phi_sel (int idx, unsigned cphi_start, unsigned cphi_fine, unsigned cphi_ofs, unsigned charge) const {
61  std::vector<unsigned> addr(4);
62  addr[0] = cphi_start;
63  addr[1] = cphi_fine;
64  addr[2] = cphi_ofs;
65  addr[3] = charge;
66  return Lookup(idx, addr) [0];
67  };
68 
70  unsigned SpecificLookup (int idx, unsigned cphi_start, unsigned cphi_fine, unsigned cphi_ofs, unsigned charge) const {
71  std::vector<unsigned> addr(4);
72  addr[0] = cphi_start;
73  addr[1] = cphi_fine;
74  addr[2] = cphi_ofs;
75  addr[3] = charge;
76  return LookupPacked(idx, addr);
77  };
78 
79 
80 
82 
83  virtual unsigned LookupFunctionPacked (int idx, unsigned address) const {
84  std::vector<unsigned> addr = u2vec(address, m_Inputs);
85  return TheLookupFunction(idx ,addr[0] ,addr[1] ,addr[2] ,addr[3]);
86 
87  };
88 
89  private:
91  void InitParameters();
92 
94  unsigned TheLookupFunction (int idx, unsigned cphi_start, unsigned cphi_fine, unsigned cphi_ofs, unsigned charge) const;
95 
98 };
99 #endif
100 
101 
102 
103 
104 
105 
106 
107 
108 
109 
110 
111 
112 
113 
114 
115 
116 
117 
118 
char * address
Definition: mlp_lapack.h:14
virtual unsigned LookupFunctionPacked(int idx, unsigned address) const
access to lookup function with packed input and output
int m_IsolationCellSizePhi
Private data members (LUT parameters);.
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)
L1MuGMTMIAUPhiPro2LUT()
constuctor using function-lookup
std::vector< port > m_Inputs
Definition: L1MuGMTLUT.h:203
unsigned SpecificLookup_phi_sel(int idx, unsigned cphi_start, unsigned cphi_fine, unsigned cphi_ofs, unsigned charge) const
specific lookup function for phi_sel
void InitParameters()
Initialize scales, configuration parameters, alignment constants, ...
virtual ~L1MuGMTMIAUPhiPro2LUT()
destructor
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
unsigned SpecificLookup(int idx, unsigned cphi_start, unsigned cphi_fine, unsigned cphi_ofs, unsigned charge) const
specific lookup function for entire output field
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 TheLookupFunction(int idx, unsigned cphi_start, unsigned cphi_fine, unsigned cphi_ofs, unsigned charge) const
The lookup function - here the functionality of the LUT is implemented.
unsigned LookupPacked(int idx, unsigned) const
Definition: L1MuGMTLUT.h:262