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 //
11 // Author :
12 // H. Sakulin HEPHY Vienna
13 //
14 // Migrated to CMSSW:
15 // I. Mikulec
16 //
17 //--------------------------------------------------
18 #ifndef L1TriggerGlobalMuonTrigger_L1MuGMTMIAUPhiPro1LUT_h
19 #define L1TriggerGlobalMuonTrigger_L1MuGMTMIAUPhiPro1LUT_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  L1MuGMTMIAUPhiPro1LUT() : L1MuGMTLUT("MIAUPhiPro1",
47  "MIP_DT MIP_BRPC ISO_DT ISO_BRPC MIP_CSC MIP_FRPC ISO_CSC ISO_FRPC",
48  "phi_fine(3) eta(4) pt(5) charge(1)",
49  "cphi_fine(1) cphi_ofs(3)", 11, false) {
51  } ;
52 
54  virtual ~L1MuGMTMIAUPhiPro1LUT() {};
55 
57  unsigned SpecificLookup_cphi_fine (int idx, unsigned phi_fine, unsigned eta, unsigned pt, unsigned charge) const {
58  std::vector<unsigned> addr(4);
59  addr[0] = phi_fine;
60  addr[1] = eta;
61  addr[2] = pt;
62  addr[3] = charge;
63  return Lookup(idx, addr) [0];
64  };
65 
67  unsigned SpecificLookup_cphi_ofs (int idx, unsigned phi_fine, unsigned eta, unsigned pt, unsigned charge) const {
68  std::vector<unsigned> addr(4);
69  addr[0] = phi_fine;
70  addr[1] = eta;
71  addr[2] = pt;
72  addr[3] = charge;
73  return Lookup(idx, addr) [1];
74  };
75 
77  unsigned SpecificLookup (int idx, unsigned phi_fine, unsigned eta, unsigned pt, unsigned charge) const {
78  std::vector<unsigned> addr(4);
79  addr[0] = phi_fine;
80  addr[1] = eta;
81  addr[2] = pt;
82  addr[3] = charge;
83  return LookupPacked(idx, addr);
84  };
85 
86 
87 
89 
90  virtual unsigned LookupFunctionPacked (int idx, unsigned address) const {
91  std::vector<unsigned> addr = u2vec(address, m_Inputs);
92  return TheLookupFunction(idx ,addr[0] ,addr[1] ,addr[2] ,addr[3]);
93 
94  };
95 
96  private:
98  void InitParameters();
99 
101  unsigned TheLookupFunction (int idx, unsigned phi_fine, unsigned eta, unsigned pt, unsigned charge) const;
102 
104  float m_calo_align; // angle between nominal phi=0 and start of calo region 0
105 };
106 #endif
107 
108 
109 
110 
111 
112 
113 
114 
115 
116 
117 
118 
119 
120 
121 
122 
123 
124 
125 
virtual ~L1MuGMTMIAUPhiPro1LUT()
destructor
std::vector< unsigned > Lookup(int idx, const std::vector< unsigned > &address) const
additional lookup function (std::vector -&gt; vector)
Definition: L1MuGMTLUT.h:115
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:201
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:239
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);.
volatile std::atomic< bool > shutdown_flag false
unsigned LookupPacked(int idx, unsigned) const
Definition: L1MuGMTLUT.h:260