CMS 3D CMS Logo

L1MuGMTLFMergeRankEtaQLUT.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_L1MuGMTLFMergeRankEtaQLUT_h
19 #define L1TriggerGlobalMuonTrigger_L1MuGMTLFMergeRankEtaQLUT_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:
40  enum { DT, BRPC, CSC, FRPC };
41 
44  : L1MuGMTLUT("LFMergeRankEtaQ", "DT BRPC CSC FRPC", "eta(6) q(3)", "flag(1) rank_etaq(7)", 8, false) {
46  };
47 
50 
52  unsigned SpecificLookup_flag(int idx, unsigned eta, unsigned q) const {
53  std::vector<unsigned> addr(2);
54  addr[0] = eta;
55  addr[1] = q;
56  return Lookup(idx, addr)[0];
57  };
58 
60  unsigned SpecificLookup_rank_etaq(int idx, unsigned eta, unsigned q) const {
61  std::vector<unsigned> addr(2);
62  addr[0] = eta;
63  addr[1] = q;
64  return Lookup(idx, addr)[1];
65  };
66 
68  unsigned SpecificLookup(int idx, unsigned eta, unsigned q) const {
69  std::vector<unsigned> addr(2);
70  addr[0] = eta;
71  addr[1] = q;
72  return LookupPacked(idx, addr);
73  };
74 
76 
77  unsigned LookupFunctionPacked(int idx, unsigned address) const override {
78  std::vector<unsigned> addr = u2vec(address, m_Inputs);
79  return TheLookupFunction(idx, addr[0], addr[1]);
80  };
81 
82 private:
84  void InitParameters();
85 
87  unsigned TheLookupFunction(int idx, unsigned eta, unsigned q) const;
88 
90 };
91 #endif
L1MuGMTLFMergeRankEtaQLUT::L1MuGMTLFMergeRankEtaQLUT
L1MuGMTLFMergeRankEtaQLUT()
constuctor using function-lookup
Definition: L1MuGMTLFMergeRankEtaQLUT.h:43
funct::false
false
Definition: Factorize.h:34
L1MuGMTLFMergeRankEtaQLUT::SpecificLookup_rank_etaq
unsigned SpecificLookup_rank_etaq(int idx, unsigned eta, unsigned q) const
specific lookup function for rank_etaq
Definition: L1MuGMTLFMergeRankEtaQLUT.h:60
L1MuGMTLFMergeRankEtaQLUT::SpecificLookup_flag
unsigned SpecificLookup_flag(int idx, unsigned eta, unsigned q) const
specific lookup function for flag
Definition: L1MuGMTLFMergeRankEtaQLUT.h:52
L1MuGMTLUT::m_Inputs
std::vector< port > m_Inputs
Definition: L1MuGMTLUT.h:214
data-class-funcs.q
q
Definition: data-class-funcs.py:169
charmTagsComputerCvsB_cfi.idx
idx
Definition: charmTagsComputerCvsB_cfi.py:108
L1MuGMTLFMergeRankEtaQLUT::~L1MuGMTLFMergeRankEtaQLUT
~L1MuGMTLFMergeRankEtaQLUT() override
destructor
Definition: L1MuGMTLFMergeRankEtaQLUT.h:49
L1MuGMTLFMergeRankEtaQLUT
Definition: L1MuGMTLFMergeRankEtaQLUT.h:38
generateTowerEtThresholdLUT.addr
addr
Definition: generateTowerEtThresholdLUT.py:57
PVValHelper::eta
Definition: PVValidationHelpers.h:69
L1MuGMTLUT.h
L1MuGMTLFMergeRankEtaQLUT::InitParameters
void InitParameters()
Initialize scales, configuration parameters, alignment constants, ...
Definition: L1MuGMTLFMergeRankEtaQLUT.cc:36
L1MuGMTLFMergeRankEtaQLUT::SpecificLookup
unsigned SpecificLookup(int idx, unsigned eta, unsigned q) const
specific lookup function for entire output field
Definition: L1MuGMTLFMergeRankEtaQLUT.h:68
L1MuGMTLFMergeRankEtaQLUT::TheLookupFunction
unsigned TheLookupFunction(int idx, unsigned eta, unsigned q) const
The lookup function - here the functionality of the LUT is implemented.
Definition: L1MuGMTLFMergeRankEtaQLUT.cc:42
L1MuGMTLFMergeRankEtaQLUT::FRPC
Definition: L1MuGMTLFMergeRankEtaQLUT.h:40
L1MuGMTLUT
Definition: L1MuGMTLUT.h:73
L1MuGMTLUT::LookupPacked
unsigned LookupPacked(int idx, unsigned) const
Definition: L1MuGMTLUT.h:272
L1MuGMTLFMergeRankEtaQLUT::BRPC
Definition: L1MuGMTLFMergeRankEtaQLUT.h:40
L1MuGMTLFMergeRankEtaQLUT::DT
Definition: L1MuGMTLFMergeRankEtaQLUT.h:40
L1MuGMTLUT::u2vec
std::vector< unsigned > u2vec(unsigned value, const std::vector< port > &widths) const
generate composite address or value from compact unsigned
Definition: L1MuGMTLUT.h:251
L1MuGMTLUT::Lookup
std::vector< unsigned > Lookup(int idx, const std::vector< unsigned > &address) const
additional lookup function (std::vector -> vector)
Definition: L1MuGMTLUT.h:121
L1MuGMTLFMergeRankEtaQLUT::CSC
Definition: L1MuGMTLFMergeRankEtaQLUT.h:40
L1MuGMTLFMergeRankEtaQLUT::LookupFunctionPacked
unsigned LookupFunctionPacked(int idx, unsigned address) const override
access to lookup function with packed input and output
Definition: L1MuGMTLFMergeRankEtaQLUT.h:77