28.11.2014 Views

THE EGS5 CODE SYSTEM

THE EGS5 CODE SYSTEM

THE EGS5 CODE SYSTEM

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

In order to use <strong>EGS5</strong> to answer the question “What comes out the far side of the plate?”, we have<br />

created the user code (tutor1.f) shown below. Also provided is the P<strong>EGS5</strong> input file required for<br />

this run (see Appendix C for a description of how to construct P<strong>EGS5</strong> input files).<br />

!***********************************************************************<br />

!<br />

! **************<br />

! * *<br />

! * tutor1.f *<br />

! * *<br />

! **************<br />

!<br />

! An <strong>EGS5</strong> user code. It lists the particles escaping from the back<br />

! of a 1 mm Ta plate when a pencil beam of 20 MeV electrons<br />

! is incident on it normally.<br />

!<br />

! For SLAC-R-730/KEK Report 2005-8: A simple example which ’scores’<br />

! by listing particles<br />

!<br />

! The following units are used: unit 6 for output<br />

!***********************************************************************<br />

!23456789|123456789|123456789|123456789|123456789|123456789|123456789|12<br />

!-----------------------------------------------------------------------<br />

!------------------------------- main code -----------------------------<br />

!-----------------------------------------------------------------------<br />

!-----------------------------------------------------------------------<br />

! Step 1: Initialization<br />

!-----------------------------------------------------------------------<br />

implicit none<br />

! ------------<br />

! <strong>EGS5</strong> COMMONs<br />

! ------------<br />

include ’include/egs5_h.f’<br />

! Main EGS "header" file<br />

include ’include/egs5_bounds.f’<br />

include ’include/egs5_media.f’<br />

include ’include/egs5_misc.f’<br />

include ’include/egs5_thresh.f’<br />

include ’include/egs5_useful.f’<br />

include ’include/egs5_usersc.f’<br />

include ’include/randomm.f’<br />

! bounds contains ecut and pcut<br />

! media contains the array media<br />

! misc contains med<br />

! thresh contains ae and ap<br />

! useful contains RM<br />

141

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!