EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DD4hepDetector.cpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file DD4hepDetector.cpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2019 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 
16 
17 #include <boost/program_options.hpp>
18 
20  boost::program_options::options_description& opt) const {
22 }
23 
25  const boost::program_options::variables_map& vm,
26  std::shared_ptr<const Acts::IMaterialDecorator> mdecorator)
27  -> std::pair<TrackingGeometryPtr, ContextDecorators> {
28  Acts::GeometryContext dd4HepContext;
29  // read the detector config & dd4hep detector
30  auto dd4HepDetectorConfig =
31  ActsExamples::Options::readDD4hepConfig<po::variables_map>(vm);
32  dd4HepDetectorConfig.matDecorator = mdecorator;
33  auto geometrySvc =
34  std::make_shared<ActsExamples::DD4hep::DD4hepGeometryService>(
35  dd4HepDetectorConfig);
36  TrackingGeometryPtr dd4tGeometry =
37  geometrySvc->trackingGeometry(dd4HepContext);
38  ContextDecorators dd4ContextDeocrators = {};
39  // return the pair of geometry and empty decorators
40  return std::make_pair<TrackingGeometryPtr, ContextDecorators>(
41  std::move(dd4tGeometry), std::move(dd4ContextDeocrators));
42 }