CMS 3D CMS Logo

L1MuGMTMIAUPhiPro2LUT.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_L1MuGMTMIAUPhiPro2LUT_h
19 #define L1TriggerGlobalMuonTrigger_L1MuGMTMIAUPhiPro2LUT_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("MIAUPhiPro2",
45  "MIP_DT MIP_BRPC ISO_DT ISO_BRPC MIP_CSC MIP_FRPC ISO_CSC ISO_FRPC",
46  "cphi_start(5) cphi_fine(1) cphi_ofs(3) charge(1)",
47  "phi_sel(18)",
48  11,
49  false) {
51  };
52 
54  ~L1MuGMTMIAUPhiPro2LUT() override{};
55 
58  int idx, unsigned cphi_start, unsigned cphi_fine, unsigned cphi_ofs, unsigned charge) const {
59  std::vector<unsigned> addr(4);
60  addr[0] = cphi_start;
61  addr[1] = cphi_fine;
62  addr[2] = cphi_ofs;
63  addr[3] = charge;
64  return Lookup(idx, addr)[0];
65  };
66 
68  unsigned SpecificLookup(int idx, unsigned cphi_start, unsigned cphi_fine, unsigned cphi_ofs, unsigned charge) const {
69  std::vector<unsigned> addr(4);
70  addr[0] = cphi_start;
71  addr[1] = cphi_fine;
72  addr[2] = cphi_ofs;
73  addr[3] = charge;
74  return LookupPacked(idx, addr);
75  };
76 
78 
79  unsigned LookupFunctionPacked(int idx, unsigned address) const override {
80  std::vector<unsigned> addr = u2vec(address, m_Inputs);
81  return TheLookupFunction(idx, addr[0], addr[1], addr[2], addr[3]);
82  };
83 
84 private:
86  void InitParameters();
87 
89  unsigned TheLookupFunction(int idx, unsigned cphi_start, unsigned cphi_fine, unsigned cphi_ofs, unsigned charge) const;
90 
93 };
94 #endif
funct::false
false
Definition: Factorize.h:29
L1MuGMTMIAUPhiPro2LUT::SpecificLookup_phi_sel
unsigned SpecificLookup_phi_sel(int idx, unsigned cphi_start, unsigned cphi_fine, unsigned cphi_ofs, unsigned charge) const
specific lookup function for phi_sel
Definition: L1MuGMTMIAUPhiPro2LUT.h:57
L1MuGMTMIAUPhiPro2LUT::SpecificLookup
unsigned SpecificLookup(int idx, unsigned cphi_start, unsigned cphi_fine, unsigned cphi_ofs, unsigned charge) const
specific lookup function for entire output field
Definition: L1MuGMTMIAUPhiPro2LUT.h:68
L1MuGMTLUT::m_Inputs
std::vector< port > m_Inputs
Definition: L1MuGMTLUT.h:214
L1MuGMTMIAUPhiPro2LUT::L1MuGMTMIAUPhiPro2LUT
L1MuGMTMIAUPhiPro2LUT()
constuctor using function-lookup
Definition: L1MuGMTMIAUPhiPro2LUT.h:43
L1MuGMTMIAUPhiPro2LUT::TheLookupFunction
unsigned TheLookupFunction(int idx, unsigned cphi_start, unsigned cphi_fine, unsigned cphi_ofs, unsigned charge) const
The lookup function - here the functionality of the LUT is implemented.
Definition: L1MuGMTMIAUPhiPro2LUT.cc:47
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
generateTowerEtThresholdLUT.addr
addr
Definition: generateTowerEtThresholdLUT.py:57
L1MuGMTMIAUPhiPro2LUT::ISO_CSC
Definition: L1MuGMTMIAUPhiPro2LUT.h:40
L1MuGMTMIAUPhiPro2LUT::MIP_FRPC
Definition: L1MuGMTMIAUPhiPro2LUT.h:40
L1MuGMTMIAUPhiPro2LUT::~L1MuGMTMIAUPhiPro2LUT
~L1MuGMTMIAUPhiPro2LUT() override
destructor
Definition: L1MuGMTMIAUPhiPro2LUT.h:54
L1MuGMTLUT.h
L1MuGMTMIAUPhiPro2LUT::ISO_BRPC
Definition: L1MuGMTMIAUPhiPro2LUT.h:40
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
L1MuGMTMIAUPhiPro2LUT::m_IsolationCellSizePhi
int m_IsolationCellSizePhi
Private data members (LUT parameters);.
Definition: L1MuGMTMIAUPhiPro2LUT.h:92
L1MuGMTMIAUPhiPro2LUT::MIP_DT
Definition: L1MuGMTMIAUPhiPro2LUT.h:40
L1MuGMTLUT
Definition: L1MuGMTLUT.h:73
L1MuGMTLUT::LookupPacked
unsigned LookupPacked(int idx, unsigned) const
Definition: L1MuGMTLUT.h:272
L1MuGMTMIAUPhiPro2LUT::MIP_CSC
Definition: L1MuGMTMIAUPhiPro2LUT.h:40
L1MuGMTMIAUPhiPro2LUT::MIP_BRPC
Definition: L1MuGMTMIAUPhiPro2LUT.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
L1MuGMTMIAUPhiPro2LUT
Definition: L1MuGMTMIAUPhiPro2LUT.h:38
L1MuGMTMIAUPhiPro2LUT::ISO_FRPC
Definition: L1MuGMTMIAUPhiPro2LUT.h:40
L1MuGMTMIAUPhiPro2LUT::LookupFunctionPacked
unsigned LookupFunctionPacked(int idx, unsigned address) const override
access to lookup function with packed input and output
Definition: L1MuGMTMIAUPhiPro2LUT.h:79
L1MuGMTLUT::Lookup
std::vector< unsigned > Lookup(int idx, const std::vector< unsigned > &address) const
additional lookup function (std::vector -> vector)
Definition: L1MuGMTLUT.h:121
L1MuGMTMIAUPhiPro2LUT::ISO_DT
Definition: L1MuGMTMIAUPhiPro2LUT.h:40
L1MuGMTMIAUPhiPro2LUT::InitParameters
void InitParameters()
Initialize scales, configuration parameters, alignment constants, ...
Definition: L1MuGMTMIAUPhiPro2LUT.cc:33