20 #include <boost/program_options.hpp>
22 namespace ActsExamples {
35 template <
typename simulator_t>
37 const Variables& variables, simulator_t&& simulator) {
38 using namespace Acts::UnitLiterals;
45 Config cfg(std::forward<simulator_t>(simulator));
48 const auto pmin = variables[
"fatras-pmin-gev"].as<
double>() * 1_GeV;
49 cfg.simulator.selectCharged.template get<PMin>().valMin = pmin;
50 cfg.simulator.selectNeutral.template get<PMin>().valMin = pmin;
51 cfg.simulator.charged.physics =
55 if (not variables[
"fatras-em-scattering"].as<bool>()) {
56 cfg.simulator.charged.physics
57 .template disable<ActsFatras::detail::StandardScattering>();
59 if (not variables[
"fatras-em-ionisation"].as<bool>()) {
60 cfg.simulator.charged.physics
61 .template disable<ActsFatras::detail::StandardBetheBloch>();
63 if (not variables[
"fatras-em-radiation"].as<bool>()) {
64 cfg.simulator.charged.physics
65 .template disable<ActsFatras::detail::StandardBetheHeitler>();
69 const std::string hits = variables[
"fatras-hits"].as<std::string>();
70 if (hits ==
"sensitive") {
71 ACTS_DEBUG(
"Configure hits on sensitive surfaces");
72 cfg.simulator.charged.selectHitSurface.sensitive =
true;
73 cfg.simulator.charged.selectHitSurface.material =
false;
74 cfg.simulator.charged.selectHitSurface.passive =
false;
75 }
else if (hits ==
"material") {
76 ACTS_DEBUG(
"Configure hits on material surfaces");
77 cfg.simulator.charged.selectHitSurface.sensitive =
false;
78 cfg.simulator.charged.selectHitSurface.material =
true;
79 cfg.simulator.charged.selectHitSurface.passive =
false;
80 }
else if (hits ==
"all") {
82 cfg.simulator.charged.selectHitSurface.sensitive =
false;
83 cfg.simulator.charged.selectHitSurface.material =
false;
85 cfg.simulator.charged.selectHitSurface.passive =
true;
87 ACTS_WARNING(
"Invalid hits configuration '" << hits <<
"'");
89 cfg.simulator.charged.selectHitSurface.sensitive =
false;
90 cfg.simulator.charged.selectHitSurface.material =
false;
91 cfg.simulator.charged.selectHitSurface.passive =
false;