CMS 3D CMS Logo

L1MuGMTLFPhiProLUT.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_L1MuGMTLFPhiProLUT_h
19 #define L1TriggerGlobalMuonTrigger_L1MuGMTLFPhiProLUT_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  L1MuGMTLFPhiProLUT() : L1MuGMTLUT("LFPhiPro", "DT BRPC CSC FRPC", "eta(4) pt(5) charge(1)", "dphi(9)", 10, false) {
45  };
46 
48  ~L1MuGMTLFPhiProLUT() override{};
49 
51  unsigned SpecificLookup_dphi(int idx, unsigned eta, unsigned pt, unsigned charge) const {
52  std::vector<unsigned> addr(3);
53  addr[0] = eta;
54  addr[1] = pt;
55  addr[2] = charge;
56  return Lookup(idx, addr)[0];
57  };
58 
60  unsigned SpecificLookup(int idx, unsigned eta, unsigned pt, unsigned charge) const {
61  std::vector<unsigned> addr(3);
62  addr[0] = eta;
63  addr[1] = pt;
64  addr[2] = charge;
65  return LookupPacked(idx, addr);
66  };
67 
69 
70  unsigned LookupFunctionPacked(int idx, unsigned address) const override {
71  std::vector<unsigned> addr = u2vec(address, m_Inputs);
72  return TheLookupFunction(idx, addr[0], addr[1], addr[2]);
73  };
74 
75 private:
77  void InitParameters();
78 
80  unsigned TheLookupFunction(int idx, unsigned eta, unsigned pt, unsigned charge) const;
81 
83 };
84 #endif
L1MuGMTLFPhiProLUT::CSC
Definition: L1MuGMTLFPhiProLUT.h:40
L1MuGMTLFPhiProLUT::SpecificLookup
unsigned SpecificLookup(int idx, unsigned eta, unsigned pt, unsigned charge) const
specific lookup function for entire output field
Definition: L1MuGMTLFPhiProLUT.h:60
funct::false
false
Definition: Factorize.h:29
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
L1MuGMTLUT::m_Inputs
std::vector< port > m_Inputs
Definition: L1MuGMTLUT.h:214
L1MuGMTLFPhiProLUT::BRPC
Definition: L1MuGMTLFPhiProLUT.h:40
L1MuGMTLFPhiProLUT::~L1MuGMTLFPhiProLUT
~L1MuGMTLFPhiProLUT() override
destructor
Definition: L1MuGMTLFPhiProLUT.h:48
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
L1MuGMTLFPhiProLUT::TheLookupFunction
unsigned TheLookupFunction(int idx, unsigned eta, unsigned pt, unsigned charge) const
The lookup function - here the functionality of the LUT is implemented.
Definition: L1MuGMTLFPhiProLUT.cc:56
L1MuGMTLFPhiProLUT::DT
Definition: L1MuGMTLFPhiProLUT.h:40
generateTowerEtThresholdLUT.addr
addr
Definition: generateTowerEtThresholdLUT.py:57
PVValHelper::eta
Definition: PVValidationHelpers.h:69
L1MuGMTLFPhiProLUT::LookupFunctionPacked
unsigned LookupFunctionPacked(int idx, unsigned address) const override
access to lookup function with packed input and output
Definition: L1MuGMTLFPhiProLUT.h:70
L1MuGMTLUT.h
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
L1MuGMTLUT
Definition: L1MuGMTLUT.h:73
L1MuGMTLUT::LookupPacked
unsigned LookupPacked(int idx, unsigned) const
Definition: L1MuGMTLUT.h:272
L1MuGMTLFPhiProLUT::L1MuGMTLFPhiProLUT
L1MuGMTLFPhiProLUT()
constuctor using function-lookup
Definition: L1MuGMTLFPhiProLUT.h:43
L1MuGMTLFPhiProLUT::FRPC
Definition: L1MuGMTLFPhiProLUT.h:40
L1MuGMTLFPhiProLUT::SpecificLookup_dphi
unsigned SpecificLookup_dphi(int idx, unsigned eta, unsigned pt, unsigned charge) const
specific lookup function for dphi
Definition: L1MuGMTLFPhiProLUT.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
L1MuGMTLFPhiProLUT
Definition: L1MuGMTLFPhiProLUT.h:38
L1MuGMTLFPhiProLUT::InitParameters
void InitParameters()
Initialize scales, configuration parameters, alignment constants, ...
Definition: L1MuGMTLFPhiProLUT.cc: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