Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:14:25

0001 //==========================================================================
0002 //  AIDA Detector description implementation 
0003 //--------------------------------------------------------------------------
0004 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
0005 // All rights reserved.
0006 //
0007 // For the licensing terms see $DD4hepINSTALL/LICENSE.
0008 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
0009 //
0010 // Author     : M.Frank
0011 //
0012 //==========================================================================
0013 
0014 // Framework include files
0015 #include <DDG4/Geant4GDMLDetector.h>
0016 
0017 // C/C++ include files
0018 #include <iostream>
0019 
0020 //#define GEANT4_HAS_GDML
0021 
0022 #ifdef GEANT4_HAS_GDML
0023 #include <G4GDMLParser.hh>
0024 #endif
0025 
0026 dd4hep::sim::Geant4GDMLDetector::Geant4GDMLDetector(const std::string& gdmlFile)
0027   : m_fileName(gdmlFile) {
0028 }
0029 
0030 G4VPhysicalVolume* dd4hep::sim::Geant4GDMLDetector::Construct() {
0031 #ifdef GEANT4_HAS_GDML
0032   G4GDMLParser parser;
0033   parser.Read( m_fileName );
0034   m_world = parser.GetWorldVolume();
0035 #endif
0036   return m_world;
0037 }