13.07.2015 Views

Lecture Notes of Dose distribution calculation inside phantom with ...

Lecture Notes of Dose distribution calculation inside phantom with ...

Lecture Notes of Dose distribution calculation inside phantom with ...

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.

vin=dsin(phai)*sinthdis=sposi/winxpf=dis*uinypf=dis*vinif (dabs(xpf).gt.xhbeam.or.dabs(ypf).gt.yhbeam) go to 200if (sposi.gt.zbound(2)-zbound(1)) thendisair=(sposi-(zbound(2)-zbound(1)))/winxin=disair*uinyin=disair*vinzin=zbound(1)elsexin=0.D0yin=0.D0zin=-sposiend ifdo i=1,imaxif (xbound(i+1).gt.xin) go to 210end do210 do j=1,jmaxif (ybound(j+1).gt.yin) go to 220end do! -------------! Input region! -------------220 k=1irin=1+i+(j-1)*imax! ----------------------! Select incident energy! ----------------------ekein = ekeinwtsum = wtsum + wtinetot = ekein + iabs(iqin)*RMavailke = etot + iqin*RMtotke = totke + availkelatchi=0! Keep running sum <strong>of</strong> weights! Incident total energy (MeV)! Available K.E. (MeV) in system! Keep running sum <strong>of</strong> KE! ---------------------------------------------------! Print first NWRITE or NLINES, whichever comes first! ---------------------------------------------------if (ncount .le. nwrite .and. ilines .le. nlines) thenilines = ilines + 1write(6,230) etot,xin,yin,zin,uin,vin,win,iqin,irin,idin230 FORMAT(7G15.7,3I5)end if! -----------------------------------------------------------! Compare maximum energy <strong>of</strong> material data and incident energy! -----------------------------------------------------------if(etot+(1-iabs(iqin))*RM.gt.emaxe) thenwrite(6,fmt="(' Stopped in MAIN.',1 ' (Incident kinetic energy + RM) > min(UE,UP+RM).')")stopend if! ----------------------------------------------------! Verify the normarization <strong>of</strong> source direction cosines! ----------------------------------------------------if(abs(uin*uin+vin*vin+win*win-1.0).gt.1.e-6) thenwrite(6,fmt="(' Following source direction cosines are not',1 ' normarized.',3e12.5)")uin,vin,winstopend if! =========================================================call shower (iqin,etot,xin,yin,zin,uin,vin,win,irin,wtin)7

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

Saved successfully!

Ooh no, something went wrong!