Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-25 09:20:19

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 # ==========================================================================
0011 #
0012 #
0013 from __future__ import absolute_import, unicode_literals
0014 import os
0015 import sys
0016 import DDG4
0017 #
0018 """
0019 
0020    dd4hep simulation example setup using the python configuration
0021 
0022    @author  M.Frank
0023    @version 1.0
0024 
0025 """
0026 
0027 
0028 def run():
0029   kernel = DDG4.Kernel()
0030   install_dir = os.environ['DD4hepExamplesINSTALL']
0031   kernel.loadGeometry(str("file:" + install_dir + "/examples/ClientTests/compact/TrackingRegion.xml"))
0032   geant4 = DDG4.Geant4(kernel, tracker='Geant4TrackerCombineAction')
0033   # Configure field
0034   # field = geant4.setupTrackingField(prt=True)
0035   # Configure G4 geometry setup
0036   seq, act = geant4.addDetectorConstruction("Geant4DetectorGeometryConstruction/ConstructGeo")
0037   act.DebugVolumes = True
0038   act.DebugPlacements = True
0039   geant4.setupTracker('SiliconBlock')
0040   kernel.configure()
0041   kernel.initialize()
0042   kernel.terminate()
0043   sys.exit(0)
0044 
0045 
0046 if __name__ == "__main__":
0047   run()