File indexing completed on 2026-07-24 08:23:10
0001
0002
0003
0004
0005
0006
0007
0008
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
0033
0034
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()