CMS 3D CMS Logo

L1MuGMTMIAUEtaConvLUT.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_L1MuGMTMIAUEtaConvLUT_h
19 #define L1TriggerGlobalMuonTrigger_L1MuGMTMIAUEtaConvLUT_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("MIAUEtaConv",
45  "MIP_DT MIP_BRPC ISO_DT ISO_BRPC MIP_CSC MIP_FRPC ISO_CSC ISO_FRPC",
46  "eta_in(6)",
47  "eta_out(4)",
48  6,
49  true) {
51  };
52 
54  ~L1MuGMTMIAUEtaConvLUT() override{};
55 
57  unsigned SpecificLookup_eta_out(int idx, unsigned eta_in) const {
58  std::vector<unsigned> addr(1);
59  addr[0] = eta_in;
60  return Lookup(idx, addr)[0];
61  };
62 
64  unsigned SpecificLookup(int idx, unsigned eta_in) const {
65  std::vector<unsigned> addr(1);
66  addr[0] = eta_in;
67  return LookupPacked(idx, addr);
68  };
69 
71 
72  unsigned LookupFunctionPacked(int idx, unsigned address) const override {
73  std::vector<unsigned> addr = u2vec(address, m_Inputs);
74  return TheLookupFunction(idx, addr[0]);
75  };
76 
77 private:
79  void InitParameters();
80 
82  unsigned TheLookupFunction(int idx, unsigned eta_in) const;
83 
85 };
86 #endif
L1MuGMTMIAUEtaConvLUT::L1MuGMTMIAUEtaConvLUT
L1MuGMTMIAUEtaConvLUT()
constuctor using function-lookup
Definition: L1MuGMTMIAUEtaConvLUT.h:43
L1MuGMTMIAUEtaConvLUT::MIP_BRPC
Definition: L1MuGMTMIAUEtaConvLUT.h:40
L1MuGMTMIAUEtaConvLUT::SpecificLookup
unsigned SpecificLookup(int idx, unsigned eta_in) const
specific lookup function for entire output field
Definition: L1MuGMTMIAUEtaConvLUT.h:64
L1MuGMTMIAUEtaConvLUT::TheLookupFunction
unsigned TheLookupFunction(int idx, unsigned eta_in) const
The lookup function - here the functionality of the LUT is implemented.
Definition: L1MuGMTMIAUEtaConvLUT.cc:53
L1MuGMTLUT::m_Inputs
std::vector< port > m_Inputs
Definition: L1MuGMTLUT.h:214
L1MuGMTMIAUEtaConvLUT::MIP_CSC
Definition: L1MuGMTMIAUEtaConvLUT.h:40
charmTagsComputerCvsB_cfi.idx
idx
Definition: charmTagsComputerCvsB_cfi.py:108
L1MuGMTMIAUEtaConvLUT
Definition: L1MuGMTMIAUEtaConvLUT.h:38
generateTowerEtThresholdLUT.addr
addr
Definition: generateTowerEtThresholdLUT.py:57
L1MuGMTMIAUEtaConvLUT::InitParameters
void InitParameters()
Initialize scales, configuration parameters, alignment constants, ...
Definition: L1MuGMTMIAUEtaConvLUT.cc:36
L1MuGMTLUT.h
funct::true
true
Definition: Factorize.h:173
L1MuGMTLUT
Definition: L1MuGMTLUT.h:73
L1MuGMTLUT::LookupPacked
unsigned LookupPacked(int idx, unsigned) const
Definition: L1MuGMTLUT.h:272
L1MuGMTMIAUEtaConvLUT::MIP_DT
Definition: L1MuGMTMIAUEtaConvLUT.h:40
L1MuGMTMIAUEtaConvLUT::ISO_DT
Definition: L1MuGMTMIAUEtaConvLUT.h:40
L1MuGMTMIAUEtaConvLUT::ISO_FRPC
Definition: L1MuGMTMIAUEtaConvLUT.h:40
L1MuGMTMIAUEtaConvLUT::ISO_CSC
Definition: L1MuGMTMIAUEtaConvLUT.h:40
L1MuGMTMIAUEtaConvLUT::MIP_FRPC
Definition: L1MuGMTMIAUEtaConvLUT.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
L1MuGMTMIAUEtaConvLUT::ISO_BRPC
Definition: L1MuGMTMIAUEtaConvLUT.h:40
L1MuGMTMIAUEtaConvLUT::SpecificLookup_eta_out
unsigned SpecificLookup_eta_out(int idx, unsigned eta_in) const
specific lookup function for eta_out
Definition: L1MuGMTMIAUEtaConvLUT.h:57
L1MuGMTMIAUEtaConvLUT::LookupFunctionPacked
unsigned LookupFunctionPacked(int idx, unsigned address) const override
access to lookup function with packed input and output
Definition: L1MuGMTMIAUEtaConvLUT.h:72
L1MuGMTLUT::Lookup
std::vector< unsigned > Lookup(int idx, const std::vector< unsigned > &address) const
additional lookup function (std::vector -> vector)
Definition: L1MuGMTLUT.h:121
L1MuGMTMIAUEtaConvLUT::~L1MuGMTMIAUEtaConvLUT
~L1MuGMTMIAUEtaConvLUT() override
destructor
Definition: L1MuGMTMIAUEtaConvLUT.h:54