From f41ee91cc1e603ccf2357ba7bbcde78826c47c93 Mon Sep 17 00:00:00 2001 From: Dinyar Rabady Date: Mon, 22 Apr 2024 12:47:15 +0200 Subject: [PATCH] Fix position of unconstrained pT coming from OMTF --- .../interface/RegionalMuonRawDigiTranslator.h | 4 ++-- .../src/RegionalMuonRawDigiTranslator.cc | 17 +++++++---------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/L1Trigger/L1TMuon/interface/RegionalMuonRawDigiTranslator.h b/L1Trigger/L1TMuon/interface/RegionalMuonRawDigiTranslator.h index 7bea8dbcfc195..2f9c9f45f68f4 100644 --- a/L1Trigger/L1TMuon/interface/RegionalMuonRawDigiTranslator.h +++ b/L1Trigger/L1TMuon/interface/RegionalMuonRawDigiTranslator.h @@ -42,7 +42,7 @@ namespace l1t { bool isKbmtf, bool useOmtfDisplacementInfo, bool useEmtfDisplacementInfo); - static int generateRawTrkAddress(const RegionalMuonCand&, bool isKalman, bool useOmtfDisplacementInfo); + static int generateRawTrkAddress(const RegionalMuonCand&, bool isKalman); static constexpr unsigned ptMask_ = 0x1FF; static constexpr unsigned ptShift_ = 0; @@ -63,7 +63,7 @@ namespace l1t { static constexpr unsigned emtfDxyShift_ = 29; static constexpr unsigned ptUnconstrainedMask_ = 0xFF; static constexpr unsigned bmtfPtUnconstrainedShift_ = 23; - static constexpr unsigned kOmtfPtUnconstrainedShift_ = 18; + static constexpr unsigned kOmtfPtUnconstrainedShift_ = 20; static constexpr unsigned emtfPtUnconstrainedShift_ = 20; static constexpr unsigned trackAddressMask_ = 0x1FFFFFFF; static constexpr unsigned trackAddressShift_ = 2; diff --git a/L1Trigger/L1TMuon/src/RegionalMuonRawDigiTranslator.cc b/L1Trigger/L1TMuon/src/RegionalMuonRawDigiTranslator.cc index 5a76890c021a4..45bfead0d4b04 100644 --- a/L1Trigger/L1TMuon/src/RegionalMuonRawDigiTranslator.cc +++ b/L1Trigger/L1TMuon/src/RegionalMuonRawDigiTranslator.cc @@ -90,13 +90,12 @@ void l1t::RegionalMuonRawDigiTranslator::fillRegionalMuonCand(RegionalMuonCand& } else if (tf == omtf_neg || tf == omtf_pos) { if (useOmtfDisplacementInfo) { // In Run-3 2024 we receive displaced muon information from OMTF mu.setHwPtUnconstrained((raw_data_32_63 >> kOmtfPtUnconstrainedShift_) & ptUnconstrainedMask_); - } else { - mu.setTrackSubAddress(RegionalMuonCand::kLayers, - (rawTrackAddress >> omtfTrAddrLayersShift_) & omtfTrAddrLayersMask_); - mu.setTrackSubAddress(RegionalMuonCand::kZero, 0); - mu.setTrackSubAddress(RegionalMuonCand::kWeight, - (rawTrackAddress >> omtfTrAddrWeightShift_) & omtfTrAddrWeightMask_); } + mu.setTrackSubAddress(RegionalMuonCand::kLayers, + (rawTrackAddress >> omtfTrAddrLayersShift_) & omtfTrAddrLayersMask_); + mu.setTrackSubAddress(RegionalMuonCand::kZero, 0); + mu.setTrackSubAddress(RegionalMuonCand::kWeight, + (rawTrackAddress >> omtfTrAddrWeightShift_) & omtfTrAddrWeightMask_); } else { std::map trackAddr; trackAddr[0] = rawTrackAddress; @@ -215,9 +214,7 @@ uint64_t l1t::RegionalMuonRawDigiTranslator::generate64bitDataWord(const Regiona return (((uint64_t)msw) << 32) + lsw; } -int l1t::RegionalMuonRawDigiTranslator::generateRawTrkAddress(const RegionalMuonCand& mu, - const bool isKalman, - const bool useOmtfDisplacementInfo) { +int l1t::RegionalMuonRawDigiTranslator::generateRawTrkAddress(const RegionalMuonCand& mu, const bool isKalman) { int tf = mu.trackFinderType(); int rawTrkAddr = 0; if (tf == bmtf) { @@ -266,7 +263,7 @@ int l1t::RegionalMuonRawDigiTranslator::generateRawTrkAddress(const RegionalMuon << " subaddresses. Check the data format. Setting track address to 0."; rawTrkAddr = 0; } - } else if ((tf == omtf_neg || tf == omtf_pos) && !useOmtfDisplacementInfo) { + } else if (tf == omtf_neg || tf == omtf_pos) { // protection against a track address map with the wrong size if (mu.trackAddress().size() == RegionalMuonCand::kNumOmtfSubAddr) { rawTrkAddr = (mu.trackSubAddress(RegionalMuonCand::kLayers) & omtfTrAddrLayersMask_) << omtfTrAddrLayersShift_ |