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.

integer iargreal*8 angle,ekine! Arguments! Local variablesif (iarg.eq.3.and.ir(np).eq.3) then! Angle w.r.t. z axis in degreesangle=acos(w(np))*180./3.14159if (iq(np).eq.0) thenekine=e(np)elseekine=e(np)-RM! Get kinetic energyend ifwrite(6,100) ekine,iq(np),angle100 format(T21,F10.3,T33,I10,T49,F10.1)end ifreturnend!--------------------------last line of ausgab.f------------------------!-------------------------------howfar.f--------------------------------!-----------------------------------------------------------------------!23456789|123456789|123456789|123456789|123456789|123456789|123456789|12! ----------------------------------------------------------------------! Required (geometry) subroutine for use with the <strong>EGS5</strong> Code System!***********************************************************************!! The following is a general specification of howfar! given a particle at (x,y,z) in region ir and going in direction! (u,v,w), this routine answers the question, can the particle go! a distance ustep without crossing a boundary! If yes, it merely returns! If no, it sets ustep=distance to boundary in the current! direction and sets irnew to the region number on the! far side of the boundary (this can be messy in general!)!! The user can terminate a history by setting idisc>0. here we! terminate all histories which enter region 3 or are going! backwards in region 1!! | |! Region 1 | Region 2 | Region 3! | |! e- =========> | | e- or photon ====>! | |! vacuum | Ta | vacuum!!***********************************************************************subroutine howfar146

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

Saved successfully!

Ooh no, something went wrong!