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.

icol=<br />

* int(dlog10(ebin(j)*10000.0/float(ncase))/binmax*48.0+0.999)<br />

if (icol.eq.0) icol=1<br />

else<br />

icol = 1<br />

endif<br />

line(icol)=’*’<br />

! Load output array at desired location<br />

write(6,180) bwidth*j,ebin(j)/float(ncase),line<br />

180 format(F10.4,F10.4,48A1)<br />

line(icol)=’ ’<br />

! Reblank<br />

end do<br />

stop<br />

end<br />

!-------------------------last line of main code------------------------<br />

!-------------------------------ausgab.f--------------------------------<br />

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

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

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

! Required subroutine for use with the <strong>EGS5</strong> Code System<br />

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

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

!<br />

! In this AUSGAB routine for TUTOR7 we score photons reflected<br />

! from the slab (ir(np)=1 and iq(np)=0).<br />

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

subroutine ausgab(iarg)<br />

implicit none<br />

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

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

! Main EGS "header" file<br />

! COMMONs required by <strong>EGS5</strong> code<br />

common/score/bwidth,ebin(50)<br />

real*8 bwidth,ebin<br />

integer iarg<br />

integer ibin,irl<br />

! Arguments<br />

! Local variable<br />

irl=ir(np)<br />

! Local variable<br />

if(irl.eq.1.and.iq(np).eq.0) then ! Photon is reflected<br />

! Increment bin corresponding to photon energy<br />

ibin= min0 (int(e(np)/bwidth + 0.999), 50)<br />

if (ibin.ne.0) then<br />

ebin(ibin)=ebin(ibin)+1<br />

end if<br />

end if<br />

183

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

Saved successfully!

Ooh no, something went wrong!