14 #include <boost/program_options.hpp>
16 namespace ActsExamples {
23 auto opt = desc.add_options();
24 opt(
"select-rho-mm", value<Interval>()->value_name(
"MIN:MAX"),
25 "Select particle transverse distance to the origin in mm");
26 opt(
"select-z-mm", value<Interval>()->value_name(
"MIN:MAX"),
27 "Select particle longitudinal distance range to the origin in mm");
28 opt(
"select-phi-degree", value<Interval>()->value_name(
"MIN:MAX"),
29 "Select particle direction angle in the transverse plane in degree");
30 opt(
"select-eta", value<Interval>()->value_name(
"MIN:MAX"),
31 "Select particle pseudo-rapidity");
32 opt(
"select-abseta", value<Interval>()->value_name(
"MIN:MAX"),
33 "Select particle absolute pseudo-rapidity");
34 opt(
"select-pt-gev", value<Interval>()->value_name(
"MIN:MAX"),
35 "Select particle transverse momentum in GeV");
36 opt(
"select-min-hits", value<size_t>()->default_value(3),
37 "Select particle minimum hits");
42 using namespace Acts::UnitLiterals;
45 auto extractInterval = [&](
const char*
name,
auto unit,
auto&
lower,
47 if (vars[
name].empty()) {
56 extractInterval(
"select-rho-mm", 1_mm,
cfg.rhoMin,
cfg.rhoMax);
57 extractInterval(
"select-z-mm", 1_mm,
cfg.zMin,
cfg.zMax);
58 extractInterval(
"select-phi-degree", 1_degree,
cfg.phiMin,
cfg.phiMax);
59 extractInterval(
"select-eta", 1.0,
cfg.etaMin,
cfg.etaMax);
60 extractInterval(
"select-abseta", 1.0,
cfg.absEtaMin,
cfg.absEtaMax);
61 extractInterval(
"select-pt-gev", 1_GeV,
cfg.ptMin,
cfg.ptMax);
62 cfg.nHitsMin = vars[
"select-min-hits"].as<
size_t>();