Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GenericDetectorWithOptions.cpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file GenericDetectorWithOptions.cpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2022 CERN for the benefit of the Acts project
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
10 
12 
13 #include <boost/program_options.hpp>
14 
15 namespace ActsExamples {
16 
18  boost::program_options::options_description& opt) const {
20 }
21 
23  const boost::program_options::variables_map& vm,
24  std::shared_ptr<const Acts::IMaterialDecorator> mdecorator)
25  -> std::pair<TrackingGeometryPtr, ContextDecorators> {
27 
28  cfg.buildLevel = vm["geo-generic-buildlevel"].template as<size_t>();
29  // set geometry building logging level
30  cfg.surfaceLogLevel =
31  Acts::Logging::Level(vm["geo-surface-loglevel"].template as<size_t>());
32  cfg.layerLogLevel =
33  Acts::Logging::Level(vm["geo-layer-loglevel"].template as<size_t>());
34  cfg.volumeLogLevel =
35  Acts::Logging::Level(vm["geo-volume-loglevel"].template as<size_t>());
36 
37  cfg.buildProto = (vm["mat-input-type"].template as<std::string>() == "proto");
38 
39  return m_detector.finalize(cfg, std::move(mdecorator));
40 }
41 
42 } // namespace ActsExamples