File indexing completed on 2026-06-07 07:49:56
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 import DDG4
0012
0013 """
0014
0015 dd4hep example setup using the python configuration
0016
0017 \author M.Frank
0018 \version 1.0
0019
0020 """
0021
0022
0023 def run():
0024 from MiniTelSetup import Setup
0025 args = DDG4.CommandLine()
0026
0027 m = Setup(geometry=args.geometry)
0028 cmds = []
0029 if args.events:
0030 cmds = ['/run/beamOn ', str(args.events)]
0031
0032 if args.batch:
0033 DDG4.setPrintLevel(DDG4.OutputLevel.WARNING)
0034 cmds.append('/ddg4/UI/terminate')
0035 m.kernel.UI = ''
0036
0037
0038 seq, act = m.geant4.addDetectorConstruction("Geant4DetectorGeometryConstruction/ConstructGeo")
0039 if args.debug:
0040 act.DebugVolumes = True
0041 act.DebugRegions = True
0042 act.DebugLimits = True
0043
0044 seq, act = m.geant4.addDetectorConstruction("Geant4DetectorSensitivesConstruction/ConstructSD")
0045 m.ui.Commands = cmds
0046 m.configure()
0047 m.defineOutput()
0048 m.setupGun()
0049 m.setupGenerator()
0050 m.setupPhysics()
0051 m.run()
0052
0053
0054 if __name__ == "__main__":
0055 run()