CMS 3D CMS Logo

L1MuGMTLFDeltaEtaLUT.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_L1MuGMTLFDeltaEtaLUT_h
19 #define L1TriggerGlobalMuonTrigger_L1MuGMTLFDeltaEtaLUT_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:
43  enum {DTRPC, CSCRPC};
44 
46  L1MuGMTLFDeltaEtaLUT() : L1MuGMTLUT("LFDeltaEta",
47  "DTRPC CSCRPC",
48  "eta_dtcsc(6) eta_rpc(6)",
49  "delta_eta(4)", 10, false) {
51  } ;
52 
54  ~L1MuGMTLFDeltaEtaLUT() override {};
55 
57  unsigned SpecificLookup_delta_eta (int idx, unsigned eta_dtcsc, unsigned eta_rpc) const {
58  std::vector<unsigned> addr(2);
59  addr[0] = eta_dtcsc;
60  addr[1] = eta_rpc;
61  return Lookup(idx, addr) [0];
62  };
63 
65  unsigned SpecificLookup (int idx, unsigned eta_dtcsc, unsigned eta_rpc) const {
66  std::vector<unsigned> addr(2);
67  addr[0] = eta_dtcsc;
68  addr[1] = eta_rpc;
69  return LookupPacked(idx, addr);
70  };
71 
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]);
79 
80  };
81 
82  private:
84  void InitParameters();
85 
87  unsigned TheLookupFunction (int idx, unsigned eta_dtcsc, unsigned eta_rpc) const;
88 
89 };
90 #endif
void InitParameters()
Initialize scales, configuration parameters, alignment constants, ...
L1MuGMTLFDeltaEtaLUT()
constuctor using function-lookup
unsigned TheLookupFunction(int idx, unsigned eta_dtcsc, unsigned eta_rpc) const
The lookup function - here the functionality of the LUT is implemented.
std::vector< unsigned > Lookup(int idx, const std::vector< unsigned > &address) const
additional lookup function (std::vector -> vector)
Definition: L1MuGMTLUT.h:115
unsigned LookupFunctionPacked(int idx, unsigned address) const override
access to lookup function with packed input and output
unsigned SpecificLookup_delta_eta(int idx, unsigned eta_dtcsc, unsigned eta_rpc) const
specific lookup function for delta_eta
std::vector< port > m_Inputs
Definition: L1MuGMTLUT.h:201
~L1MuGMTLFDeltaEtaLUT() override
destructor
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 SpecificLookup(int idx, unsigned eta_dtcsc, unsigned eta_rpc) const
specific lookup function for entire output field
unsigned LookupPacked(int idx, unsigned) const
Definition: L1MuGMTLUT.h:260