Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DD4hepMaterialRecording.cpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file DD4hepMaterialRecording.cpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2017-2020 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 
17 
18 #include <memory>
19 
20 #include <boost/program_options.hpp>
21 
22 using namespace ActsExamples;
23 
24 int main(int argc, char* argv[]) {
25  // Setup and parse options
26  auto desc = Options::makeDefaultOptions();
28  Options::addOutputOptions(desc, OutputFormat::Root);
33  auto vm = Options::parse(desc, argc, argv);
34  if (vm.empty()) {
35  return EXIT_FAILURE;
36  }
37 
38  // Setup the DD4hep detector
39  auto dd4hepCfg = Options::readDD4hepConfig<po::variables_map>(vm);
40  auto geometrySvc = std::make_shared<DD4hep::DD4hepGeometryService>(dd4hepCfg);
41  auto detector = std::make_shared<DD4hep::DD4hepDetector>(geometrySvc);
42 
43  return runMaterialRecording(
44  vm, std::make_unique<DDG4DetectorConstructionFactory>(detector));
45 }