Skip to content

Commit

Permalink
Merge pull request #32884 from perrotta/removeOutdatedCommentsOnRpcMa…
Browse files Browse the repository at this point in the history
…tches

Remove outdated comments about previous implementation of rpcMatches in Muon.cc
  • Loading branch information
cmsbuild committed Feb 12, 2021
2 parents e3f75e8 + 0e14c66 commit 5dbdf0f
Showing 1 changed file with 8 additions and 23 deletions.
31 changes: 8 additions & 23 deletions DataFormats/MuonReco/src/Muon.cc
Expand Up @@ -145,20 +145,12 @@ unsigned int Muon::stationMask(ArbitrationType type) const {
if (type == RPCHitAndTrackArbitration) {
if (chamberMatch.rpcMatches.empty())
continue;

RPCDetId rollId = chamberMatch.id.rawId();
int rpcIndex = rollId.region() == 0 ? 1 : 2;

// for (auto& rpcMatch : chamberMatch.rpcMatches) { // TO BE FIXED: there is clearly something odd here
// Replaced by something which restores the previous functionality, but one should verify which were the
// original intentions of the author and provide a more appropriate fix (and remove these comment lines)
if (!chamberMatch.rpcMatches.empty()) {
curMask = 1 << ((chamberMatch.station() - 1) + 4 * (rpcIndex - 1));

// do not double count
if (!(totMask & curMask))
totMask += curMask;
}
curMask = 1 << ((chamberMatch.station() - 1) + 4 * (rpcIndex - 1));
// do not double count
if (!(totMask & curMask))
totMask += curMask;
continue;
}

Expand Down Expand Up @@ -228,7 +220,6 @@ unsigned int Muon::RPClayerMask(ArbitrationType type) const {
RPCDetId rollId = chamberMatch.id.rawId();
const int region = rollId.region();
const int stationIndex = chamberMatch.station();

int rpcLayer = stationIndex;
if (region == 0) {
const int layer = rollId.layer();
Expand All @@ -238,16 +229,10 @@ unsigned int Muon::RPClayerMask(ArbitrationType type) const {
} else
rpcLayer += 6;

// for (auto& rpcMatch : chamberMatch.rpcMatches) { // TO BE FIXED: there is clearly something odd here
// Replaced by something which restores the previous functionality, but one should verify which were the
// original intentions of the author and provide a more appropriate fix (and remove these comment lines)
if (!chamberMatch.rpcMatches.empty()) {
curMask = 1 << (rpcLayer - 1);

// do not double count
if (!(totMask & curMask))
totMask += curMask;
}
curMask = 1 << (rpcLayer - 1);
// do not double count
if (!(totMask & curMask))
totMask += curMask;
}

return totMask;
Expand Down

0 comments on commit 5dbdf0f

Please sign in to comment.