Skip to content

Commit

Permalink
Fix a bug
Browse files Browse the repository at this point in the history
  • Loading branch information
beomki-yeo committed Oct 18, 2024
1 parent a9e29aa commit 18f35b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions performance/src/efficiency/finding_performance_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,11 @@ void finding_performance_writer::write_common(
assert(found_measurements.size() > 0u);
assert(truth_measurements.size() > 0u);
const bool reco_matched =
n_major_hits / found_measurements.size() > m_cfg.matching_ratio;
static_cast<double>(n_major_hits) / found_measurements.size() >
m_cfg.matching_ratio;
const bool truth_matched =
n_major_hits / truth_measurements.size() > m_cfg.matching_ratio;
static_cast<double>(n_major_hits) / truth_measurements.size() >
m_cfg.matching_ratio;

if ((!m_cfg.double_matching && reco_matched) ||
(m_cfg.double_matching && reco_matched && truth_matched)) {
Expand Down
4 changes: 2 additions & 2 deletions performance/src/efficiency/track_classification.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ std::vector<particle_hit_count> identify_contributing_particles(

// particle has been already added to the result vector
if (it != result.end()) {
it->hit_counts += count;
it->hit_counts++;
}
// particle has not been added
else {
result.push_back({ptc, count});
result.push_back({ptc, 1u});
}
}
}
Expand Down

0 comments on commit 18f35b1

Please sign in to comment.