diff --git a/performance/src/efficiency/finding_performance_writer.cpp b/performance/src/efficiency/finding_performance_writer.cpp index f1c2a5a8c3..545738b3e5 100644 --- a/performance/src/efficiency/finding_performance_writer.cpp +++ b/performance/src/efficiency/finding_performance_writer.cpp @@ -173,7 +173,7 @@ void finding_performance_writer::write_common( // Consider it being matched if hit counts is larger than the half // of the number of measurements assert(measurements.size() > 0u); - if (particle_hit_counts.at(0).hit_counts >= measurements.size() / 2) { + if (particle_hit_counts.at(0).hit_counts > measurements.size() / 2) { const auto pid = particle_hit_counts.at(0).ptc.particle_id; match_counter[pid]++; } else { diff --git a/performance/src/efficiency/seeding_performance_writer.cpp b/performance/src/efficiency/seeding_performance_writer.cpp index ec7472d22a..2ebe0f3701 100644 --- a/performance/src/efficiency/seeding_performance_writer.cpp +++ b/performance/src/efficiency/seeding_performance_writer.cpp @@ -70,12 +70,13 @@ void seeding_performance_writer::write( seed_collection_types::const_device seeds(seeds_view); for (const seed& sd : seeds) { + const auto measurements = sd.get_measurements(spacepoints_view); + // Check which particle matches this seed. std::vector particle_hit_counts = - identify_contributing_particles( - sd.get_measurements(spacepoints_view), evt_map.meas_ptc_map); + identify_contributing_particles(measurements, evt_map.meas_ptc_map); - if (particle_hit_counts.size() == 1) { + if (particle_hit_counts.size() > measurements.size() / 2) { auto pid = particle_hit_counts.at(0).ptc.particle_id; match_counter[pid]++; }