Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-07-24 08:23:10

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