CMS 3D CMS Logo

L1MuGMTLFMergeRankCombineLUT.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_L1MuGMTLFMergeRankCombineLUT_h
19 #define L1TriggerGlobalMuonTrigger_L1MuGMTLFMergeRankCombineLUT_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("LFMergeRankCombine",
45  "DT BRPC CSC FRPC",
46  "rank_etaq(7) rank_ptq(2) rank_etaphi(1)",
47  "merge_rank(8)",
48  9,
49  false) {
51  };
52 
55 
57  unsigned SpecificLookup_merge_rank(int idx, unsigned rank_etaq, unsigned rank_ptq, unsigned rank_etaphi) const {
58  std::vector<unsigned> addr(3);
59  addr[0] = rank_etaq;
60  addr[1] = rank_ptq;
61  addr[2] = rank_etaphi;
62  return Lookup(idx, addr)[0];
63  };
64 
66  unsigned SpecificLookup(int idx, unsigned rank_etaq, unsigned rank_ptq, unsigned rank_etaphi) const {
67  std::vector<unsigned> addr(3);
68  addr[0] = rank_etaq;
69  addr[1] = rank_ptq;
70  addr[2] = rank_etaphi;
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 rank_etaq, unsigned rank_ptq, unsigned rank_etaphi) const;
87 
89 };
90 #endif
funct::false
false
Definition: Factorize.h:34
L1MuGMTLUT::m_Inputs
std::vector< port > m_Inputs
Definition: L1MuGMTLUT.h:214
L1MuGMTLFMergeRankCombineLUT::CSC
Definition: L1MuGMTLFMergeRankCombineLUT.h:40
charmTagsComputerCvsB_cfi.idx
idx
Definition: charmTagsComputerCvsB_cfi.py:108
L1MuGMTLFMergeRankCombineLUT::~L1MuGMTLFMergeRankCombineLUT
~L1MuGMTLFMergeRankCombineLUT() override
destructor
Definition: L1MuGMTLFMergeRankCombineLUT.h:54
L1MuGMTLFMergeRankCombineLUT::L1MuGMTLFMergeRankCombineLUT
L1MuGMTLFMergeRankCombineLUT()
constuctor using function-lookup
Definition: L1MuGMTLFMergeRankCombineLUT.h:43
L1MuGMTLFMergeRankCombineLUT::InitParameters
void InitParameters()
Initialize scales, configuration parameters, alignment constants, ...
Definition: L1MuGMTLFMergeRankCombineLUT.cc:32
L1MuGMTLFMergeRankCombineLUT::LookupFunctionPacked
unsigned LookupFunctionPacked(int idx, unsigned address) const override
access to lookup function with packed input and output
Definition: L1MuGMTLFMergeRankCombineLUT.h:76
generateTowerEtThresholdLUT.addr
addr
Definition: generateTowerEtThresholdLUT.py:57
L1MuGMTLFMergeRankCombineLUT::SpecificLookup
unsigned SpecificLookup(int idx, unsigned rank_etaq, unsigned rank_ptq, unsigned rank_etaphi) const
specific lookup function for entire output field
Definition: L1MuGMTLFMergeRankCombineLUT.h:66
L1MuGMTLUT.h
L1MuGMTLFMergeRankCombineLUT::BRPC
Definition: L1MuGMTLFMergeRankCombineLUT.h:40
L1MuGMTLUT
Definition: L1MuGMTLUT.h:73
L1MuGMTLUT::LookupPacked
unsigned LookupPacked(int idx, unsigned) const
Definition: L1MuGMTLUT.h:272
L1MuGMTLFMergeRankCombineLUT::SpecificLookup_merge_rank
unsigned SpecificLookup_merge_rank(int idx, unsigned rank_etaq, unsigned rank_ptq, unsigned rank_etaphi) const
specific lookup function for merge_rank
Definition: L1MuGMTLFMergeRankCombineLUT.h:57
L1MuGMTLFMergeRankCombineLUT::FRPC
Definition: L1MuGMTLFMergeRankCombineLUT.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
L1MuGMTLFMergeRankCombineLUT
Definition: L1MuGMTLFMergeRankCombineLUT.h:38
L1MuGMTLFMergeRankCombineLUT::TheLookupFunction
unsigned TheLookupFunction(int idx, unsigned rank_etaq, unsigned rank_ptq, unsigned rank_etaphi) const
The lookup function - here the functionality of the LUT is implemented.
Definition: L1MuGMTLFMergeRankCombineLUT.cc:38
L1MuGMTLUT::Lookup
std::vector< unsigned > Lookup(int idx, const std::vector< unsigned > &address) const
additional lookup function (std::vector -> vector)
Definition: L1MuGMTLUT.h:121
L1MuGMTLFMergeRankCombineLUT::DT
Definition: L1MuGMTLFMergeRankCombineLUT.h:40