CMS 3D CMS Logo

MuonRawDigiTranslator.h
Go to the documentation of this file.
1 #ifndef MuonRawDigiTranslator_h
2 #define MuonRawDigiTranslator_h
3 
5 
6 namespace l1t {
8  public:
9  static void fillMuon(Muon& mu,
10  uint32_t raw_data_spare,
11  uint32_t raw_data_00_31,
12  uint32_t raw_data_32_63,
13  int fed,
14  unsigned int fw,
15  int muInBx);
16  static void fillMuon(Muon& mu, uint32_t raw_data_spare, uint64_t dataword, int fed, unsigned int fw, int muInBx);
17  static void fillIntermediateMuon(Muon& mu, uint32_t raw_data_00_31, uint32_t raw_data_32_63, unsigned int fw);
18  static void generatePackedDataWords(const Muon& mu,
19  uint32_t& raw_data_spare,
20  uint32_t& raw_data_00_31,
21  uint32_t& raw_data_32_63,
22  int fedId,
23  int fwId,
24  int muInBx);
25  static void generate64bitDataWord(
26  const Muon& mu, uint32_t& raw_data_spare, uint64_t& dataword, int fedId, int fwId, int muInBx);
27  static int calcHwEta(const uint32_t& raw, const unsigned absEtaShift, const unsigned etaSignShift);
28 
29  static constexpr unsigned ptMask_ = 0x1FF;
30  static constexpr unsigned ptShift_ = 10;
31  static constexpr unsigned qualMask_ = 0xF;
32  static constexpr unsigned qualShift_ = 19;
33  static constexpr unsigned absEtaMask_ = 0xFF;
34  static constexpr unsigned absEtaShift_ = 21;
35  static constexpr unsigned absEtaAtVtxShift_ = 23;
36  static constexpr unsigned etaSignShift_ = 29;
37  static constexpr unsigned etaAtVtxSignShift_ = 31;
38  static constexpr unsigned phiMask_ = 0x3FF;
39  static constexpr unsigned phiShift_ = 11;
40  static constexpr unsigned phiAtVtxShift_ = 0;
41  static constexpr unsigned chargeShift_ = 2;
42  static constexpr unsigned chargeValidShift_ = 3;
43  static constexpr unsigned tfMuonIndexMask_ = 0x7F;
44  static constexpr unsigned tfMuonIndexShift_ = 4;
45  static constexpr unsigned isoMask_ = 0x3;
46  static constexpr unsigned isoShift_ = 0;
47  static constexpr unsigned dxyMask_ = 0x3;
48  static constexpr unsigned dxyShift_ = 30;
49  static constexpr unsigned ptUnconstrainedMask_ = 0xFF;
50  static constexpr unsigned ptUnconstrainedShift_ = 21;
51  static constexpr unsigned ptUnconstrainedIntermedidateShift_ = 0;
52  static constexpr unsigned absEtaMu1Shift_ = 13; // For Run-3
53  static constexpr unsigned etaMu1SignShift_ = 21; // For Run-3
54  static constexpr unsigned absEtaMu2Shift_ = 22; // For Run-3
55  static constexpr unsigned etaMu2SignShift_ = 30; // For Run-3
56 
57  private:
58  static void fillMuonStableQuantities(Muon& mu, uint32_t raw_data_00_31, uint32_t raw_data_32_63);
59  static void fillMuonCoordinates2016(Muon& mu, uint32_t raw_data_00_31, uint32_t raw_data_32_63);
60  static void fillMuonCoordinatesFrom2017(Muon& mu, uint32_t raw_data_00_31, uint32_t raw_data_32_63);
61  static void fillMuonQuantitiesRun3(Muon& mu,
62  uint32_t raw_data_spare,
63  uint32_t raw_data_00_31,
64  uint32_t raw_data_32_63,
65  int muInBx,
66  bool wasSpecialMWGR = false);
67  static void fillIntermediateMuonQuantitiesRun3(Muon& mu, uint32_t raw_data_00_31, uint32_t raw_data_32_63);
68  static void generatePackedDataWordsRun3(const Muon& mu,
69  int abs_eta,
70  int abs_eta_at_vtx,
71  uint32_t& raw_data_spare,
72  uint32_t& raw_data_00_31,
73  uint32_t& raw_data_32_63,
74  int muInBx,
75  bool wasSpecialMWGR = false);
76  };
77 } // namespace l1t
78 
79 #endif
l1t::MuonRawDigiTranslator::etaSignShift_
static constexpr unsigned etaSignShift_
Definition: MuonRawDigiTranslator.h:36
l1t::MuonRawDigiTranslator::dxyShift_
static constexpr unsigned dxyShift_
Definition: MuonRawDigiTranslator.h:48
l1t::MuonRawDigiTranslator::chargeValidShift_
static constexpr unsigned chargeValidShift_
Definition: MuonRawDigiTranslator.h:42
l1t::MuonRawDigiTranslator::ptUnconstrainedIntermedidateShift_
static constexpr unsigned ptUnconstrainedIntermedidateShift_
Definition: MuonRawDigiTranslator.h:51
l1t::MuonRawDigiTranslator::phiShift_
static constexpr unsigned phiShift_
Definition: MuonRawDigiTranslator.h:39
l1t::MuonRawDigiTranslator::generatePackedDataWordsRun3
static void generatePackedDataWordsRun3(const Muon &mu, int abs_eta, int abs_eta_at_vtx, uint32_t &raw_data_spare, uint32_t &raw_data_00_31, uint32_t &raw_data_32_63, int muInBx, bool wasSpecialMWGR=false)
Definition: MuonRawDigiTranslator.cc:223
l1t::MuonRawDigiTranslator::chargeShift_
static constexpr unsigned chargeShift_
Definition: MuonRawDigiTranslator.h:41
l1t::MuonRawDigiTranslator
Definition: MuonRawDigiTranslator.h:7
amptDefaultParameters_cff.mu
mu
Definition: amptDefaultParameters_cff.py:16
Muon.h
l1t::MuonRawDigiTranslator::ptShift_
static constexpr unsigned ptShift_
Definition: MuonRawDigiTranslator.h:30
l1t::MuonRawDigiTranslator::generate64bitDataWord
static void generate64bitDataWord(const Muon &mu, uint32_t &raw_data_spare, uint64_t &dataword, int fedId, int fwId, int muInBx)
Definition: MuonRawDigiTranslator.cc:257
l1t::MuonRawDigiTranslator::phiAtVtxShift_
static constexpr unsigned phiAtVtxShift_
Definition: MuonRawDigiTranslator.h:40
l1t::MuonRawDigiTranslator::phiMask_
static constexpr unsigned phiMask_
Definition: MuonRawDigiTranslator.h:38
l1t::MuonRawDigiTranslator::absEtaMu2Shift_
static constexpr unsigned absEtaMu2Shift_
Definition: MuonRawDigiTranslator.h:54
l1t::MuonRawDigiTranslator::fillMuonCoordinatesFrom2017
static void fillMuonCoordinatesFrom2017(Muon &mu, uint32_t raw_data_00_31, uint32_t raw_data_32_63)
Definition: MuonRawDigiTranslator.cc:102
l1t::MuonRawDigiTranslator::fillMuonCoordinates2016
static void fillMuonCoordinates2016(Muon &mu, uint32_t raw_data_00_31, uint32_t raw_data_32_63)
Definition: MuonRawDigiTranslator.cc:89
Muon
Definition: Muon.py:1
l1t::MuonRawDigiTranslator::fillMuonStableQuantities
static void fillMuonStableQuantities(Muon &mu, uint32_t raw_data_00_31, uint32_t raw_data_32_63)
Definition: MuonRawDigiTranslator.cc:55
l1t::MuonRawDigiTranslator::fillMuon
static void fillMuon(Muon &mu, uint32_t raw_data_spare, uint32_t raw_data_00_31, uint32_t raw_data_32_63, int fed, unsigned int fw, int muInBx)
Definition: MuonRawDigiTranslator.cc:5
l1t::MuonRawDigiTranslator::absEtaShift_
static constexpr unsigned absEtaShift_
Definition: MuonRawDigiTranslator.h:34
l1t::MuonRawDigiTranslator::fillMuonQuantitiesRun3
static void fillMuonQuantitiesRun3(Muon &mu, uint32_t raw_data_spare, uint32_t raw_data_00_31, uint32_t raw_data_32_63, int muInBx, bool wasSpecialMWGR=false)
Definition: MuonRawDigiTranslator.cc:123
l1t::MuonRawDigiTranslator::absEtaMask_
static constexpr unsigned absEtaMask_
Definition: MuonRawDigiTranslator.h:33
l1t
delete x;
Definition: CaloConfig.h:22
l1t::MuonRawDigiTranslator::isoShift_
static constexpr unsigned isoShift_
Definition: MuonRawDigiTranslator.h:46
l1t::MuonRawDigiTranslator::ptMask_
static constexpr unsigned ptMask_
Definition: MuonRawDigiTranslator.h:29
l1t::MuonRawDigiTranslator::tfMuonIndexMask_
static constexpr unsigned tfMuonIndexMask_
Definition: MuonRawDigiTranslator.h:43
fw
Definition: estimate_field.h:12
l1t::MuonRawDigiTranslator::qualMask_
static constexpr unsigned qualMask_
Definition: MuonRawDigiTranslator.h:31
l1t::MuonRawDigiTranslator::ptUnconstrainedShift_
static constexpr unsigned ptUnconstrainedShift_
Definition: MuonRawDigiTranslator.h:50
l1t::MuonRawDigiTranslator::tfMuonIndexShift_
static constexpr unsigned tfMuonIndexShift_
Definition: MuonRawDigiTranslator.h:44
l1tstage2_dqm_sourceclient-live_cfg.fedId
fedId
Definition: l1tstage2_dqm_sourceclient-live_cfg.py:88
l1t::MuonRawDigiTranslator::dxyMask_
static constexpr unsigned dxyMask_
Definition: MuonRawDigiTranslator.h:47
l1t::MuonRawDigiTranslator::calcHwEta
static int calcHwEta(const uint32_t &raw, const unsigned absEtaShift, const unsigned etaSignShift)
Definition: MuonRawDigiTranslator.cc:266
l1t::MuonRawDigiTranslator::qualShift_
static constexpr unsigned qualShift_
Definition: MuonRawDigiTranslator.h:32
l1t::MuonRawDigiTranslator::etaMu2SignShift_
static constexpr unsigned etaMu2SignShift_
Definition: MuonRawDigiTranslator.h:55
l1t::MuonRawDigiTranslator::absEtaAtVtxShift_
static constexpr unsigned absEtaAtVtxShift_
Definition: MuonRawDigiTranslator.h:35
l1t::MuonRawDigiTranslator::ptUnconstrainedMask_
static constexpr unsigned ptUnconstrainedMask_
Definition: MuonRawDigiTranslator.h:49
l1t::MuonRawDigiTranslator::isoMask_
static constexpr unsigned isoMask_
Definition: MuonRawDigiTranslator.h:45
l1t::MuonRawDigiTranslator::fillIntermediateMuon
static void fillIntermediateMuon(Muon &mu, uint32_t raw_data_00_31, uint32_t raw_data_32_63, unsigned int fw)
Definition: MuonRawDigiTranslator.cc:36
cond::uint64_t
unsigned long long uint64_t
Definition: Time.h:13
l1t::MuonRawDigiTranslator::etaAtVtxSignShift_
static constexpr unsigned etaAtVtxSignShift_
Definition: MuonRawDigiTranslator.h:37
l1t::MuonRawDigiTranslator::generatePackedDataWords
static void generatePackedDataWords(const Muon &mu, uint32_t &raw_data_spare, uint32_t &raw_data_00_31, uint32_t &raw_data_32_63, int fedId, int fwId, int muInBx)
Definition: MuonRawDigiTranslator.cc:180
l1t::MuonRawDigiTranslator::fillIntermediateMuonQuantitiesRun3
static void fillIntermediateMuonQuantitiesRun3(Muon &mu, uint32_t raw_data_00_31, uint32_t raw_data_32_63)
Definition: MuonRawDigiTranslator.cc:170
l1t::MuonRawDigiTranslator::absEtaMu1Shift_
static constexpr unsigned absEtaMu1Shift_
Definition: MuonRawDigiTranslator.h:52
l1t::MuonRawDigiTranslator::etaMu1SignShift_
static constexpr unsigned etaMu1SignShift_
Definition: MuonRawDigiTranslator.h:53