17 #include <boost/program_options.hpp>
21 namespace ActsExamples {
29 boost::program_options::options_description& opt) {
30 namespace po = boost::program_options;
31 using namespace Acts::UnitLiterals;
33 "prop-debug", po::value<bool>()->default_value(
false),
34 "Run in debug mode, will create propagation screen output.")(
35 "prop-step-collection",
36 po::value<std::string>()->default_value(
"propagation-steps"),
37 "Propgation step collection.")(
38 "prop-stepper", po::value<int>()->default_value(1),
39 "Propgation type: 0 (StraightLine), 1 (Eigen), 2 (Atlas).")(
40 "prop-mode", po::value<int>()->default_value(0),
41 "Propgation modes: 0 (inside-out), 1 (surface to surface).")(
42 "prop-cov", po::value<bool>()->default_value(
false),
43 "Propagate (random) test covariances.")(
44 "prop-energyloss", po::value<bool>()->default_value(
true),
45 "Apply energy loss correction - in extrapolation mode only.")(
46 "prop-scattering", po::value<bool>()->default_value(
true),
47 "Apply scattering correction - in extrapolation mode only.")(
48 "prop-record-material", po::value<bool>()->default_value(
true),
49 "Record the material interaction and - in extrapolation mode only.")(
50 "prop-material-collection",
51 po::value<std::string>()->default_value(
"propagation-material"),
52 "Propagation material collection.")(
53 "prop-ntests", po::value<size_t>()->default_value(1000),
54 "Number of tests performed.")(
"prop-resolve-material",
55 po::value<bool>()->default_value(
true),
56 "Resolve all smaterial surfaces.")(
57 "prop-resolve-passive", po::value<bool>()->default_value(
false),
58 "Resolve all passive surfaces.")(
"prop-resolve-sensitive",
59 po::value<bool>()->default_value(
true),
60 "Resolve all sensitive surfaces.")(
61 "prop-d0-sigma", po::value<double>()->default_value(15_um),
62 "Sigma of the transverse impact parameter [in mm].")(
63 "prop-z0-sigma", po::value<double>()->default_value(55_mm),
64 "Sigma of the longitudinal impact parameter [in mm].")(
65 "prop-phi-sigma", po::value<double>()->default_value(0.001),
66 "Sigma of the azimuthal angle [in rad].")(
67 "prop-theta-sigma", po::value<double>()->default_value(0.001),
68 "Sigma of the polar angle [in rad].")(
69 "prop-qp-sigma", po::value<double>()->default_value(0.0001 / 1_GeV),
70 "Sigma of the signed inverse momentum [in GeV^{-1}].")(
71 "prop-t-sigma", po::value<double>()->default_value(1_ns),
72 "Sigma of the time parameter [in ns].")(
74 "The 15 off-diagonal correlation rho(d0,z0), rho(d0,phi), [...], "
75 "rho(z0,phi), rho(z0, theta), [...], rho(qop,t). Row-wise.")(
77 "Azimutal angle phi range for proprapolated tracks.")(
78 "prop-eta-range", po::value<Reals<2>>()->default_value({{-4., 4.}}),
79 "Pseudorapidity range for proprapolated tracks.")(
81 po::value<Reals<2>>()->default_value({{100_MeV, 100_GeV}}),
82 "Transverse momentum range for proprapolated tracks [in GeV].")(
83 "prop-max-stepsize", po::value<double>()->default_value(3_m),
84 "Maximum step size for the propagation [in mm].")(
85 "prop-pt-loopers", po::value<double>()->default_value(500_MeV),
86 "Transverse momentum below which loops are being detected [in GeV].");
96 const boost::program_options::variables_map& vm) {
97 using namespace Acts::UnitLiterals;
100 auto iphir = vm[
"prop-phi-range"].template as<Reals<2>>();
101 auto ietar = vm[
"prop-eta-range"].template as<Reals<2>>();
102 auto iptr = vm[
"prop-pt-range"].template as<Reals<2>>();
105 pAlgConfig.
energyLoss = vm[
"prop-energyloss"].template as<bool>();
106 pAlgConfig.multipleScattering = vm[
"prop-scattering"].template as<bool>();
107 pAlgConfig.recordMaterialInteractions =
108 vm[
"prop-record-material"].template as<bool>();
111 pAlgConfig.debugOutput = vm[
"prop-debug"].template as<bool>();
112 pAlgConfig.ntests = vm[
"prop-ntests"].template as<size_t>();
113 pAlgConfig.mode = vm[
"prop-mode"].template as<int>();
114 pAlgConfig.d0Sigma = vm[
"prop-d0-sigma"].template as<double>() * 1_mm;
115 pAlgConfig.z0Sigma = vm[
"prop-z0-sigma"].template as<double>() * 1_mm;
116 pAlgConfig.phiSigma = vm[
"prop-phi-sigma"].template as<double>();
117 pAlgConfig.thetaSigma = vm[
"prop-theta-sigma"].template as<double>();
118 pAlgConfig.qpSigma = vm[
"prop-qp-sigma"].template as<double>() / 1_GeV;
119 pAlgConfig.tSigma = vm[
"prop-t-sigma"].template as<double>() * 1_ns;
121 pAlgConfig.phiRange = {iphir[0], iphir[1]};
122 pAlgConfig.etaRange = {ietar[0], ietar[1]};
123 pAlgConfig.ptRange = {iptr[0] * 1_GeV, iptr[1] * 1_GeV};
124 pAlgConfig.ptLoopers = vm[
"prop-pt-loopers"].template as<double>() * 1_GeV;
125 pAlgConfig.maxStepSize = vm[
"prop-max-stepsize"].template as<double>() * 1_mm;
127 pAlgConfig.propagationStepCollection =
128 vm[
"prop-step-collection"].template as<std::string>();
129 pAlgConfig.propagationMaterialCollection =
130 vm[
"prop-material-collection"].template as<std::string>();
133 if (vm[
"prop-cov"].
template as<bool>()) {
135 pAlgConfig.covarianceTransport =
true;
138 pAlgConfig.d0Sigma * pAlgConfig.d0Sigma;
140 pAlgConfig.z0Sigma * pAlgConfig.z0Sigma;
142 pAlgConfig.phiSigma * pAlgConfig.phiSigma;
144 pAlgConfig.thetaSigma * pAlgConfig.thetaSigma;
146 pAlgConfig.qpSigma * pAlgConfig.qpSigma;
148 pAlgConfig.tSigma * pAlgConfig.tSigma;
151 if (vm.count(
"prop-corr-offd") != 0
u) {
152 auto readOffd = vm[
"prop-corr-offd"].template as<Reals<15>>();