19 #include <boost/program_options.hpp>
21 namespace ActsExamples {
33 std::pair<std::shared_ptr<const Acts::TrackingGeometry>,
34 std::vector<std::shared_ptr<ActsExamples::IContextDecorator>>>
35 build(
const boost::program_options::variables_map& vm,
38 std::shared_ptr<const Acts::IMaterialDecorator>
matDeco =
nullptr;
39 auto matType = vm[
"mat-input-type"].template as<std::string>();
40 if (matType ==
"none") {
41 matDeco = std::make_shared<const Acts::MaterialWiper>();
42 }
else if (matType ==
"file") {
44 auto fileName = vm[
"mat-input-file"].template as<std::string>();
46 if (fileName.find(
".json") != std::string::npos ||
47 fileName.find(
".cbor") != std::string::npos) {
51 matDeco = std::make_shared<const Acts::JsonMaterialDecorator>(
53 }
else if (fileName.find(
".root") != std::string::npos) {
56 rootMatDecConfig.
fileName = fileName;
57 matDeco = std::make_shared<const ActsExamples::RootMaterialDecorator>(
63 return detector.
finalize(vm, matDeco);