Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-07-26 08:22:14

0001 /** TRACCC library, part of the ACTS project (R&D line)
0002  *
0003  * (c) 2023-2026 CERN for the benefit of the ACTS project
0004  *
0005  * Mozilla Public License Version 2.0
0006  */
0007 
0008 // Project include(s).
0009 #include "traccc/alpaka/clusterization/clusterization_algorithm.hpp"
0010 #include "traccc/alpaka/clusterization/measurement_sorting_algorithm.hpp"
0011 #include "traccc/alpaka/finding/combinatorial_kalman_filter_algorithm.hpp"
0012 #include "traccc/alpaka/fitting/kalman_fitting_algorithm.hpp"
0013 #include "traccc/alpaka/gbts_seeding/gbts_seeding_algorithm.hpp"
0014 #include "traccc/alpaka/seeding/seed_parameter_estimation_algorithm.hpp"
0015 #include "traccc/alpaka/seeding/silicon_pixel_spacepoint_formation_algorithm.hpp"
0016 #include "traccc/alpaka/seeding/triplet_seeding_algorithm.hpp"
0017 #include "traccc/alpaka/utils/queue.hpp"
0018 #include "traccc/alpaka/utils/vecmem_objects.hpp"
0019 #include "traccc/clusterization/clusterization_algorithm.hpp"
0020 #include "traccc/device/container_d2h_copy_alg.hpp"
0021 #include "traccc/efficiency/seeding_performance_writer.hpp"
0022 #include "traccc/examples/make_magnetic_field.hpp"
0023 #include "traccc/finding/combinatorial_kalman_filter_algorithm.hpp"
0024 #include "traccc/fitting/kalman_filter/kalman_fitter.hpp"
0025 #include "traccc/fitting/kalman_fitting_algorithm.hpp"
0026 #include "traccc/gbts_seeding/gbts_seeding_config.hpp"
0027 #include "traccc/geometry/detector.hpp"
0028 #include "traccc/io/read_cells.hpp"
0029 #include "traccc/io/read_detector.hpp"
0030 #include "traccc/io/read_detector_description.hpp"
0031 #include "traccc/io/utils.hpp"
0032 #include "traccc/options/accelerator.hpp"
0033 #include "traccc/options/clusterization.hpp"
0034 #include "traccc/options/detector.hpp"
0035 #include "traccc/options/input_data.hpp"
0036 #include "traccc/options/performance.hpp"
0037 #include "traccc/options/program_options.hpp"
0038 #include "traccc/options/track_finding.hpp"
0039 #include "traccc/options/track_fitting.hpp"
0040 #include "traccc/options/track_gbts_seeding.hpp"
0041 #include "traccc/options/track_propagation.hpp"
0042 #include "traccc/options/track_seeding.hpp"
0043 #include "traccc/performance/collection_comparator.hpp"
0044 #include "traccc/performance/container_comparator.hpp"
0045 #include "traccc/performance/soa_comparator.hpp"
0046 #include "traccc/performance/timer.hpp"
0047 #include "traccc/seeding/seeding_algorithm.hpp"
0048 #include "traccc/seeding/silicon_pixel_spacepoint_formation_algorithm.hpp"
0049 #include "traccc/seeding/track_params_estimation.hpp"
0050 #include "traccc/utils/propagation.hpp"
0051 
0052 // System include(s).
0053 #include <exception>
0054 #include <iomanip>
0055 #include <iostream>
0056 #include <memory>
0057 
0058 int seq_run(const traccc::opts::detector& detector_opts,
0059             const traccc::opts::magnetic_field& bfield_opts,
0060             const traccc::opts::input_data& input_opts,
0061             const traccc::opts::clusterization& clusterization_opts,
0062             const traccc::opts::track_seeding& seeding_opts,
0063             const traccc::opts::track_gbts_seeding& seeding_gbts_opts,
0064             const traccc::opts::track_finding& finding_opts,
0065             const traccc::opts::track_propagation& propagation_opts,
0066             const traccc::opts::track_fitting& fitting_opts,
0067             const traccc::opts::performance& performance_opts,
0068             const traccc::opts::accelerator& accelerator_opts,
0069             std::unique_ptr<const traccc::Logger> ilogger, bool usingGBTS) {
0070   TRACCC_LOCAL_LOGGER(std::move(ilogger));
0071 
0072   // Memory resources used by the application.
0073   traccc::alpaka::queue queue;
0074   traccc::alpaka::vecmem_objects vo(queue);
0075 
0076   vecmem::memory_resource& host_mr = vo.host_mr();
0077   vecmem::memory_resource& device_mr = vo.device_mr();
0078   traccc::memory_resource mr{device_mr, &host_mr};
0079 
0080   // Host copy object
0081   vecmem::copy host_copy;
0082 
0083   // Device types used.
0084   vecmem::copy& copy = vo.async_copy();
0085 
0086   // Construct the detector description object.
0087   traccc::detector_design_description::host host_det_descr{host_mr};
0088   traccc::detector_conditions_description::host host_det_cond{host_mr};
0089   traccc::io::read_detector_description(
0090       host_det_descr, host_det_cond, detector_opts.detector_file,
0091       detector_opts.digitization_file, detector_opts.conditions_file,
0092       traccc::data_format::json);
0093   traccc::detector_design_description::data host_det_descr_data{
0094       vecmem::get_data(host_det_descr)};
0095   traccc::detector_conditions_description::data host_det_cond_data{
0096       vecmem::get_data(host_det_cond)};
0097   traccc::detector_design_description::buffer device_det_descr{
0098       [&]() {
0099         std::vector<unsigned int> sizes(host_det_descr.size());
0100         for (std::size_t i = 0; i < host_det_descr.size(); ++i) {
0101           auto this_design = host_det_descr.at(i);
0102 
0103           sizes[i] = std::max(
0104               static_cast<unsigned int>(((this_design.bin_edges_x()).size())),
0105               static_cast<unsigned int>(((this_design.bin_edges_y()).size())));
0106         }
0107         return sizes;
0108       }(),
0109       device_mr, &host_mr, vecmem::data::buffer_type::resizable};
0110   copy.setup(device_det_descr)->wait();
0111   copy(vecmem::get_data(host_det_descr), device_det_descr)->wait();
0112 
0113   traccc::detector_conditions_description::buffer device_det_cond{
0114       static_cast<traccc::detector_conditions_description::buffer::size_type>(
0115           host_det_cond.size()),
0116       device_mr};
0117   copy.setup(device_det_cond)->ignore();
0118   copy(vecmem::get_data(host_det_cond), device_det_cond,
0119        vecmem::copy::type::host_to_device)
0120       ->ignore();
0121 
0122   // Construct a Detray detector object, if supported by the configuration.
0123   traccc::host_detector host_det;
0124   traccc::io::read_detector(host_det, host_mr, detector_opts.detector_file,
0125                             detector_opts.material_file,
0126                             detector_opts.grid_file);
0127 
0128   const traccc::detector_buffer detector_buffer =
0129       traccc::buffer_from_host_detector(host_det, device_mr, copy);
0130 
0131   // Output stats
0132   uint64_t n_cells = 0;
0133   uint64_t n_measurements = 0;
0134   uint64_t n_measurements_alpaka = 0;
0135   uint64_t n_spacepoints = 0;
0136   uint64_t n_spacepoints_alpaka = 0;
0137   uint64_t n_seeds = 0;
0138   uint64_t n_seeds_alpaka = 0;
0139   uint64_t n_found_tracks = 0;
0140   uint64_t n_found_tracks_alpaka = 0;
0141   uint64_t n_fitted_tracks = 0;
0142   uint64_t n_fitted_tracks_alpaka = 0;
0143 
0144   // Type definitions
0145   using host_spacepoint_formation_algorithm =
0146       traccc::host::silicon_pixel_spacepoint_formation_algorithm;
0147   using device_spacepoint_formation_algorithm =
0148       traccc::alpaka::silicon_pixel_spacepoint_formation_algorithm;
0149 
0150   using host_finding_algorithm =
0151       traccc::host::combinatorial_kalman_filter_algorithm;
0152   using device_finding_algorithm =
0153       traccc::alpaka::combinatorial_kalman_filter_algorithm;
0154 
0155   using host_fitting_algorithm = traccc::host::kalman_fitting_algorithm;
0156   using device_fitting_algorithm = traccc::alpaka::kalman_fitting_algorithm;
0157 
0158   // Algorithm configuration(s).
0159   const traccc::gbts_seedfinder_config gbts_config(seeding_gbts_opts);
0160   const traccc::seedfinder_config seedfinder_config(seeding_opts);
0161   const traccc::seedfilter_config seedfilter_config(seeding_opts);
0162   const traccc::spacepoint_grid_config spacepoint_grid_config(seeding_opts);
0163 
0164   detray::propagation::config propagation_config(propagation_opts);
0165 
0166   traccc::finding_config finding_cfg(finding_opts);
0167   finding_cfg.propagation = propagation_config;
0168 
0169   traccc::fitting_config fitting_cfg(fitting_opts);
0170   fitting_cfg.propagation = propagation_config;
0171 
0172   // Constant B field for the track finding and fitting
0173   const traccc::vector3 field_vec(seeding_opts);
0174   const auto field = traccc::details::make_magnetic_field(bfield_opts);
0175 
0176   traccc::host::clusterization_algorithm ca(
0177       host_mr, logger().clone("HostClusteringAlg"));
0178   host_spacepoint_formation_algorithm sf(host_mr,
0179                                          logger().clone("HostSpFormationAlg"));
0180   traccc::host::seeding_algorithm sa(seedfinder_config, spacepoint_grid_config,
0181                                      seedfilter_config, host_mr,
0182                                      logger().clone("HostSeedingAlg"));
0183   traccc::track_params_estimation_config track_params_estimation_config;
0184   traccc::host::track_params_estimation tp(
0185       track_params_estimation_config, host_mr,
0186       logger().clone("HostTrackParEstAlg"));
0187   host_finding_algorithm finding_alg(finding_cfg, host_mr,
0188                                      logger().clone("HostFindingAlg"));
0189   host_fitting_algorithm fitting_alg(fitting_cfg, host_mr, host_copy,
0190                                      logger().clone("HostFittingAlg"));
0191 
0192   traccc::alpaka::clusterization_algorithm ca_alpaka(
0193       mr, copy, queue, clusterization_opts,
0194       logger().clone("AlpakaClusteringAlg"));
0195   traccc::alpaka::measurement_sorting_algorithm ms_alpaka(
0196       mr, copy, queue, logger().clone("AlpakaMeasSortingAlg"));
0197   device_spacepoint_formation_algorithm sf_alpaka(
0198       mr, copy, queue, logger().clone("AlpakaSpFormationAlg"));
0199   traccc::alpaka::triplet_seeding_algorithm sa_alpaka(
0200       seedfinder_config, spacepoint_grid_config, seedfilter_config, mr, copy,
0201       queue, logger().clone("AlpakaSeedingAlg"));
0202   traccc::alpaka::gbts_seeding_algorithm gbts_sa_alpaka(
0203       gbts_config, mr, copy, queue, logger().clone("AlpakaGbtsSeedingAlg"));
0204   traccc::alpaka::seed_parameter_estimation_algorithm tp_alpaka(
0205       track_params_estimation_config, mr, copy, queue,
0206       logger().clone("AlpakaTrackParEstAlg"));
0207   device_finding_algorithm finding_alg_alpaka(
0208       finding_cfg, mr, copy, queue, logger().clone("AlpakaFindingAlg"));
0209   device_fitting_algorithm fitting_alg_alpaka(
0210       fitting_cfg, mr, copy, queue, logger().clone("AlpakaFittingAlg"));
0211 
0212   // performance writer
0213   traccc::seeding_performance_writer sd_performance_writer(
0214       traccc::seeding_performance_writer::config{},
0215       logger().clone("SeedingPerformanceWriter"));
0216 
0217   traccc::performance::timing_info elapsedTimes;
0218 
0219   // Loop over events
0220   for (std::size_t event = input_opts.skip;
0221        event < input_opts.events + input_opts.skip; ++event) {
0222     // Instantiate host containers/collections
0223     traccc::host::clusterization_algorithm::output_type measurements_per_event{
0224         host_mr};
0225     host_spacepoint_formation_algorithm::output_type spacepoints_per_event{
0226         host_mr};
0227     traccc::host::seeding_algorithm::output_type seeds{host_mr};
0228     traccc::host::track_params_estimation::output_type params{&host_mr};
0229     host_finding_algorithm::output_type track_candidates{host_mr};
0230     host_fitting_algorithm::output_type track_states{host_mr};
0231 
0232     // Instantiate alpaka containers/collections
0233     traccc::edm::measurement_collection::buffer measurements_alpaka_buffer;
0234     traccc::edm::spacepoint_collection::buffer spacepoints_alpaka_buffer;
0235     traccc::edm::seed_collection::buffer seeds_alpaka_buffer;
0236     traccc::bound_track_parameters_collection_types::buffer
0237         params_alpaka_buffer(0, *mr.host);
0238     traccc::edm::track_container<traccc::default_algebra>::buffer
0239         track_candidates_buffer;
0240     traccc::edm::track_container<traccc::default_algebra>::buffer
0241         track_states_buffer;
0242 
0243     {
0244       traccc::performance::timer wall_t("Wall time", elapsedTimes);
0245 
0246       traccc::edm::silicon_cell_collection::host cells_per_event{host_mr};
0247 
0248       {
0249         traccc::performance::timer t("File reading  (cpu)", elapsedTimes);
0250         // Read the cells from the relevant event file into host memory.
0251         static constexpr bool DEDUPLICATE = true;
0252         traccc::io::read_cells(cells_per_event, event, input_opts.directory,
0253                                logger().clone(), &host_det_cond,
0254                                input_opts.format, DEDUPLICATE,
0255                                input_opts.use_acts_geom_source);
0256       }  // stop measuring file reading timer
0257 
0258       n_cells += cells_per_event.size();
0259 
0260       // Create device copy of input collections
0261       traccc::edm::silicon_cell_collection::buffer cells_buffer(
0262           static_cast<unsigned int>(cells_per_event.size()), mr.main);
0263       copy.setup(cells_buffer)->wait();
0264       copy(vecmem::get_data(cells_per_event), cells_buffer)->wait();
0265 
0266       // Alpaka
0267       {
0268         traccc::performance::timer t("Clusterization (alpaka)", elapsedTimes);
0269         // Reconstruct it into spacepoints on the device.
0270         auto unsorted_measurements =
0271             ca_alpaka(cells_buffer, device_det_descr, device_det_cond);
0272         measurements_alpaka_buffer = ms_alpaka(unsorted_measurements);
0273         queue.synchronize();
0274       }  // stop measuring clusterization alpaka timer
0275 
0276       // CPU
0277       if (accelerator_opts.compare_with_cpu) {
0278         traccc::performance::timer t("Clusterization  (cpu)", elapsedTimes);
0279         measurements_per_event = ca(vecmem::get_data(cells_per_event),
0280                                     host_det_descr_data, host_det_cond_data);
0281       }  // stop measuring clusterization cpu timer
0282 
0283       // Perform seeding, track finding and fitting only when using a
0284       // Detray geometry.
0285 
0286       // Alpaka
0287       {
0288         traccc::performance::timer t("Spacepoint formation (alpaka)",
0289                                      elapsedTimes);
0290         spacepoints_alpaka_buffer =
0291             sf_alpaka(detector_buffer, measurements_alpaka_buffer);
0292         queue.synchronize();
0293       }  // stop measuring spacepoint formation alpaka timer
0294 
0295       // CPU
0296       if (accelerator_opts.compare_with_cpu) {
0297         traccc::performance::timer t("Spacepoint formation  (cpu)",
0298                                      elapsedTimes);
0299         spacepoints_per_event =
0300             sf(host_det, vecmem::get_data(measurements_per_event));
0301       }  // stop measuring spacepoint formation cpu timer
0302 
0303       // Alpaka
0304       {
0305         traccc::performance::timer t("Seeding (alpaka)", elapsedTimes);
0306         if (usingGBTS) {
0307           seeds_alpaka_buffer = gbts_sa_alpaka(spacepoints_alpaka_buffer,
0308                                                measurements_alpaka_buffer);
0309         } else {
0310           seeds_alpaka_buffer = sa_alpaka(spacepoints_alpaka_buffer);
0311         }
0312         queue.synchronize();
0313       }  // stop measuring seeding alpaka timer
0314 
0315       // CPU
0316       if (accelerator_opts.compare_with_cpu) {
0317         traccc::performance::timer t("Seeding  (cpu)", elapsedTimes);
0318         seeds = sa(vecmem::get_data(spacepoints_per_event));
0319       }  // stop measuring seeding cpu timer
0320 
0321       // Alpaka
0322       {
0323         traccc::performance::timer t("Track params (alpaka)", elapsedTimes);
0324         params_alpaka_buffer =
0325             tp_alpaka(field, measurements_alpaka_buffer,
0326                       spacepoints_alpaka_buffer, seeds_alpaka_buffer);
0327         queue.synchronize();
0328       }  // stop measuring track params timer
0329 
0330       // CPU
0331       if (accelerator_opts.compare_with_cpu) {
0332         traccc::performance::timer t("Track params  (cpu)", elapsedTimes);
0333         params = tp(vecmem::get_data(measurements_per_event),
0334                     vecmem::get_data(spacepoints_per_event),
0335                     vecmem::get_data(seeds), field_vec);
0336       }  // stop measuring track params cpu timer
0337 
0338       // Alpaka
0339       {
0340         traccc::performance::timer timer{"Track finding (alpaka)",
0341                                          elapsedTimes};
0342         track_candidates_buffer = finding_alg_alpaka(detector_buffer, field,
0343                                                      measurements_alpaka_buffer,
0344                                                      params_alpaka_buffer);
0345       }
0346 
0347       // CPU
0348       if (accelerator_opts.compare_with_cpu) {
0349         traccc::performance::timer timer{"Track finding (cpu)", elapsedTimes};
0350         track_candidates = finding_alg(host_det, field,
0351                                        vecmem::get_data(measurements_per_event),
0352                                        vecmem::get_data(params));
0353       }
0354 
0355       // Alpaka
0356       {
0357         traccc::performance::timer timer{"Track fitting (alpaka)",
0358                                          elapsedTimes};
0359         track_states_buffer =
0360             fitting_alg_alpaka(detector_buffer, field, track_candidates_buffer);
0361       }
0362 
0363       // CPU
0364       if (accelerator_opts.compare_with_cpu) {
0365         traccc::performance::timer timer{"Track fitting (cpu)", elapsedTimes};
0366         track_states = fitting_alg(
0367             host_det, field,
0368             traccc::edm::track_container<traccc::default_algebra>::const_data(
0369                 track_candidates));
0370       }
0371     }  // Stop measuring wall time
0372 
0373     /*----------------------------------
0374       compare cpu and alpaka result
0375       ----------------------------------*/
0376 
0377     traccc::edm::measurement_collection::host measurements_per_event_alpaka{
0378         host_mr};
0379     traccc::edm::spacepoint_collection::host spacepoints_per_event_alpaka{
0380         host_mr};
0381     traccc::edm::seed_collection::host seeds_alpaka{host_mr};
0382     traccc::bound_track_parameters_collection_types::host params_alpaka{
0383         &host_mr};
0384     traccc::edm::track_collection<traccc::default_algebra>::host
0385         track_candidates_alpaka{host_mr};
0386     traccc::edm::track_container<traccc::default_algebra>::host
0387         track_states_alpaka{host_mr};
0388 
0389     copy(measurements_alpaka_buffer, measurements_per_event_alpaka)->wait();
0390     copy(spacepoints_alpaka_buffer, spacepoints_per_event_alpaka)->wait();
0391     copy(seeds_alpaka_buffer, seeds_alpaka)->wait();
0392     copy(params_alpaka_buffer, params_alpaka)->wait();
0393     copy(track_candidates_buffer.tracks, track_candidates_alpaka)->wait();
0394     copy(track_states_buffer.tracks, track_states_alpaka.tracks)->wait();
0395     copy(track_states_buffer.states, track_states_alpaka.states)->wait();
0396     queue.synchronize();
0397 
0398     if (accelerator_opts.compare_with_cpu) {
0399       // Show which event we are currently presenting the results for.
0400       TRACCC_INFO("===>>> Event " << event << " <<<===");
0401 
0402       // Compare the measurements made on the host and on the device.
0403       traccc::soa_comparator<traccc::edm::measurement_collection>
0404           compare_measurements{"measurements"};
0405       compare_measurements(vecmem::get_data(measurements_per_event),
0406                            vecmem::get_data(measurements_per_event_alpaka));
0407 
0408       // Compare the spacepoints made on the host and on the device.
0409       traccc::soa_comparator<traccc::edm::spacepoint_collection>
0410           compare_spacepoints{"spacepoints"};
0411       compare_spacepoints(vecmem::get_data(spacepoints_per_event),
0412                           vecmem::get_data(spacepoints_per_event_alpaka));
0413 
0414       // Compare the seeds made on the host and on the device
0415       traccc::soa_comparator<traccc::edm::seed_collection> compare_seeds{
0416           "seeds",
0417           traccc::details::comparator_factory<
0418               traccc::edm::seed_collection::const_device::const_proxy_type>{
0419               vecmem::get_data(spacepoints_per_event),
0420               vecmem::get_data(spacepoints_per_event_alpaka)}};
0421       compare_seeds(vecmem::get_data(seeds), vecmem::get_data(seeds_alpaka));
0422 
0423       // Compare the track parameters made on the host and on the device.
0424       traccc::collection_comparator<traccc::bound_track_parameters<>>
0425           compare_track_parameters{"track parameters"};
0426       compare_track_parameters(vecmem::get_data(params),
0427                                vecmem::get_data(params_alpaka));
0428 
0429       // Compare tracks found on the host and on the device.
0430       traccc::soa_comparator<
0431           traccc::edm::track_collection<traccc::default_algebra>>
0432           compare_track_candidates{
0433               "track candidates",
0434               traccc::details::comparator_factory<traccc::edm::track_collection<
0435                   traccc::default_algebra>::const_device::const_proxy_type>{
0436                   vecmem::get_data(measurements_per_event),
0437                   vecmem::get_data(measurements_per_event_alpaka),
0438                   {},
0439                   {}}};
0440       compare_track_candidates(vecmem::get_data(track_candidates.tracks),
0441                                vecmem::get_data(track_candidates_alpaka));
0442 
0443       // Compare tracks fitted on the host and on the device.
0444       traccc::soa_comparator<
0445           traccc::edm::track_collection<traccc::default_algebra>>
0446           compare_track_fits{
0447               "track fits",
0448               traccc::details::comparator_factory<traccc::edm::track_collection<
0449                   traccc::default_algebra>::const_device::const_proxy_type>{
0450                   vecmem::get_data(measurements_per_event),
0451                   vecmem::get_data(measurements_per_event_alpaka),
0452                   vecmem::get_data(track_states.states),
0453                   vecmem::get_data(track_states_alpaka.states)}};
0454       compare_track_fits(vecmem::get_data(track_states.tracks),
0455                          vecmem::get_data(track_states_alpaka.tracks));
0456     }
0457     /// Statistics
0458     n_measurements += measurements_per_event.size();
0459     n_spacepoints += spacepoints_per_event.size();
0460     n_seeds += seeds.size();
0461     n_measurements_alpaka += measurements_per_event_alpaka.size();
0462     n_spacepoints_alpaka += spacepoints_per_event_alpaka.size();
0463     n_seeds_alpaka += seeds_alpaka.size();
0464     n_found_tracks += track_candidates.tracks.size();
0465     n_found_tracks_alpaka += track_candidates_alpaka.size();
0466     n_fitted_tracks += track_states.tracks.size();
0467     n_fitted_tracks_alpaka += track_states_alpaka.tracks.size();
0468 
0469     if (performance_opts.run) {
0470       traccc::event_data evt_data(input_opts.directory, event, host_mr,
0471                                   input_opts.use_acts_geom_source, &host_det,
0472                                   input_opts.format, false);
0473 
0474       sd_performance_writer.write(
0475           vecmem::get_data(seeds), vecmem::get_data(spacepoints_per_event),
0476           vecmem::get_data(measurements_per_event), evt_data);
0477     }
0478   }
0479 
0480   if (performance_opts.run) {
0481     sd_performance_writer.finalize();
0482   }
0483 
0484   TRACCC_INFO("==> Statistics ... ");
0485   TRACCC_INFO("- read    " << n_cells << " cells");
0486   TRACCC_INFO("- created (cpu)  " << n_measurements << " measurements     ");
0487   TRACCC_INFO("- created (alpaka)  " << n_measurements_alpaka
0488                                      << " measurements     ");
0489   TRACCC_INFO("- created (cpu)  " << n_spacepoints << " spacepoints     ");
0490   TRACCC_INFO("- created (alpaka) " << n_spacepoints_alpaka
0491                                     << " spacepoints     ");
0492 
0493   TRACCC_INFO("- created  (cpu) " << n_seeds << " seeds");
0494   TRACCC_INFO("- created (alpaka) " << n_seeds_alpaka << " seeds");
0495   TRACCC_INFO("- found (cpu)    " << n_found_tracks << " tracks");
0496   TRACCC_INFO("- found (alpaka)   " << n_found_tracks_alpaka << " tracks");
0497   TRACCC_INFO("- fitted (cpu)   " << n_fitted_tracks << " tracks");
0498   TRACCC_INFO("- fitted (alpaka)  " << n_fitted_tracks_alpaka << " tracks");
0499   TRACCC_INFO("==>Elapsed times... " << elapsedTimes);
0500 
0501   return 0;
0502 }
0503 
0504 // The main routine
0505 //
0506 int main(int argc, char* argv[]) {
0507   std::unique_ptr<const traccc::Logger> logger = traccc::getDefaultLogger(
0508       "TracccExampleSeqAlpaka", traccc::Logging::Level::INFO);
0509 
0510   // Program options.
0511   traccc::opts::detector detector_opts;
0512   traccc::opts::magnetic_field bfield_opts;
0513   traccc::opts::input_data input_opts;
0514   traccc::opts::clusterization clusterization_opts;
0515   traccc::opts::track_seeding seeding_opts;
0516   traccc::opts::track_gbts_seeding seeding_gbts_opts;
0517   traccc::opts::track_finding finding_opts;
0518   traccc::opts::track_propagation propagation_opts;
0519   traccc::opts::track_fitting fitting_opts;
0520   traccc::opts::performance performance_opts;
0521   traccc::opts::accelerator accelerator_opts;
0522   traccc::opts::program_options program_opts{
0523       "Full Tracking Chain Using Alpaka",
0524       {detector_opts, bfield_opts, input_opts, clusterization_opts,
0525        seeding_opts, seeding_gbts_opts, finding_opts, propagation_opts,
0526        performance_opts, fitting_opts, accelerator_opts},
0527       argc,
0528       argv,
0529       logger->cloneWithSuffix("Options")};
0530 
0531   // Run the application.
0532   return seq_run(detector_opts, bfield_opts, input_opts, clusterization_opts,
0533                  seeding_opts, seeding_gbts_opts, finding_opts,
0534                  propagation_opts, fitting_opts, performance_opts,
0535                  accelerator_opts, logger->clone(), seeding_gbts_opts.useGBTS);
0536 }