11 #include <boost/program_options.hpp>
20 namespace po = boost::program_options;
22 namespace au = Acts::units;
33 template <
typename options_t>
35 opt.add_options()(
"geo-tgeo-filename",
36 po::value<std::string>()->default_value(
""),
38 "geo-tgeo-worldvolume", po::value<std::string>()->default_value(
""),
39 "Root world volume to start search from.")(
40 "geo-tgeo-unitScalor", po::value<double>()->default_value(10.),
41 "Unit scalor from ROOT to Acts.")(
43 po::value<read_series>()->multitoken()->default_value({}),
44 "Number of layers on the negative side.")(
46 po::value<read_series>()->multitoken()->default_value({}),
47 "Number of layers in the barrel.")(
49 po::value<read_series>()->multitoken()->default_value({}),
50 "Number of layers on the positive side.")(
51 "geo-tgeo-nlayernames",
52 po::value<read_strings>()->multitoken()->default_value({}),
53 "Name identifier for negative layer objects, odered along the series.")(
54 "geo-tgeo-clayernames",
55 po::value<read_strings>()->multitoken()->default_value({}),
56 "Name identifier for central layer objects, odered along the series.")(
57 "geo-tgeo-playernames",
58 po::value<read_strings>()->multitoken()->default_value({}),
59 "Name identifier for positive layer objects, odered along the series.")(
60 "geo-tgeo-nmodulenames",
61 po::value<read_strings>()->multitoken()->default_value({}),
62 "Name identifier for negative sensitive objects, odered along the "
63 "series.")(
"geo-tgeo-cmodulenames",
64 po::value<read_strings>()->multitoken()->default_value({}),
65 "Name identifier for central sensitive objects, odered "
67 "geo-tgeo-pmodulenames",
68 po::value<read_strings>()->multitoken()->default_value({}),
69 "Name identifier for positive sensitive objects, odered along the "
70 "series.")(
"geo-tgeo-nmoduleaxes",
71 po::value<read_strings>()->multitoken()->default_value({}),
72 "Axes definition for negative sensitive objects, odered "
74 "geo-tgeo-cmoduleaxes",
75 po::value<read_strings>()->multitoken()->default_value({}),
76 "Axes definition for central sensitive objects, odered along the "
77 "series.")(
"geo-tgeo-pmoduleaxes",
78 po::value<read_strings>()->multitoken()->default_value({}),
79 "Axes definition for positive sensitive objects, odered "
91 template <
typename variable_map_t>
93 const variable_map_t& vm,
94 std::shared_ptr<const Acts::LayerCreator> layerCreator) {
95 std::vector<Acts::TGeoLayerBuilder::Config> detLayerConfigs;
99 vm[
"geo-subdetectors"].template as<read_strings>();
100 double unitScalor = vm[
"geo-tgeo-unitScalor"].template as<double>();
102 read_series nlayers = vm[
"geo-tgeo-nlayers"].template as<read_series>();
103 read_series clayers = vm[
"geo-tgeo-clayers"].template as<read_series>();
104 read_series players = vm[
"geo-tgeo-players"].template as<read_series>();
108 vm[
"geo-tgeo-nlayernames"].template as<read_strings>();
110 vm[
"geo-tgeo-clayernames"].template as<read_strings>();
112 vm[
"geo-tgeo-playernames"].template as<read_strings>();
114 vm[
"geo-tgeo-nmodulenames"].template as<read_strings>();
116 vm[
"geo-tgeo-cmodulenames"].template as<read_strings>();
118 vm[
"geo-tgeo-pmodulenames"].template as<read_strings>();
120 vm[
"geo-tgeo-nmoduleaxes"].template as<read_strings>();
122 vm[
"geo-tgeo-cmoduleaxes"].template as<read_strings>();
124 vm[
"geo-tgeo-pmoduleaxes"].template as<read_strings>();
132 for (
size_t idet = 0; idet < clayers.size(); ++idet) {
135 int cn = nlayers[idet];
136 int cc = clayers[idet];
137 int cp = players[idet];
139 for (
int in = 0;
in < cn; ++
in, ++tin) {
147 for (
int ic = 0; ic < cc; ++ic, ++tic) {
155 for (
int ip = 0; ip <
cp; ++ip, ++tip) {
164 layerBuilderConfig.
unit = unitScalor;
167 detLayerConfigs.push_back(layerBuilderConfig);
169 return detLayerConfigs;