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.

Assume that x i is the result at the i-th history. Calculate the mean value <strong>of</strong> x :x = 1 NNXi=1x i (1) Estimate the variance associated <strong>with</strong> the <strong>distribution</strong> <strong>of</strong> x i :s 2 = 1N ; 1NXi=1(x i ; x) 2 ' x 2 ; (x) 2 (x 2 = 1 NNXi=1x 2 i ): (2) Estimate the variance associated <strong>with</strong> the <strong>distribution</strong> <strong>of</strong> x:s 2 x = 1 N s2 ' 1 N [x2 ; (x) 2 ] (3) Report the statistical error as:s x ' [ 1 N (x2 ; x 2 )] 1=2 (4)2.8.2 Step 9: Output <strong>of</strong> resultsObtained results from ncases histories are analyzed and outputted in this part.write(1,280) sposi280 FORMAT(/' Absorbed energy <strong>inside</strong> <strong>phantom</strong> for 1.253MeV photon'/*' Source position ',F10.1,' cm from <strong>phantom</strong> surface'/*' Within 1cm x 1 cm area after 5 cm air')write(1,290) ncases, xhbeam, yhbeam290 FORMAT(1X,I8,' photons normally incident from front side'/*' Half width <strong>of</strong> beam is ',G15.5,'cm for X and ',G15.5,'cm for Y')! ---------------------------------------! Calculate average and its uncertainties! ---------------------------------------do k=1,kmaxdo j=1,jmaxdo i=1,imaxirl=1+i+(j-1)*imax+(k-1)*ijmaxamass=(xbound(i+1)-xbound(i))** (ybound(j+1)-ybound(j))** (zbound(k+1)-zbound(k))*rhor(irl)dose(i,j,k)=depeh(i,j,k)/ncasesdepeh2(i,j,k)=depeh2(i,j,k)/ncasesdoseun(i,j,k)=dsqrt((depeh2(i,j,k)-* dose(i,j,k)*dose(i,j,k))/ncases)dose(i,j,k)=dose(i,j,k)*1.602D-10/amassdoseun(i,j,k)=doseun(i,j,k)*1.602D-10/amassend doend doend do!----------------------------------------------! Print out the results <strong>of</strong> central <strong>phantom</strong>!----------------------------------------------i=imax/2+1j=jmax/2+1do kkk=2,kmax-1depths=zbound(kkk)depthl=zbound(kkk+1)irl=1+i+(j-1)*imax+(kkk-1)*ijmaxwrite(6,300) depths,depthl,(media(ii,med(irl)),ii=1,24),34

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

Saved successfully!

Ooh no, something went wrong!