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