CMS 3D CMS Logo

L1MuGMTLFPhiProEtaConvLUT.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_L1MuGMTLFPhiProEtaConvLUT_h
19 #define L1TriggerGlobalMuonTrigger_L1MuGMTLFPhiProEtaConvLUT_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 
43  L1MuGMTLFPhiProEtaConvLUT() : L1MuGMTLUT("LFPhiProEtaConv", "DT BRPC CSC FRPC", "eta_in(6)", "eta_out(4)", 6, true) {
45  };
46 
49 
51  unsigned SpecificLookup_eta_out(int idx, unsigned eta_in) const {
52  std::vector<unsigned> addr(1);
53  addr[0] = eta_in;
54  return Lookup(idx, addr)[0];
55  };
56 
58  unsigned SpecificLookup(int idx, unsigned eta_in) const {
59  std::vector<unsigned> addr(1);
60  addr[0] = eta_in;
61  return LookupPacked(idx, addr);
62  };
63 
65 
66  unsigned LookupFunctionPacked(int idx, unsigned address) const override {
67  std::vector<unsigned> addr = u2vec(address, m_Inputs);
68  return TheLookupFunction(idx, addr[0]);
69  };
70 
71 private:
73  void InitParameters();
74 
76  unsigned TheLookupFunction(int idx, unsigned eta_in) const;
77 
79 };
80 #endif
L1MuGMTLUT::m_Inputs
std::vector< port > m_Inputs
Definition: L1MuGMTLUT.h:214
L1MuGMTLFPhiProEtaConvLUT
Definition: L1MuGMTLFPhiProEtaConvLUT.h:38
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
generateTowerEtThresholdLUT.addr
addr
Definition: generateTowerEtThresholdLUT.py:57
L1MuGMTLFPhiProEtaConvLUT::DT
Definition: L1MuGMTLFPhiProEtaConvLUT.h:40
L1MuGMTLFPhiProEtaConvLUT::LookupFunctionPacked
unsigned LookupFunctionPacked(int idx, unsigned address) const override
access to lookup function with packed input and output
Definition: L1MuGMTLFPhiProEtaConvLUT.h:66
L1MuGMTLUT.h
funct::true
true
Definition: Factorize.h:173
L1MuGMTLFPhiProEtaConvLUT::BRPC
Definition: L1MuGMTLFPhiProEtaConvLUT.h:40
L1MuGMTLFPhiProEtaConvLUT::~L1MuGMTLFPhiProEtaConvLUT
~L1MuGMTLFPhiProEtaConvLUT() override
destructor
Definition: L1MuGMTLFPhiProEtaConvLUT.h:48
L1MuGMTLFPhiProEtaConvLUT::FRPC
Definition: L1MuGMTLFPhiProEtaConvLUT.h:40
L1MuGMTLFPhiProEtaConvLUT::TheLookupFunction
unsigned TheLookupFunction(int idx, unsigned eta_in) const
The lookup function - here the functionality of the LUT is implemented.
Definition: L1MuGMTLFPhiProEtaConvLUT.cc:50
L1MuGMTLUT
Definition: L1MuGMTLUT.h:73
L1MuGMTLUT::LookupPacked
unsigned LookupPacked(int idx, unsigned) const
Definition: L1MuGMTLUT.h:272
L1MuGMTLFPhiProEtaConvLUT::CSC
Definition: L1MuGMTLFPhiProEtaConvLUT.h:40
L1MuGMTLFPhiProEtaConvLUT::SpecificLookup_eta_out
unsigned SpecificLookup_eta_out(int idx, unsigned eta_in) const
specific lookup function for eta_out
Definition: L1MuGMTLFPhiProEtaConvLUT.h:51
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
L1MuGMTLFPhiProEtaConvLUT::L1MuGMTLFPhiProEtaConvLUT
L1MuGMTLFPhiProEtaConvLUT()
constuctor using function-lookup
Definition: L1MuGMTLFPhiProEtaConvLUT.h:43
L1MuGMTLFPhiProEtaConvLUT::SpecificLookup
unsigned SpecificLookup(int idx, unsigned eta_in) const
specific lookup function for entire output field
Definition: L1MuGMTLFPhiProEtaConvLUT.h:58
L1MuGMTLUT::Lookup
std::vector< unsigned > Lookup(int idx, const std::vector< unsigned > &address) const
additional lookup function (std::vector -> vector)
Definition: L1MuGMTLUT.h:121
L1MuGMTLFPhiProEtaConvLUT::InitParameters
void InitParameters()
Initialize scales, configuration parameters, alignment constants, ...
Definition: L1MuGMTLFPhiProEtaConvLUT.cc:40