CMS 3D CMS Logo

L1MuGMTLFMergeRankEtaPhiLUT.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_L1MuGMTLFMergeRankEtaPhiLUT_h
19 #define L1TriggerGlobalMuonTrigger_L1MuGMTLFMergeRankEtaPhiLUT_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("LFMergeRankEtaPhi", "DT BRPC CSC FRPC", "eta(6) phi(8)", "rank_etaphi(1)", 10, false) {
46  };
47 
50 
52  unsigned SpecificLookup_rank_etaphi(int idx, unsigned eta, unsigned phi) const {
53  std::vector<unsigned> addr(2);
54  addr[0] = eta;
55  addr[1] = phi;
56  return Lookup(idx, addr)[0];
57  };
58 
60  unsigned SpecificLookup(int idx, unsigned eta, unsigned phi) const {
61  std::vector<unsigned> addr(2);
62  addr[0] = eta;
63  addr[1] = phi;
64  return LookupPacked(idx, addr);
65  };
66 
68 
69  unsigned LookupFunctionPacked(int idx, unsigned address) const override {
70  std::vector<unsigned> addr = u2vec(address, m_Inputs);
71  return TheLookupFunction(idx, addr[0], addr[1]);
72  };
73 
74 private:
76  void InitParameters();
77 
79  unsigned TheLookupFunction(int idx, unsigned eta, unsigned phi) const;
80 
82 };
83 #endif
L1MuGMTLFMergeRankEtaPhiLUT::FRPC
Definition: L1MuGMTLFMergeRankEtaPhiLUT.h:40
funct::false
false
Definition: Factorize.h:29
L1MuGMTLFMergeRankEtaPhiLUT::~L1MuGMTLFMergeRankEtaPhiLUT
~L1MuGMTLFMergeRankEtaPhiLUT() override
destructor
Definition: L1MuGMTLFMergeRankEtaPhiLUT.h:49
L1MuGMTLUT::m_Inputs
std::vector< port > m_Inputs
Definition: L1MuGMTLUT.h:214
L1MuGMTLFMergeRankEtaPhiLUT::SpecificLookup_rank_etaphi
unsigned SpecificLookup_rank_etaphi(int idx, unsigned eta, unsigned phi) const
specific lookup function for rank_etaphi
Definition: L1MuGMTLFMergeRankEtaPhiLUT.h:52
L1MuGMTLFMergeRankEtaPhiLUT::SpecificLookup
unsigned SpecificLookup(int idx, unsigned eta, unsigned phi) const
specific lookup function for entire output field
Definition: L1MuGMTLFMergeRankEtaPhiLUT.h:60
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
generateTowerEtThresholdLUT.addr
addr
Definition: generateTowerEtThresholdLUT.py:57
L1MuGMTLFMergeRankEtaPhiLUT
Definition: L1MuGMTLFMergeRankEtaPhiLUT.h:38
PVValHelper::eta
Definition: PVValidationHelpers.h:69
L1MuGMTLUT.h
L1MuGMTLFMergeRankEtaPhiLUT::LookupFunctionPacked
unsigned LookupFunctionPacked(int idx, unsigned address) const override
access to lookup function with packed input and output
Definition: L1MuGMTLFMergeRankEtaPhiLUT.h:69
L1MuGMTLUT
Definition: L1MuGMTLUT.h:73
L1MuGMTLUT::LookupPacked
unsigned LookupPacked(int idx, unsigned) const
Definition: L1MuGMTLUT.h:272
DDAxes::phi
L1MuGMTLFMergeRankEtaPhiLUT::BRPC
Definition: L1MuGMTLFMergeRankEtaPhiLUT.h:40
L1MuGMTLFMergeRankEtaPhiLUT::InitParameters
void InitParameters()
Initialize scales, configuration parameters, alignment constants, ...
Definition: L1MuGMTLFMergeRankEtaPhiLUT.cc:32
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
L1MuGMTLFMergeRankEtaPhiLUT::DT
Definition: L1MuGMTLFMergeRankEtaPhiLUT.h:40
L1MuGMTLFMergeRankEtaPhiLUT::L1MuGMTLFMergeRankEtaPhiLUT
L1MuGMTLFMergeRankEtaPhiLUT()
constuctor using function-lookup
Definition: L1MuGMTLFMergeRankEtaPhiLUT.h:43
L1MuGMTLUT::Lookup
std::vector< unsigned > Lookup(int idx, const std::vector< unsigned > &address) const
additional lookup function (std::vector -> vector)
Definition: L1MuGMTLUT.h:121
L1MuGMTLFMergeRankEtaPhiLUT::TheLookupFunction
unsigned TheLookupFunction(int idx, unsigned eta, unsigned phi) const
The lookup function - here the functionality of the LUT is implemented.
Definition: L1MuGMTLFMergeRankEtaPhiLUT.cc:38
L1MuGMTLFMergeRankEtaPhiLUT::CSC
Definition: L1MuGMTLFMergeRankEtaPhiLUT.h:40