Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-20 08:25:14

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