ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DD4hepToG4Svc.cpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file DD4hepToG4Svc.cpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2017 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 
15  : m_cfg(cfg), m_geant4Geometry(nullptr) {}
16 
19  // delete m_geant4Geometry;
20 }
21 
23  if (m_cfg.dd4hepService->lcdd()) {
25  new FW::DD4hepG4::GeoConstruction(*(m_cfg.dd4hepService->lcdd())));
26  m_geant4Geometry = detector;
27  }
29  // if (!m_geant4Geometry) FW::ProcessCode::ERROR;
31 }
32 
34  if (!m_geant4Geometry)
35  buildGeant4Geometry();
36  return m_geant4Geometry;
37 }