77
88#pragma once
99
10+ // Local include(s).
11+ #include " make_magnetic_field.hpp"
12+
1013// Project include(s)
1114#include " traccc/geometry/detector.hpp"
1215
1316// Command line option include(s).
1417#include " traccc/options/clusterization.hpp"
1518#include " traccc/options/detector.hpp"
1619#include " traccc/options/input_data.hpp"
20+ #include " traccc/options/magnetic_field.hpp"
1721#include " traccc/options/program_options.hpp"
1822#include " traccc/options/throughput.hpp"
1923#include " traccc/options/track_finding.hpp"
@@ -54,6 +58,7 @@ int throughput_st(std::string_view description, int argc, char* argv[],
5458
5559 // Program options.
5660 opts::detector detector_opts;
61+ opts::magnetic_field bfield_opts;
5762 opts::input_data input_opts;
5863 opts::clusterization clusterization_opts;
5964 opts::track_seeding seeding_opts;
@@ -63,8 +68,9 @@ int throughput_st(std::string_view description, int argc, char* argv[],
6368 opts::throughput throughput_opts;
6469 opts::program_options program_opts{
6570 description,
66- {detector_opts, input_opts, clusterization_opts, seeding_opts,
67- finding_opts, propagation_opts, fitting_opts, throughput_opts},
71+ {detector_opts, bfield_opts, input_opts, clusterization_opts,
72+ seeding_opts, finding_opts, propagation_opts, fitting_opts,
73+ throughput_opts},
6874 argc,
6975 argv,
7076 logger->cloneWithSuffix (" Options" )};
@@ -92,6 +98,9 @@ int throughput_st(std::string_view description, int argc, char* argv[],
9298 detector_opts.material_file , detector_opts.grid_file );
9399 }
94100
101+ // Construct the magnetic field object.
102+ traccc::bfield field{details::make_magnetic_field (bfield_opts)};
103+
95104 vecmem::memory_resource& alg_host_mr =
96105 use_host_caching
97106 ? static_cast <vecmem::memory_resource&>(*cached_host_mr)
@@ -131,7 +140,7 @@ int throughput_st(std::string_view description, int argc, char* argv[],
131140 std::unique_ptr<FULL_CHAIN_ALG> alg = std::make_unique<FULL_CHAIN_ALG>(
132141 alg_host_mr, clustering_cfg, seeding_opts.seedfinder ,
133142 spacepoint_grid_config{seeding_opts.seedfinder },
134- seeding_opts.seedfilter , finding_cfg, fitting_cfg, det_descr,
143+ seeding_opts.seedfilter , finding_cfg, fitting_cfg, det_descr, field,
135144 (detector_opts.use_detray_detector ? &detector : nullptr ),
136145 logger->clone (" FullChainAlg" ));
137146
0 commit comments