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

Add options for the max number of branches #641

Merged
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
4 changes: 4 additions & 0 deletions examples/options/include/traccc/options/track_finding.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ class track_finding : public interface,
private:
/// @name Options
/// @{
/// Max number of branches per seed
unsigned int max_num_branches_per_seed = 10;
/// Max number of branches per surface
unsigned int max_num_branches_per_surface = 10;
/// Number of track candidates per seed
opts::value_array<unsigned int, 2> track_candidates_range{3, 100};
/// Minimum step length that track should make to reach the next surface. It
Expand Down
18 changes: 17 additions & 1 deletion examples/options/src/track_finding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ namespace po = boost::program_options;

track_finding::track_finding() : interface("Track Finding Options") {

m_desc.add_options()("max-num-branches-per-seed",
po::value(&max_num_branches_per_seed)
->default_value(max_num_branches_per_seed),
"Max number of branches per seed");
m_desc.add_options()("max-num-branches-per-surface",
po::value(&max_num_branches_per_surface)
->default_value(max_num_branches_per_surface),
"Max number of branches per surface");
m_desc.add_options()("track-candidates-range",
po::value(&track_candidates_range)
->value_name("MIN:MAX")
Expand Down Expand Up @@ -52,6 +60,8 @@ track_finding::track_finding() : interface("Track Finding Options") {

track_finding::operator finding_config<float>() const {
finding_config<float> out;
out.max_num_branches_per_seed = max_num_branches_per_seed;
out.max_num_branches_per_surface = max_num_branches_per_surface;
out.min_track_candidates_per_track = track_candidates_range[0];
out.max_track_candidates_per_track = track_candidates_range[1];
out.min_step_length_for_next_surface = min_step_length_for_next_surface;
Expand All @@ -64,6 +74,8 @@ track_finding::operator finding_config<float>() const {

track_finding::operator finding_config<double>() const {
finding_config<double> out;
out.max_num_branches_per_seed = max_num_branches_per_seed;
out.max_num_branches_per_surface = max_num_branches_per_surface;
out.min_track_candidates_per_track = track_candidates_range[0];
out.max_track_candidates_per_track = track_candidates_range[1];
out.min_step_length_for_next_surface = min_step_length_for_next_surface;
Expand All @@ -76,7 +88,11 @@ track_finding::operator finding_config<double>() const {

std::ostream& track_finding::print_impl(std::ostream& out) const {

out << " Track candidates range : " << track_candidates_range << "\n"
out << " Max number of branches per seed: " << max_num_branches_per_seed
<< "\n"
<< " Max number of branches per surface: "
<< max_num_branches_per_surface << "\n"
<< " Track candidates range : " << track_candidates_range << "\n"
<< " Minimum step length for the next surface: "
<< min_step_length_for_next_surface << " [mm] \n"
<< " Maximum step counts for the next surface: "
Expand Down
Loading