22 #include <boost/program_options.hpp>
24 namespace po = boost::program_options;
26 using namespace Acts::UnitLiterals;
28 int main(
int argc,
char* argv[]) {
29 unsigned int toys = 1;
32 double maxPathInM = 1;
41 po::options_description desc(
"Allowed options");
44 (
"help",
"produce help message")
45 (
"toys",po::value<unsigned int>(&toys)->default_value(20000),
"number of tracks to propagate")
46 (
"pT",po::value<double>(&ptInGeV)->default_value(1),
"transverse momentum in GeV")
47 (
"B",po::value<double>(&BzInT)->default_value(2),
"z-component of B-field in T")
48 (
"path",po::value<double>(&maxPathInM)->default_value(5),
"maximum path length in m")
49 (
"cov",po::value<bool>(&withCov)->default_value(
true),
"propagation with covariance matrix")
50 (
"verbose",po::value<unsigned int>(&lvl)->default_value(
Acts::Logging::INFO),
"logging level");
53 po::store(po::parse_command_line(argc, argv, desc), vm);
56 if (vm.count(
"help") != 0
u) {
57 std::cout << desc << std::endl;
60 }
catch (std::exception&
e) {
61 std::cerr <<
"error: " << e.what() << std::endl;
69 ACTS_INFO(
"propagating " << toys <<
" tracks with pT = " << ptInGeV
70 <<
"GeV in a " << BzInT <<
"T B-field");
80 Propagator_type propagator(
std::move(atlas_stepper));
87 cov << 10_mm, 0, 0, 0, 0, 0,
91 0, 0, 0, 0, 1_e / 10_GeV, 0,
95 std::optional<Covariance> optCov = std::nullopt;
103 double totalPathLength = 0;
104 size_t num_iters = 0;
107 auto r = propagator.propagate(pars, options).value();
108 if (totalPathLength == 0.) {
110 <<
r.endParameters->position(tgContext).transpose()
111 <<
" in " <<
r.steps <<
" steps");
113 totalPathLength +=
r.pathLength;
119 ACTS_INFO(
"Execution stats: " << propagation_bench_result);
120 ACTS_INFO(
"average path length = " << totalPathLength / num_iters / 1_mm