21 #include <boost/program_options.hpp>
23 namespace po = boost::program_options;
25 using namespace Acts::UnitLiterals;
27 int main(
int argc,
char* argv[]) {
28 unsigned int toys = 1;
31 double maxPathInM = 1;
40 po::options_description desc(
"Allowed options");
43 (
"help",
"produce help message")
44 (
"toys",po::value<unsigned int>(&toys)->default_value(20000),
"number of tracks to propagate")
45 (
"pT",po::value<double>(&ptInGeV)->default_value(1),
"transverse momentum in GeV")
46 (
"B",po::value<double>(&BzInT)->default_value(2),
"z-component of B-field in T")
47 (
"path",po::value<double>(&maxPathInM)->default_value(5),
"maximum path length in m")
48 (
"cov",po::value<bool>(&withCov)->default_value(
true),
"propagation with covariance matrix")
49 (
"verbose",po::value<unsigned int>(&lvl)->default_value(
Acts::Logging::INFO),
"logging level");
52 po::store(po::parse_command_line(argc, argv, desc), vm);
55 if (vm.count(
"help") != 0
u) {
56 std::cout << desc << std::endl;
59 }
catch (std::exception&
e) {
60 std::cerr <<
"error: " << e.what() << std::endl;
68 ACTS_INFO(
"propagating " << toys <<
" tracks with pT = " << ptInGeV
69 <<
"GeV in a " << BzInT <<
"T B-field");
77 Stepper_type atlas_stepper(std::move(bField));
78 Propagator_type propagator(std::move(atlas_stepper));
85 cov << 10_mm, 0, 0, 0, 0, 0,
89 0, 0, 0, 0, 1_e / 10_GeV, 0,
93 std::optional<Covariance> optCov = std::nullopt;
100 double totalPathLength = 0;
101 size_t num_iters = 0;
104 auto r = propagator.propagate(pars, options).value();
105 if (totalPathLength == 0.) {
107 << r.endParameters->position(tgContext).transpose()
108 <<
" in " << r.steps <<
" steps");
110 totalPathLength += r.pathLength;
116 ACTS_INFO(
"Execution stats: " << propagation_bench_result);
117 ACTS_INFO(
"average path length = " << totalPathLength / num_iters / 1_mm