Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 09:17:46

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 from __future__ import absolute_import, unicode_literals
0012 import os
0013 import DDG4
0014 #
0015 """
0016 
0017    dd4hep example setup using the python configuration
0018    and reading a HepEvt event
0019 
0020    \author  M.Frank
0021    \version 1.0
0022 
0023 """
0024 
0025 
0026 def run():
0027   from MiniTelSetup import Setup
0028   args = DDG4.CommandLine()
0029   m = Setup()
0030   if args.batch:
0031     DDG4.setPrintLevel(DDG4.OutputLevel.WARNING)
0032     m.kernel.UI = ''
0033   m.configure()
0034   m.defineOutput()
0035   fname = os.environ['DD4hepExamplesINSTALL'] + '/examples/DDG4/data/Muons10GeV.HEPEvt'
0036   m.setupInput('Geant4EventReaderHepEvtShort|' + fname)
0037   m.setupGenerator()
0038   m.setupPhysics(model='FTFP_BERT')
0039   m.phys.decays = True
0040   m.run(num_events=1)
0041 
0042 
0043 if __name__ == '__main__':
0044   run()