10.07.2015 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.

! ------------------------------close(UNIT=KMPI)close(UNIT=KMPO)! Pick up cross section data for waterwrite(6,150) ae(1)-RM, ap(1)150 format(/’ Knock-on electrons can be created and any electron ’,*’followed down to’ /T40,F8.3,’ MeV kinetic energy’/*’ Brem photons can be created and any photon followed down to’,*/T40,F8.3,’ MeV’)! Compton events can create electrons and photons below these cutoffs!-----------------------------------------------------------------------! Step 6: Initialization-for-howfar!-----------------------------------------------------------------------zbound=0.5! Plate is 0.5 cm thick!-----------------------------------------------------------------------! Step 7: Initialization-for-ausgab!-----------------------------------------------------------------------do i=1,3count(i)=0.0entot(i)=0.0! Zero scoring array at startend do! We want to set flags in ausgab every time a rayleigh scattering! or Compton scattering occurs. Set the flags in iausfl(comin! epcont) to signal the egs system to make the appropriate callsiausfl(18)=1iausfl(24)=1!-----------------------------------------------------------------------! Step 8: Shower-call!-----------------------------------------------------------------------! Initiate the shower ncase timesncase=10000do i=1,NCASEcall shower(iqin,ein,xin,yin,zin,uin,vin,win,irin,wtin)end do!-----------------------------------------------------------------------! Step 9: Output-of-results!-----------------------------------------------------------------------! Normalize to % of photon numberanorm = 100./float(ncase)do i=1,3if (count(i).ne.0) thenentot(i)=entot(i)/count(i)! Get average energies171

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

Saved successfully!

Ooh no, something went wrong!