Skip to content

Commit

Permalink
Update muon (un)packer with support for fixed uGMT firwmare
Browse files Browse the repository at this point in the history
  • Loading branch information
dinyar committed Jun 2, 2023
1 parent a965868 commit f8eed85
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,21 @@ namespace l1t {
shower = muonShowerCollection_->at(bx, 0);
muonShowerCollection_->erase(bx, 0);
}
if (linkID ==
0) { // OneNominal and TwoLoose showers are embedded in the first and second muons of the first link
if (linkID == 0) { // OneNominal shower is embedded in the first muon of the first link
shower.setOneNominalInTime(l1t::MuonRawDigiTranslator::showerFired(payload[i + 1], fed_, getAlgoVersion()));
shower.setTwoLooseDiffSectorsInTime(
l1t::MuonRawDigiTranslator::showerFired(payload[i + 3], fed_, getAlgoVersion()));
} else if (linkID == 1) { // OneTight shower is embedded in the first muon of the second link
// The intial 2023 uGMT firmware put the TwoLoose shower on the wrong link, so we have to do it there.
if (fed_ == 1402 && getAlgoVersion() == l1t::MuonRawDigiTranslator::kUgmtFwVersionShowersFrom2023) {
shower.setTwoLooseDiffSectorsInTime(
l1t::MuonRawDigiTranslator::showerFired(payload[i + 3], fed_, getAlgoVersion()));
}
} else if (linkID ==
1) { // OneTight and TwoLoose showers are embedded in the first and second muons of the second link
shower.setOneTightInTime(l1t::MuonRawDigiTranslator::showerFired(payload[i + 1], fed_, getAlgoVersion()));
// Set the two loose showers from this link in all cases except if we're using the faulty uGMT bitfile
if (!(fed_ == 1402 && getAlgoVersion() == l1t::MuonRawDigiTranslator::kUgmtFwVersionShowersFrom2023)) {
shower.setTwoLooseDiffSectorsInTime(
l1t::MuonRawDigiTranslator::showerFired(payload[i + 3], fed_, getAlgoVersion()));
}
}

if (shower.isValid()) {
Expand Down
2 changes: 2 additions & 0 deletions L1Trigger/L1TMuon/interface/MuonRawDigiTranslator.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ namespace l1t {
static constexpr int kUgmtFwVersionFirstWithShowers = 0x7000000;
static constexpr int kUgtFwVersionFirstWithShowers = 0x113B;
static constexpr int kUgmtFwVersionShowersFrom2023 = 0x8000000;
static constexpr int kUgmtFwVersionShowersFrom2023_patched =
0x8000001; // This fixed a miscommunication wrt the link used for the two loose shower bit
static constexpr int kUgtFwVersionShowersFrom2023 = 0x1150;

private:
Expand Down
10 changes: 8 additions & 2 deletions L1Trigger/L1TMuon/src/MuonRawDigiTranslator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,15 @@ std::array<std::array<uint32_t, 4>, 2> l1t::MuonRawDigiTranslator::getPackedShow
res.at(0).at(0) = shower.isOneNominalInTime() ? (1 << showerShift_) : 0;
res.at(0).at(1) = shower.isOneTightInTime() ? (1 << showerShift_) : 0;
}
if ((fedId == kUgmtFedId && fwId >= kUgmtFwVersionShowersFrom2023) ||
if ((fedId == kUgmtFedId && fwId >= kUgmtFwVersionShowersFrom2023_patched) ||
(fedId == kUgtFedId && fwId >= kUgtFwVersionShowersFrom2023)) {
res.at(1).at(0) = shower.isTwoLooseDiffSectorsInTime() ? (1 << showerShift_) : 0;
res.at(1).at(1) = shower.isTwoLooseDiffSectorsInTime()
? (1 << showerShift_)
: 0; // The two loose shower is on the second link in the second muon word.
} else if (fedId == kUgmtFedId && fwId >= kUgmtFwVersionShowersFrom2023) {
res.at(1).at(0) = shower.isTwoLooseDiffSectorsInTime()
? (1 << showerShift_)
: 0; // uGMT was briefly transmitting it on the first link instead.
}
return res;
}
Expand Down

0 comments on commit f8eed85

Please sign in to comment.