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.

totke = totke + availkelatchi=0! 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(4G15.7/3G15.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 do! Count total number <strong>of</strong> actual cases! -----------------------! End <strong>of</strong> CALL SHOWER loop! -----------------------2.8.1 Statistical uncertaintyThe uncertainty <strong>of</strong> obtained, x, is estimated using the method used in MCNP in this user code. Assume that the <strong>calculation</strong> calls for N \incident" particle histories.33

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

Saved successfully!

Ooh no, something went wrong!