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 //
11 // Author :
12 // H. Sakulin HEPHY Vienna
13 //
14 // Migrated to CMSSW:
15 // I. Mikulec
16 //
17 //--------------------------------------------------
18 #ifndef L1TriggerGlobalMuonTrigger_L1MuGMTMIAUPhiPro2LUT_h
19 #define L1TriggerGlobalMuonTrigger_L1MuGMTMIAUPhiPro2LUT_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 // ---------------------
37 // -- Class Interface --
38 // ---------------------
39 
40 
42 
43  public:
45 
47  L1MuGMTMIAUPhiPro2LUT() : L1MuGMTLUT("MIAUPhiPro2",
48  "MIP_DT MIP_BRPC ISO_DT ISO_BRPC MIP_CSC MIP_FRPC ISO_CSC ISO_FRPC",
49  "cphi_start(5) cphi_fine(1) cphi_ofs(3) charge(1)",
50  "phi_sel(18)", 11, false) {
52  } ;
53 
55  virtual ~L1MuGMTMIAUPhiPro2LUT() {};
56 
58  unsigned SpecificLookup_phi_sel (int idx, unsigned cphi_start, unsigned cphi_fine, unsigned cphi_ofs, unsigned charge) const {
59  std::vector<unsigned> addr(4);
60  addr[0] = cphi_start;
61  addr[1] = cphi_fine;
62  addr[2] = cphi_ofs;
63  addr[3] = charge;
64  return Lookup(idx, addr) [0];
65  };
66 
68  unsigned SpecificLookup (int idx, unsigned cphi_start, unsigned cphi_fine, unsigned cphi_ofs, unsigned charge) const {
69  std::vector<unsigned> addr(4);
70  addr[0] = cphi_start;
71  addr[1] = cphi_fine;
72  addr[2] = cphi_ofs;
73  addr[3] = charge;
74  return LookupPacked(idx, addr);
75  };
76 
77 
78 
80 
81  virtual unsigned LookupFunctionPacked (int idx, unsigned address) const {
82  std::vector<unsigned> addr = u2vec(address, m_Inputs);
83  return TheLookupFunction(idx ,addr[0] ,addr[1] ,addr[2] ,addr[3]);
84 
85  };
86 
87  private:
89  void InitParameters();
90 
92  unsigned TheLookupFunction (int idx, unsigned cphi_start, unsigned cphi_fine, unsigned cphi_ofs, unsigned charge) const;
93 
96 };
97 #endif
98 
99 
100 
101 
102 
103 
104 
105 
106 
107 
108 
109 
110 
111 
112 
113 
114 
115 
116 
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:115
double charge(const std::vector< uint8_t > &Ampls)
L1MuGMTMIAUPhiPro2LUT()
constuctor using function-lookup
std::vector< port > m_Inputs
Definition: L1MuGMTLUT.h:201
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:239
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.
volatile std::atomic< bool > shutdown_flag false
unsigned LookupPacked(int idx, unsigned) const
Definition: L1MuGMTLUT.h:260