Skip to content

Commit

Permalink
Code-checks and code-format
Browse files Browse the repository at this point in the history
  • Loading branch information
jaimeleonh committed Sep 16, 2022
1 parent 98b9e6e commit a5f5d81
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
12 changes: 6 additions & 6 deletions L1Trigger/DTTriggerPhase2/src/MPQualityEnhancerFilter.cc
Expand Up @@ -121,12 +121,12 @@ void MPQualityEnhancerFilter::filterCousins(std::vector<metaPrimitive> &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;
Expand Down
14 changes: 8 additions & 6 deletions L1Trigger/DTTriggerPhase2/src/MuonPathAssociator.cc
Expand Up @@ -418,21 +418,22 @@ void MuonPathAssociator::correlateMPaths(edm::Handle<DTDigiCollection> 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();
best_lat = lat;
}
} 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
Expand Down Expand Up @@ -652,21 +653,22 @@ void MuonPathAssociator::correlateMPaths(edm::Handle<DTDigiCollection> 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();
best_lat = lat;
}
} 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
Expand Down

0 comments on commit a5f5d81

Please sign in to comment.