CMS 3D CMS Logo

L1MuGMTLFPtMixLUT.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_L1MuGMTLFPtMixLUT_h
19 #define L1TriggerGlobalMuonTrigger_L1MuGMTLFPtMixLUT_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 
38 class L1MuGMTLFPtMixLUT : public L1MuGMTLUT {
39 public:
40  enum { DTRPC, CSCRPC };
41 
43  L1MuGMTLFPtMixLUT() : L1MuGMTLUT("LFPtMix", "DTRPC CSCRPC", "pt_dtcsc(5) pt_rpc(5)", "pt_mixed(5)", 9, false) {
45  };
46 
48  ~L1MuGMTLFPtMixLUT() override{};
49 
51  unsigned SpecificLookup_pt_mixed(int idx, unsigned pt_dtcsc, unsigned pt_rpc) const {
52  std::vector<unsigned> addr(2);
53  addr[0] = pt_dtcsc;
54  addr[1] = pt_rpc;
55  return Lookup(idx, addr)[0];
56  };
57 
59  unsigned SpecificLookup(int idx, unsigned pt_dtcsc, unsigned pt_rpc) const {
60  std::vector<unsigned> addr(2);
61  addr[0] = pt_dtcsc;
62  addr[1] = pt_rpc;
63  return LookupPacked(idx, addr);
64  };
65 
67 
68  unsigned LookupFunctionPacked(int idx, unsigned address) const override {
69  std::vector<unsigned> addr = u2vec(address, m_Inputs);
70  return TheLookupFunction(idx, addr[0], addr[1]);
71  };
72 
73 private:
75  void InitParameters();
76 
78  unsigned TheLookupFunction(int idx, unsigned pt_dtcsc, unsigned pt_rpc) const;
79 
81 };
82 #endif
L1MuGMTLFPtMixLUT::SpecificLookup_pt_mixed
unsigned SpecificLookup_pt_mixed(int idx, unsigned pt_dtcsc, unsigned pt_rpc) const
specific lookup function for pt_mixed
Definition: L1MuGMTLFPtMixLUT.h:51
funct::false
false
Definition: Factorize.h:34
L1MuGMTLUT::m_Inputs
std::vector< port > m_Inputs
Definition: L1MuGMTLUT.h:214
L1MuGMTLFPtMixLUT::InitParameters
void InitParameters()
Initialize scales, configuration parameters, alignment constants, ...
Definition: L1MuGMTLFPtMixLUT.cc:32
charmTagsComputerCvsB_cfi.idx
idx
Definition: charmTagsComputerCvsB_cfi.py:108
generateTowerEtThresholdLUT.addr
addr
Definition: generateTowerEtThresholdLUT.py:57
L1MuGMTLFPtMixLUT::SpecificLookup
unsigned SpecificLookup(int idx, unsigned pt_dtcsc, unsigned pt_rpc) const
specific lookup function for entire output field
Definition: L1MuGMTLFPtMixLUT.h:59
L1MuGMTLFPtMixLUT::DTRPC
Definition: L1MuGMTLFPtMixLUT.h:40
L1MuGMTLFPtMixLUT::LookupFunctionPacked
unsigned LookupFunctionPacked(int idx, unsigned address) const override
access to lookup function with packed input and output
Definition: L1MuGMTLFPtMixLUT.h:68
L1MuGMTLUT.h
L1MuGMTLFPtMixLUT::TheLookupFunction
unsigned TheLookupFunction(int idx, unsigned pt_dtcsc, unsigned pt_rpc) const
The lookup function - here the functionality of the LUT is implemented.
Definition: L1MuGMTLFPtMixLUT.cc:38
L1MuGMTLUT
Definition: L1MuGMTLUT.h:73
L1MuGMTLUT::LookupPacked
unsigned LookupPacked(int idx, unsigned) const
Definition: L1MuGMTLUT.h:272
L1MuGMTLFPtMixLUT
Definition: L1MuGMTLFPtMixLUT.h:38
L1MuGMTLFPtMixLUT::~L1MuGMTLFPtMixLUT
~L1MuGMTLFPtMixLUT() override
destructor
Definition: L1MuGMTLFPtMixLUT.h:48
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
L1MuGMTLFPtMixLUT::CSCRPC
Definition: L1MuGMTLFPtMixLUT.h:40
L1MuGMTLUT::Lookup
std::vector< unsigned > Lookup(int idx, const std::vector< unsigned > &address) const
additional lookup function (std::vector -> vector)
Definition: L1MuGMTLUT.h:121
L1MuGMTLFPtMixLUT::L1MuGMTLFPtMixLUT
L1MuGMTLFPtMixLUT()
constuctor using function-lookup
Definition: L1MuGMTLFPtMixLUT.h:43