CMS 3D CMS Logo

L1MuGMTMIAUEtaProLUT.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_L1MuGMTMIAUEtaProLUT_h
19 #define L1TriggerGlobalMuonTrigger_L1MuGMTMIAUEtaProLUT_h
20 
21 //---------------
22 // C++ Headers --
23 //---------------
24 
25 //----------------------
26 // Base Class Headers --
27 //----------------------
29 
30 //------------------------------------
31 // Collaborating Class Declarations --
32 //------------------------------------
33 
34 // ---------------------
35 // -- Class Interface --
36 // ---------------------
37 
39 public:
41 
44  : L1MuGMTLUT("MIAUEtaPro",
45  "MIP_DT MIP_BRPC ISO_DT ISO_BRPC MIP_CSC MIP_FRPC ISO_CSC ISO_FRPC",
46  "eta(6) pt(5) charge(1)",
47  "eta_sel(10)",
48  12,
49  false) {
51  };
52 
54  ~L1MuGMTMIAUEtaProLUT() override {}
55 
57  unsigned SpecificLookup_eta_sel(int idx, unsigned eta, unsigned pt, unsigned charge) const {
58  std::vector<unsigned> addr(3);
59  addr[0] = eta;
60  addr[1] = pt;
61  addr[2] = charge;
62  return Lookup(idx, addr)[0];
63  };
64 
66  unsigned SpecificLookup(int idx, unsigned eta, unsigned pt, unsigned charge) const {
67  std::vector<unsigned> addr(3);
68  addr[0] = eta;
69  addr[1] = pt;
70  addr[2] = charge;
71  return LookupPacked(idx, addr);
72  };
73 
75 
76  unsigned LookupFunctionPacked(int idx, unsigned address) const override {
77  std::vector<unsigned> addr = u2vec(address, m_Inputs);
78  return TheLookupFunction(idx, addr[0], addr[1], addr[2]);
79  };
80 
81 private:
83  void InitParameters();
84 
86  unsigned TheLookupFunction(int idx, unsigned eta, unsigned pt, unsigned charge) const;
87 
90  static float caloEtaBounds[15];
91 };
92 #endif
unsigned SpecificLookup_eta_sel(int idx, unsigned eta, unsigned pt, unsigned charge) const
specific lookup function for eta_sel
int m_IsolationCellSizeEta
Private data members (LUT parameters);.
static float caloEtaBounds[15]
unsigned LookupPacked(int idx, unsigned) const
Definition: L1MuGMTLUT.h:272
unsigned LookupFunctionPacked(int idx, unsigned address) const override
access to lookup function with packed input and output
std::vector< unsigned > u2vec(unsigned value, const std::vector< port > &widths) const
generate composite address or value from compact unsigned
Definition: L1MuGMTLUT.h:251
std::vector< unsigned > Lookup(int idx, const std::vector< unsigned > &address) const
additional lookup function (std::vector -> vector)
Definition: L1MuGMTLUT.h:121
unsigned SpecificLookup(int idx, unsigned eta, unsigned pt, unsigned charge) const
specific lookup function for entire output field
std::vector< port > m_Inputs
Definition: L1MuGMTLUT.h:214
~L1MuGMTMIAUEtaProLUT() override
destructor
void InitParameters()
Initialize scales, configuration parameters, alignment constants, ...
L1MuGMTMIAUEtaProLUT()
constuctor using function-lookup
unsigned TheLookupFunction(int idx, unsigned eta, unsigned pt, unsigned charge) const
The lookup function - here the functionality of the LUT is implemented.