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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

! ----------------------! Select incident energy! ----------------------ekin = ekeinwtsum = wtsum + wtinetot = ekin + 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)! =========================================================!----------------------------------! Sum variable and its square.!----------------------------------do k=1,kmaxdo j=1,jmaxdo i=1,imaxdepeh(i,j,k)=depeh(i,j,k)+depe(i,j,k)depeh2(i,j,k)=depeh2(i,j,k)+depe(i,j,k)*depe(i,j,k)depe(i,j,k)=0.D0end doend doend d<strong>of</strong>aexps=faexps+faexpfaexp2s=faexp2s+faexp*faexpfaexp=0.0fexpss=fexpss+fexpsfexps2s=fexps2s+fexps*fexpsfexps=0.0ncount = ncount + 1! ======================if (iwatch .gt. 0) call swatch(-1,iwatch)! ======================end dott=etime(tarray)tt1=tarray(1)cputime=tt1-tt0write(2,250) cputime250 format(' Elapsed Time (sec)=',G15.5)! Count total number <strong>of</strong> actual cases! -----------------------! End <strong>of</strong> CALL SHOWER loop! -----------------------54

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

Saved successfully!

Ooh no, something went wrong!