CMS 3D CMS Logo

RegionalMuonRawDigiTranslator.h
Go to the documentation of this file.
1 #ifndef RegionalMuonRawDigiTranslator_h
2 #define RegionalMuonRawDigiTranslator_h
3 
6 
7 namespace l1t {
9  public:
11  uint32_t raw_data_00_31,
12  uint32_t raw_data_32_63,
13  int proc,
14  tftype tf,
15  bool isKbmtf,
16  bool useOmtfDisplacementInfo,
17  bool useEmtfDisplacementInfo);
19  uint64_t dataword,
20  int proc,
21  tftype tf,
22  bool isKbmtf,
23  bool useOmtfDisplacementInfo,
24  bool useEmtfDisplacementInfo);
25  static bool fillRegionalMuonShower(RegionalMuonShower& muShower,
26  std::vector<uint32_t> bxPayload,
27  int proc,
28  tftype tf,
29  bool useEmtfNominalTightShowers,
30  bool useEmtfLooseShowers);
31  static void generatePackedDataWords(const RegionalMuonCand& mu,
32  uint32_t& raw_data_00_31,
33  uint32_t& raw_data_32_63,
34  bool isKbmtf,
35  bool useOmtfDisplacementInfo,
36  bool useEmtfDisplacementInfo);
37  static void generatePackedShowerPayload(const RegionalMuonShower& shower,
38  std::array<uint32_t, 6>& payload,
39  bool useEmtfNominalTightShowers,
40  bool useEmtfLooseShowers);
42  bool isKbmtf,
43  bool useOmtfDisplacementInfo,
44  bool useEmtfDisplacementInfo);
45  static int generateRawTrkAddress(const RegionalMuonCand&, bool isKalman);
46 
47  static constexpr unsigned ptMask_ = 0x1FF;
48  static constexpr unsigned ptShift_ = 0;
49  static constexpr unsigned qualMask_ = 0xF;
50  static constexpr unsigned qualShift_ = 9;
51  static constexpr unsigned absEtaMask_ = 0xFF;
52  static constexpr unsigned absEtaShift_ = 13;
53  static constexpr unsigned etaSignShift_ = 21;
54  static constexpr unsigned hfMask_ = 0x1;
55  static constexpr unsigned hfShift_ = 22;
56  static constexpr unsigned absPhiMask_ = 0x7F;
57  static constexpr unsigned absPhiShift_ = 23;
58  static constexpr unsigned phiSignShift_ = 30;
59  static constexpr unsigned signShift_ = 0;
60  static constexpr unsigned signValidShift_ = 1;
61  static constexpr unsigned dxyMask_ = 0x3;
62  static constexpr unsigned bmtfDxyShift_ = 2;
63  static constexpr unsigned emtfDxyShift_ = 29;
64  static constexpr unsigned ptUnconstrainedMask_ = 0xFF;
65  static constexpr unsigned bmtfPtUnconstrainedShift_ = 23;
66  static constexpr unsigned kOmtfPtUnconstrainedShift_ = 20;
67  static constexpr unsigned emtfPtUnconstrainedShift_ = 20;
68  static constexpr unsigned trackAddressMask_ = 0x1FFFFFFF;
69  static constexpr unsigned trackAddressShift_ = 2;
70  static constexpr unsigned kEmtfShowerMask = 0x1;
71  static constexpr unsigned kEmtfShowerStandardFrame = 1;
72  static constexpr unsigned kEmtfShowerExtendedFrame = 3;
73  static constexpr unsigned kEmtfShowerOneNominalShift = 18;
75  static constexpr unsigned kEmtfShowerOneTightShift = 19;
76 
77  // relative shifts within track address
78  static constexpr unsigned bmtfTrAddrSegSelMask_ = 0xF;
79  static constexpr unsigned bmtfTrAddrSegSelShift_ = 21;
80  static constexpr unsigned bmtfTrAddrDetSideShift_ = 20;
81  static constexpr unsigned bmtfTrAddrWheelMask_ = 0x3;
82  static constexpr unsigned bmtfTrAddrWheelShift_ = 18;
83  static constexpr unsigned bmtfTrAddrStat1Mask_ = 0x3;
84  static constexpr unsigned bmtfTrAddrStat1Shift_ = 14;
85  static constexpr unsigned bmtfTrAddrStat2Mask_ = 0xF;
86  static constexpr unsigned bmtfTrAddrStat2Shift_ = 10;
87  static constexpr unsigned bmtfTrAddrStat3Mask_ = 0xF;
88  static constexpr unsigned bmtfTrAddrStat3Shift_ = 6;
89  static constexpr unsigned bmtfTrAddrStat4Mask_ = 0xF;
90  static constexpr unsigned bmtfTrAddrStat4Shift_ = 2;
91 
92  static constexpr unsigned emtfTrAddrMe1SegShift_ = 0;
93  static constexpr unsigned emtfTrAddrMe1ChShift_ = 1;
94  static constexpr unsigned emtfTrAddrMe1ChMask_ = 0x7;
95  static constexpr unsigned emtfTrAddrMe2SegShift_ = 4;
96  static constexpr unsigned emtfTrAddrMe2ChShift_ = 5;
97  static constexpr unsigned emtfTrAddrMe2ChMask_ = 0x7;
98  static constexpr unsigned emtfTrAddrMe3SegShift_ = 8;
99  static constexpr unsigned emtfTrAddrMe3ChShift_ = 9;
100  static constexpr unsigned emtfTrAddrMe3ChMask_ = 0x7;
101  static constexpr unsigned emtfTrAddrMe4SegShift_ = 12;
102  static constexpr unsigned emtfTrAddrMe4ChShift_ = 13;
103  static constexpr unsigned emtfTrAddrMe4ChMask_ = 0x7;
104  static constexpr unsigned emtfTrAddrTrkNumShift_ = 16;
105  static constexpr unsigned emtfTrAddrTrkNumMask_ = 0x3;
106  static constexpr unsigned emtfTrAddrBxShift_ = 18;
107  static constexpr unsigned emtfTrAddrBxMask_ = 0x7FF;
108 
109  static constexpr unsigned omtfTrAddrLayersShift_ = 0;
110  static constexpr unsigned omtfTrAddrLayersMask_ = 0x3FFFF;
111  static constexpr unsigned omtfTrAddrWeightShift_ = 18;
112  static constexpr unsigned omtfTrAddrWeightMask_ = 0x1F;
113  };
114 } // namespace l1t
115 
116 #endif
static void generatePackedDataWords(const RegionalMuonCand &mu, uint32_t &raw_data_00_31, uint32_t &raw_data_32_63, bool isKbmtf, bool useOmtfDisplacementInfo, bool useEmtfDisplacementInfo)
delete x;
Definition: CaloConfig.h:22
static void generatePackedShowerPayload(const RegionalMuonShower &shower, std::array< uint32_t, 6 > &payload, bool useEmtfNominalTightShowers, bool useEmtfLooseShowers)
static bool fillRegionalMuonShower(RegionalMuonShower &muShower, std::vector< uint32_t > bxPayload, int proc, tftype tf, bool useEmtfNominalTightShowers, bool useEmtfLooseShowers)
static void fillRegionalMuonCand(RegionalMuonCand &mu, uint32_t raw_data_00_31, uint32_t raw_data_32_63, int proc, tftype tf, bool isKbmtf, bool useOmtfDisplacementInfo, bool useEmtfDisplacementInfo)
static uint64_t generate64bitDataWord(const RegionalMuonCand &mu, bool isKbmtf, bool useOmtfDisplacementInfo, bool useEmtfDisplacementInfo)
unsigned long long uint64_t
Definition: Time.h:13
static int generateRawTrkAddress(const RegionalMuonCand &, bool isKalman)
static constexpr unsigned kEmtfShowerOneNominalShift
static constexpr unsigned kOmtfPtUnconstrainedShift_