CMS 3D CMS Logo

L1MuGMTMIAUPhiPro1LUT.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_L1MuGMTMIAUPhiPro1LUT_h
19 #define L1TriggerGlobalMuonTrigger_L1MuGMTMIAUPhiPro1LUT_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("MIAUPhiPro1",
45  "MIP_DT MIP_BRPC ISO_DT ISO_BRPC MIP_CSC MIP_FRPC ISO_CSC ISO_FRPC",
46  "phi_fine(3) eta(4) pt(5) charge(1)",
47  "cphi_fine(1) cphi_ofs(3)",
48  11,
49  false) {
51  };
52 
54  ~L1MuGMTMIAUPhiPro1LUT() override{};
55 
57  unsigned SpecificLookup_cphi_fine(int idx, unsigned phi_fine, unsigned eta, unsigned pt, unsigned charge) const {
58  std::vector<unsigned> addr(4);
59  addr[0] = phi_fine;
60  addr[1] = eta;
61  addr[2] = pt;
62  addr[3] = charge;
63  return Lookup(idx, addr)[0];
64  };
65 
67  unsigned SpecificLookup_cphi_ofs(int idx, unsigned phi_fine, unsigned eta, unsigned pt, unsigned charge) const {
68  std::vector<unsigned> addr(4);
69  addr[0] = phi_fine;
70  addr[1] = eta;
71  addr[2] = pt;
72  addr[3] = charge;
73  return Lookup(idx, addr)[1];
74  };
75 
77  unsigned SpecificLookup(int idx, unsigned phi_fine, unsigned eta, unsigned pt, unsigned charge) const {
78  std::vector<unsigned> addr(4);
79  addr[0] = phi_fine;
80  addr[1] = eta;
81  addr[2] = pt;
82  addr[3] = charge;
83  return LookupPacked(idx, addr);
84  };
85 
87 
88  unsigned LookupFunctionPacked(int idx, unsigned address) const override {
89  std::vector<unsigned> addr = u2vec(address, m_Inputs);
90  return TheLookupFunction(idx, addr[0], addr[1], addr[2], addr[3]);
91  };
92 
93 private:
95  void InitParameters();
96 
98  unsigned TheLookupFunction(int idx, unsigned phi_fine, unsigned eta, unsigned pt, unsigned charge) const;
99 
101  float m_calo_align; // angle between nominal phi=0 and start of calo region 0
102 };
103 #endif
L1MuGMTMIAUPhiPro1LUT::SpecificLookup
unsigned SpecificLookup(int idx, unsigned phi_fine, unsigned eta, unsigned pt, unsigned charge) const
specific lookup function for entire output field
Definition: L1MuGMTMIAUPhiPro1LUT.h:77
funct::false
false
Definition: Factorize.h:29
L1MuGMTMIAUPhiPro1LUT::TheLookupFunction
unsigned TheLookupFunction(int idx, unsigned phi_fine, unsigned eta, unsigned pt, unsigned charge) const
The lookup function - here the functionality of the LUT is implemented.
Definition: L1MuGMTMIAUPhiPro1LUT.cc:82
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
L1MuGMTMIAUPhiPro1LUT::SpecificLookup_cphi_ofs
unsigned SpecificLookup_cphi_ofs(int idx, unsigned phi_fine, unsigned eta, unsigned pt, unsigned charge) const
specific lookup function for cphi_ofs
Definition: L1MuGMTMIAUPhiPro1LUT.h:67
L1MuGMTMIAUPhiPro1LUT::ISO_BRPC
Definition: L1MuGMTMIAUPhiPro1LUT.h:40
L1MuGMTMIAUPhiPro1LUT::InitParameters
void InitParameters()
Initialize scales, configuration parameters, alignment constants, ...
Definition: L1MuGMTMIAUPhiPro1LUT.cc:41
L1MuGMTLUT::m_Inputs
std::vector< port > m_Inputs
Definition: L1MuGMTLUT.h:214
L1MuGMTMIAUPhiPro1LUT::MIP_CSC
Definition: L1MuGMTMIAUPhiPro1LUT.h:40
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
L1MuGMTMIAUPhiPro1LUT::~L1MuGMTMIAUPhiPro1LUT
~L1MuGMTMIAUPhiPro1LUT() override
destructor
Definition: L1MuGMTMIAUPhiPro1LUT.h:54
generateTowerEtThresholdLUT.addr
addr
Definition: generateTowerEtThresholdLUT.py:57
L1MuGMTMIAUPhiPro1LUT::ISO_DT
Definition: L1MuGMTMIAUPhiPro1LUT.h:40
L1MuGMTMIAUPhiPro1LUT::ISO_CSC
Definition: L1MuGMTMIAUPhiPro1LUT.h:40
PVValHelper::eta
Definition: PVValidationHelpers.h:70
L1MuGMTMIAUPhiPro1LUT::ISO_FRPC
Definition: L1MuGMTMIAUPhiPro1LUT.h:40
L1MuGMTMIAUPhiPro1LUT::MIP_FRPC
Definition: L1MuGMTMIAUPhiPro1LUT.h:40
L1MuGMTLUT.h
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
L1MuGMTMIAUPhiPro1LUT::L1MuGMTMIAUPhiPro1LUT
L1MuGMTMIAUPhiPro1LUT()
constuctor using function-lookup
Definition: L1MuGMTMIAUPhiPro1LUT.h:43
L1MuGMTMIAUPhiPro1LUT::LookupFunctionPacked
unsigned LookupFunctionPacked(int idx, unsigned address) const override
access to lookup function with packed input and output
Definition: L1MuGMTMIAUPhiPro1LUT.h:88
L1MuGMTLUT
Definition: L1MuGMTLUT.h:73
L1MuGMTLUT::LookupPacked
unsigned LookupPacked(int idx, unsigned) const
Definition: L1MuGMTLUT.h:272
L1MuGMTMIAUPhiPro1LUT::m_calo_align
float m_calo_align
Private data members (LUT parameters);.
Definition: L1MuGMTMIAUPhiPro1LUT.h:101
L1MuGMTMIAUPhiPro1LUT
Definition: L1MuGMTMIAUPhiPro1LUT.h:38
L1MuGMTMIAUPhiPro1LUT::SpecificLookup_cphi_fine
unsigned SpecificLookup_cphi_fine(int idx, unsigned phi_fine, unsigned eta, unsigned pt, unsigned charge) const
specific lookup function for cphi_fine
Definition: L1MuGMTMIAUPhiPro1LUT.h:57
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
L1MuGMTMIAUPhiPro1LUT::MIP_BRPC
Definition: L1MuGMTMIAUPhiPro1LUT.h: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
L1MuGMTMIAUPhiPro1LUT::MIP_DT
Definition: L1MuGMTMIAUPhiPro1LUT.h:40