File indexing completed on 2024-09-07 04:36:48
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #ifndef L1TriggerGlobalMuonTrigger_L1MuGMTMIAUPhiPro2LUT_h
0019 #define L1TriggerGlobalMuonTrigger_L1MuGMTMIAUPhiPro2LUT_h
0020
0021
0022
0023
0024
0025
0026
0027
0028 #include "L1Trigger/GlobalMuonTrigger/src/L1MuGMTLUT.h"
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038 class L1MuGMTMIAUPhiPro2LUT : public L1MuGMTLUT {
0039 public:
0040 enum { MIP_DT, MIP_BRPC, ISO_DT, ISO_BRPC, MIP_CSC, MIP_FRPC, ISO_CSC, ISO_FRPC };
0041
0042
0043 L1MuGMTMIAUPhiPro2LUT()
0044 : L1MuGMTLUT("MIAUPhiPro2",
0045 "MIP_DT MIP_BRPC ISO_DT ISO_BRPC MIP_CSC MIP_FRPC ISO_CSC ISO_FRPC",
0046 "cphi_start(5) cphi_fine(1) cphi_ofs(3) charge(1)",
0047 "phi_sel(18)",
0048 11,
0049 false) {
0050 InitParameters();
0051 };
0052
0053
0054 ~L1MuGMTMIAUPhiPro2LUT() override {}
0055
0056
0057 unsigned SpecificLookup_phi_sel(
0058 int idx, unsigned cphi_start, unsigned cphi_fine, unsigned cphi_ofs, unsigned charge) const {
0059 std::vector<unsigned> addr(4);
0060 addr[0] = cphi_start;
0061 addr[1] = cphi_fine;
0062 addr[2] = cphi_ofs;
0063 addr[3] = charge;
0064 return Lookup(idx, addr)[0];
0065 };
0066
0067
0068 unsigned SpecificLookup(int idx, unsigned cphi_start, unsigned cphi_fine, unsigned cphi_ofs, unsigned charge) const {
0069 std::vector<unsigned> addr(4);
0070 addr[0] = cphi_start;
0071 addr[1] = cphi_fine;
0072 addr[2] = cphi_ofs;
0073 addr[3] = charge;
0074 return LookupPacked(idx, addr);
0075 };
0076
0077
0078
0079 unsigned LookupFunctionPacked(int idx, unsigned address) const override {
0080 std::vector<unsigned> addr = u2vec(address, m_Inputs);
0081 return TheLookupFunction(idx, addr[0], addr[1], addr[2], addr[3]);
0082 };
0083
0084 private:
0085
0086 void InitParameters();
0087
0088
0089 unsigned TheLookupFunction(int idx, unsigned cphi_start, unsigned cphi_fine, unsigned cphi_ofs, unsigned charge) const;
0090
0091
0092 int m_IsolationCellSizePhi;
0093 };
0094 #endif