Skip to content

Commit

Permalink
Modifications from PR
Browse files Browse the repository at this point in the history
  • Loading branch information
jaimeleonh committed Sep 19, 2022
1 parent a5f5d81 commit 572ce96
Showing 1 changed file with 12 additions and 27 deletions.
39 changes: 12 additions & 27 deletions L1Trigger/DTTriggerPhase2/src/MuonPathAssociator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ void MuonPathAssociator::correlateMPaths(edm::Handle<DTDigiCollection> dtdigis,
int sl1 = 0;
int sl3 = 0;
for (auto SL1metaPrimitive = SL1metaPrimitives.begin(); SL1metaPrimitive != SL1metaPrimitives.end();
++SL1metaPrimitive, sl1++, sl3 = -1) {
++SL1metaPrimitive, sl1++, sl3 = 0) {
if (clean_chi2_correlation_)
at_least_one_correlation = false;
for (auto SL3metaPrimitive = SL3metaPrimitives.begin(); SL3metaPrimitive != SL3metaPrimitives.end();
Expand Down Expand Up @@ -412,19 +412,13 @@ void MuonPathAssociator::correlateMPaths(edm::Handle<DTDigiCollection> dtdigis,
next_tdc = best_tdc;
next_layer = best_layer;
next_lat = best_lat;

best_wire = (*digiIt).wire();
best_tdc = (*digiIt).time();
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++;
best_wire = (*digiIt).wire();
best_tdc = (*digiIt).time();
best_layer = dtLId.layer();
best_lat = lat;
}
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)
Expand All @@ -433,8 +427,7 @@ void MuonPathAssociator::correlateMPaths(edm::Handle<DTDigiCollection> dtdigis,
// 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)
matched_digis++;
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
min2x = std::abs(x_inSL3 - x_wire);
Expand Down Expand Up @@ -647,19 +640,12 @@ void MuonPathAssociator::correlateMPaths(edm::Handle<DTDigiCollection> dtdigis,
next_tdc = best_tdc;
next_layer = best_layer;
next_lat = best_lat;

best_wire = (*digiIt).wire();
best_tdc = (*digiIt).time();
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++;
best_wire = (*digiIt).wire();
best_tdc = (*digiIt).time();
best_layer = dtLId.layer();
best_lat = lat;
}
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)
Expand All @@ -668,8 +654,7 @@ void MuonPathAssociator::correlateMPaths(edm::Handle<DTDigiCollection> dtdigis,
// 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)
matched_digis++;
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
min2x = std::abs(x_inSL1 - x_wire);
Expand Down

0 comments on commit 572ce96

Please sign in to comment.