9 #include <boost/program_options.hpp>
22 namespace po = boost::program_options;
24 using namespace Acts::UnitLiterals;
26 int main(
int argc,
char* argv[]) {
27 unsigned int toys = 1;
30 double maxPathInM = 1;
39 po::options_description
desc(
"Allowed options");
42 (
"help",
"produce help message")
43 (
"toys",po::value<unsigned int>(&toys)->default_value(20000),
"number of tracks to propagate")
44 (
"pT",po::value<double>(&ptInGeV)->default_value(1),
"transverse momentum in GeV")
45 (
"B",po::value<double>(&BzInT)->default_value(2),
"z-component of B-field in T")
46 (
"path",po::value<double>(&maxPathInM)->default_value(5),
"maximum path length in m")
47 (
"cov",po::value<bool>(&withCov)->default_value(
true),
"propagation with covariance matrix")
48 (
"verbose",po::value<unsigned int>(&lvl)->default_value(
Acts::Logging::INFO),
"logging level");
51 po::store(po::parse_command_line(argc, argv, desc), vm);
54 if (vm.count(
"help") != 0
u) {
55 std::cout << desc << std::endl;
58 }
catch (std::exception&
e) {
59 std::cerr <<
"error: " << e.what() << std::endl;
67 ACTS_INFO(
"propagating " << toys <<
" tracks with pT = " << ptInGeV
68 <<
"GeV in a " << BzInT <<
"T B-field");
76 Stepper_type atlas_stepper(std::move(bField));
77 Propagator_type propagator(std::move(atlas_stepper));
86 cov << 10
_mm, 0, 0, 0, 0, 0,
90 0, 0, 0, 0, 1
_e / 10
_GeV, 0,
94 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().x() <<
", "
108 <<
r.endParameters->position().y() <<
", "
109 <<
r.endParameters->position().z() <<
") in " <<
r.steps
112 totalPathLength +=
r.pathLength;
118 ACTS_INFO(
"Execution stats: " << propagation_bench_result);
119 ACTS_INFO(
"average path length = " << totalPathLength / num_iters / 1_mm