File indexing completed on 2025-01-30 09:17:46
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 from __future__ import absolute_import, unicode_literals
0012 import sys
0013 import time
0014 import DDG4
0015 import MiniTelSetup
0016 from DDG4 import OutputLevel as Output
0017
0018
0019 """
0020
0021 dd4hep example setup using the python configuration
0022
0023 \author M.Frank
0024 \version 1.0
0025
0026 """
0027
0028
0029 def run():
0030 m = MiniTelSetup.Setup()
0031 if len(sys.argv) >= 2 and sys.argv[1] == "batch":
0032 m.kernel.NumEvents = 200
0033 m.kernel.UI = ''
0034 DDG4.setPrintLevel(Output.WARNING)
0035
0036 m.configure()
0037 m.setupGun()
0038 part = m.setupGenerator()
0039 part.OutputLevel = Output.DEBUG
0040
0041 hit_tuple = DDG4.EventAction(m.kernel, 'HitTupleAction/MiniTelTuple', True)
0042 hit_tuple.OutputFile = 'MiniTel_EnergyDeposits_' + time.strftime('%Y-%m-%d_%H-%M') + '.root'
0043 hit_tuple.Collections = ['*']
0044 m.kernel.eventAction().add(hit_tuple)
0045
0046 m.setupPhysics()
0047
0048 m.geant4.execute()
0049
0050
0051 if __name__ == "__main__":
0052 run()