Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance the track matching condition #734

Merged
merged 6 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class finding_performance_writer {
scalar z_min = -500.f * traccc::unit<scalar>::mm;
scalar z_max = 500.f * traccc::unit<scalar>::mm;
scalar r_max = 200.f * traccc::unit<scalar>::mm;
scalar matching_ratio = 0.5f;
};

/// Construct from configuration and log level.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class seeding_performance_writer {
scalar z_min = -500.f * traccc::unit<scalar>::mm;
scalar z_max = 500.f * traccc::unit<scalar>::mm;
scalar r_max = 200.f * traccc::unit<scalar>::mm;
scalar matching_ratio = 0.5f;
};

/// Construct from configuration and log level.
Expand Down
14 changes: 8 additions & 6 deletions performance/src/efficiency/finding_performance_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,16 @@ void finding_performance_writer::write_common(
std::vector<particle_hit_count> particle_hit_counts =
identify_contributing_particles(measurements, evt_map.meas_ptc_map);

if (particle_hit_counts.size() == 1) {
auto pid = particle_hit_counts.at(0).ptc.particle_id;
// 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() >
m_cfg.matching_ratio) {
const auto pid = particle_hit_counts.at(0).ptc.particle_id;
match_counter[pid]++;
}

if (particle_hit_counts.size() > 1) {
} else {
for (particle_hit_count const& phc : particle_hit_counts) {
auto pid = phc.ptc.particle_id;
const auto pid = phc.ptc.particle_id;
fake_counter[pid]++;
}
}
Expand Down
8 changes: 5 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,14 @@ 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.at(0).hit_counts / measurements.size() >
m_cfg.matching_ratio) {
auto pid = particle_hit_counts.at(0).ptc.particle_id;
match_counter[pid]++;
}
Expand Down
Loading