14 #include <boost/program_options.hpp>
16 namespace ActsExamples {
20 using boost::program_options::bool_switch;
24 auto opt = desc.add_options();
25 opt(
"select-rho-mm", value<Interval>()->value_name(
"MIN:MAX"),
26 "Select particle transverse distance to the origin in mm");
27 opt(
"select-absz-mm", value<Interval>()->value_name(
"MIN:MAX"),
28 "Select particle absolute longitudinal distance to the origin in mm");
29 opt(
"select-time-ns", value<Interval>()->value_name(
"MIN:MAX"),
30 "Select particle time in ns");
31 opt(
"select-phi-degree", value<Interval>()->value_name(
"MIN:MAX"),
32 "Select particle direction angle in the transverse plane in degree");
33 opt(
"select-eta", value<Interval>()->value_name(
"MIN:MAX"),
34 "Select particle pseudo-rapidity");
35 opt(
"select-abseta", value<Interval>()->value_name(
"MIN:MAX"),
36 "Select particle absolute pseudo-rapidity");
37 opt(
"select-pt-gev", value<Interval>()->value_name(
"MIN:MAX"),
38 "Select particle transverse momentum in GeV");
39 opt(
"remove-charged", bool_switch(),
"Remove charged particles");
40 opt(
"remove-neutral", bool_switch(),
"Remove neutral particles");
45 using namespace Acts::UnitLiterals;
48 auto extractInterval = [&](
const char*
name,
auto unit,
auto&
lower,
50 if (vars[
name].empty()) {
59 extractInterval(
"select-rho-mm", 1_mm,
cfg.rhoMin,
cfg.rhoMax);
60 extractInterval(
"select-absz-mm", 1_mm,
cfg.absZMin,
cfg.absZMax);
61 extractInterval(
"select-time-ns", 1_ns,
cfg.timeMin,
cfg.timeMax);
62 extractInterval(
"select-phi-degree", 1_degree,
cfg.phiMin,
cfg.phiMax);
63 extractInterval(
"select-eta", 1.0,
cfg.etaMin,
cfg.etaMax);
64 extractInterval(
"select-abseta", 1.0,
cfg.absEtaMin,
cfg.absEtaMax);
65 extractInterval(
"select-pt-gev", 1_GeV,
cfg.ptMin,
cfg.ptMax);
66 cfg.removeCharged = vars[
"remove-charged"].as<
bool>();
67 cfg.removeNeutral = vars[
"remove-neutral"].as<
bool>();