Skip to content

Commit

Permalink
Apply the same condition to seeding
Browse files Browse the repository at this point in the history
  • Loading branch information
beomki-yeo committed Oct 9, 2024
1 parent 6a020c8 commit 2ee676f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion performance/src/efficiency/finding_performance_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
7 changes: 4 additions & 3 deletions performance/src/efficiency/seeding_performance_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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_count> 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]++;
}
Expand Down

0 comments on commit 2ee676f

Please sign in to comment.