10.07.2015 Views

THE EGS5 CODE SYSTEM

THE EGS5 CODE SYSTEM

THE EGS5 CODE SYSTEM

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

As an example of how to write an AUSGAB subprogram, consider the previous three regiongeometry of Figure B.2. Suppose that we wish to score only photons that emanate from Region 2into Region 3. The AUSGAB subprogram that will accomplish this is given below (in this examplewe print out the stack variables plus IARG).subroutine ausgab(iarg)implicit noneinclude ’include/egs5_h.f’! Main EGS "header" fileinclude ’include/egs5_stack.f’integer iarg! Argumentsif(iarg.eq.3.and.iq(np).eq.0.and.ir(np).eq.3) thenwrite(6,1000)e(np),x(np),y(np),z(np),u(np),v(np),w(np),1 iq(np),ir(np),iargend if1000 format(7g15.7,3i5)returnend343

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

Saved successfully!

Ooh no, something went wrong!