17 #include <boost/program_options.hpp>
19 namespace ActsExamples {
23 using boost::program_options::bool_switch;
26 auto opt = desc.add_options();
27 opt(
"fatras-pmin-gev", value<double>()->default_value(0.5),
28 "Minimum momentum for simulated particles in GeV");
29 opt(
"fatras-em-scattering", value<bool>()->default_value(
true),
30 "Simulate multiple scattering of charged particles");
31 opt(
"fatras-em-ionisation", value<bool>()->default_value(
true),
32 "Simulate ionisiation/excitation energy loss of charged particles");
33 opt(
"fatras-em-radiation", value<bool>()->default_value(
true),
34 "Simulate radiative energy loss of charged particles");
35 opt(
"fatras-em-photonconversion", value<bool>()->default_value(
true),
36 "Simulate electron-positron pair production by photon conversion");
39 ->value_name(
"none|sensitive|material|all")
40 ->default_value(
"sensitive"),
41 "Which surfaces should record charged particle hits");
46 using namespace Acts::UnitLiterals;
50 cfg.pMin = vars[
"fatras-pmin-gev"].as<
double>() * 1_GeV;
52 cfg.emScattering = vars[
"fatras-em-scattering"].as<
bool>();
53 cfg.emEnergyLossIonisation = vars[
"fatras-em-ionisation"].as<
bool>();
54 cfg.emEnergyLossRadiation = vars[
"fatras-em-radiation"].as<
bool>();
55 cfg.emPhotonConversion = vars[
"fatras-em-photonconversion"].as<
bool>();
59 if (hits ==
"sensitive") {
60 cfg.generateHitsOnSensitive =
true;
61 cfg.generateHitsOnMaterial =
false;
62 cfg.generateHitsOnPassive =
false;
63 }
else if (hits ==
"material") {
64 cfg.generateHitsOnSensitive =
false;
65 cfg.generateHitsOnMaterial =
true;
66 cfg.generateHitsOnPassive =
false;
67 }
else if (hits ==
"all") {
68 cfg.generateHitsOnSensitive =
true;
69 cfg.generateHitsOnMaterial =
true;
70 cfg.generateHitsOnPassive =
true;
72 throw std::runtime_error(
"Invalid Fatras hits selection '" + hits +
"'");