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