File indexing completed on 2025-02-25 09:20:19
0001
0002
0003
0004
0005
0006
0007
0008
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
0034
0035
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()