diff --git a/L1Trigger/DTTriggerPhase2/src/MPQualityEnhancerFilter.cc b/L1Trigger/DTTriggerPhase2/src/MPQualityEnhancerFilter.cc index 2802ca13a0cbb..94b72556b9dc3 100644 --- a/L1Trigger/DTTriggerPhase2/src/MPQualityEnhancerFilter.cc +++ b/L1Trigger/DTTriggerPhase2/src/MPQualityEnhancerFilter.cc @@ -121,12 +121,12 @@ void MPQualityEnhancerFilter::filterCousins(std::vector &inMPaths } } bool add_paths = (i == (int)(inMPaths.size() - 1)); - if (!add_paths) { - add_paths = areCousins(inMPaths[i], inMPaths[i + 1]) == 0; - } - if (!add_paths) { - primo_index++; - } else { //areCousing==0 + if (!add_paths) { + add_paths = areCousins(inMPaths[i], inMPaths[i + 1]) == 0; + } + if (!add_paths) { + primo_index++; + } else { //areCousing==0 if (oneof4) { outMPaths.push_back(inMPaths[bestI]); bestI = -1; diff --git a/L1Trigger/DTTriggerPhase2/src/MuonPathAssociator.cc b/L1Trigger/DTTriggerPhase2/src/MuonPathAssociator.cc index 549038b4792e0..0f406b32c47bf 100644 --- a/L1Trigger/DTTriggerPhase2/src/MuonPathAssociator.cc +++ b/L1Trigger/DTTriggerPhase2/src/MuonPathAssociator.cc @@ -418,7 +418,8 @@ void MuonPathAssociator::correlateMPaths(edm::Handle dtdigis, best_layer = dtLId.layer(); best_lat = lat; matched_digis++; - } else if (dtLId.layer() == best_layer) { // same layer than stored, just substituting the hit, no matched_digis++; + } else if (dtLId.layer() == + best_layer) { // same layer than stored, just substituting the hit, no matched_digis++; best_wire = (*digiIt).wire(); best_tdc = (*digiIt).time(); best_layer = dtLId.layer(); @@ -426,13 +427,13 @@ void MuonPathAssociator::correlateMPaths(edm::Handle dtdigis, } } else if ((std::abs(x_inSL3 - x_wire) >= minx) && (std::abs(x_inSL3 - x_wire) < min2x)) { // same layer than the stored in best, no hit added - if (dtLId.layer() == best_layer) + if (dtLId.layer() == best_layer) continue; // different layer than the stored in next, hit added. This approach in somewhat // buggy, as we could have stored as next LayerX -> LayerY -> LayerX, and this should // count only as 2 hits. However, as we confirm with at least 2 hits, having 2 or more // makes no difference - else if (dtLId.layer() != next_layer) + else if (dtLId.layer() != next_layer) matched_digis++; // whether the layer is the same for this hit and the stored in next, we substitute // the one stored and modify the min distance @@ -652,7 +653,8 @@ void MuonPathAssociator::correlateMPaths(edm::Handle dtdigis, best_layer = dtLId.layer(); best_lat = lat; matched_digis++; - } else if (dtLId.layer() == best_layer) { // same layer than stored, just substituting the hit, no matched_digis++; + } else if (dtLId.layer() == + best_layer) { // same layer than stored, just substituting the hit, no matched_digis++; best_wire = (*digiIt).wire(); best_tdc = (*digiIt).time(); best_layer = dtLId.layer(); @@ -660,13 +662,13 @@ void MuonPathAssociator::correlateMPaths(edm::Handle dtdigis, } } else if ((std::abs(x_inSL1 - x_wire) >= minx) && (std::abs(x_inSL1 - x_wire) < min2x)) { // same layer than the stored in best, no hit added - if (dtLId.layer() == best_layer) + if (dtLId.layer() == best_layer) continue; // different layer than the stored in next, hit added. This approach in somewhat // buggy, as we could have stored as next LayerX -> LayerY -> LayerX, and this should // count only as 2 hits. However, as we confirm with at least 2 hits, having 2 or more // makes no difference - else if (dtLId.layer() != next_layer) + else if (dtLId.layer() != next_layer) matched_digis++; // whether the layer is the same for this hit and the stored in next, we substitute // the one stored and modify the min distance