faexrr=dsqrt((faexp2s-faexpa*faexpa)/ncases)faexpa=faexpa*1.6E-10/areafaexrr=faexrr*1.6E-10/areafexpsa=fexpss/ncasesfexps2s=fexps2s/ncasesfexerr=dsqrt((fexps2s-fexpsa*fexpsa)/ncases)fexpsa=fexpsa*1.6E-10/areafexerr=fexerr*1.6E-10/areaif (faexpa.gt.0.0) thenbsfa=fexpsa/faexpabsferr=bsfa*dsqrt((faexrr/faexpa)**2.+(fexerr/fexpsa)**2.)write(6,310) faexpa,faexrr,fexpsa,fexerr,bsfa,bsferr310 FORMAT(/' Exposure in free air (using mu_en) =', G15.5,'+-',G15.* 5,' Gy/incident'/ ' Exposure at <strong>phantom</strong> surface (using mu_en) ='* , G15.5,'+-',G15.5,'Gy/incident'/ ' Backscattering factor =',G15* .5,'+-',G15.5)elsewrite(6,320) faexpa,faexrr,fexpsa,fexerr320 FORMAT(/' Exposure in free air (using mu_en) =', G15.5,'+-',G15.* 5,' Gy/incident'/ ' Exposure at <strong>phantom</strong> surface (using mu_en) ='* , G15.5,'+-',G15.5,'Gy/incident')end if! ---------------------------! Write out the whole results! ---------------------------do idose=1,idgrp! Loop over groups <strong>of</strong> regions to analyze! Do output <strong>with</strong> one Z scan per pageif (izscan(idose).ne.0) then! Number <strong>of</strong> sets <strong>of</strong> depth per pagek = (kdosu(idose) - kdosl(idose))k = k + k/5 + 7nperpg = 60/kwrite(6,330) Title330 FORMAT(/10X,80A1//T10,'xyz(V01) dose outputs Gy.cm**2',* '(or Gy/incident particle for 0 area)')ipage=1 ! Count how many zgroups printed on this pagedo i=idosl(idose),idosu(idose)do j=jdosl(idose),jdosu(idose),4jl=jju=min(j+3,jdosu(idose))write(6,340) xbound(i),xbound(i+1),i340 FORMAT(/T15,'For x=',F10.3,' to',F10.3,5X,'i=',I3)write(6,350) (ybound(jj),jj=jl,ju+1)350 FORMAT(' ybounds:',F7.3,F12.3,3F17.3)write(6,360)(jj,jj=jl ,ju)360 FORMAT(T10,'j=',t17,5(I4,13X))write(6,370) zbound(kdosl(idose))370 FORMAT(' zbounds (',F10.3,')')do k=kdosl(idose),kdosu(idose)write(6,380) zbound(k+1),k,(dose(i,jj,k),* min(99.9, 100.*doseun(i,jj,k)/dose(i,jj,k)),* jj=jl,ju)380 FORMAT(F8.3,I4,4(1PE11.3,'-',0PF4.1,'%') )if (mod(k,5).eq.0) thenwrite(6,390)390 FORMAT(' ')end ifend doif(mod(ipage,nperpg).eq.0.and.(ju.ne.jdosu(idose).* or.i.ne.idosu(idose))) thenwrite(6,330) Titleipage=1elseipage=ipage+1end ifend do ! end j-loopend do ! end i-loopelse! Output x scans each pagei=idosu(idose)-idosl(idose)i=i+i/5+7nperpg=60/i ! Number <strong>of</strong> sets <strong>of</strong> bins per pagewrite(6,330) Titleipage=156
do k=kdosl(idose),kdosu(idose)do j=jdosl(idose),jdosu(idose),4jl=jju=min(j+3,jdosu(idose))write(6,400) zbound(k),zbound(k+1),k400 FORMAT(/T15,'for z=',F10.3,' to',F10.3,5X,'k=',I3)write(6,410) (ybound(jj),jj=jl,ju+1)410 FORMAT(' Ybounds:',F7.3,F12.3,3F17.3)write(6,420) (jj, jj=jl,ju)420 FORMAT(T10,'j=',T17,5(I4,13X))write(6,430) xbound(idosl(idose))430 FORMAT(' Xbounds (',F10.3,')')do i=idosl(idose),idosu(idose)write(6,440) xbound(i+1),i,(dose(i,jj,k),* min(99.9, 100.*doseun(i,jj,k)/dose(i,jj,k)),* jj=jl,ju)440 FORMAT(F8.3,I4,4(1PE11.3,'-',0PF4.1,'%') )if (mod(i,5).eq.0) thenwrite(6,fmt="(' ')")end ifend doif(mod(ipage,nperpg).eq.0.and.(ju.ne.jdosu(idose).* or.k.ne.kdosu(idose))) thenwrite(6,330) Titleipage=1elseipage=ipage+1end ifend do! end j-loopend do! end k-loopend if! end <strong>of</strong> x scan per page outputend do! end <strong>of</strong> idose loop! =============================call ecnsv1(1,nreg,totke)! =============================! ====================call counters_out(1)! ====================stopend!-------------------------last line <strong>of</strong> main code------------------------!----------------------------getvoxel.f---------------------------------! Version: 060907-1300! Read material and geomery data from egs5job.inp! 121119-1300 Fixed degug errors!-----------------------------------------------------------------------!23456789|123456789|123456789|123456789|123456789|123456789|123456789|12! ----------------------------------------------------------------------! Auxiliary subroutine for use <strong>with</strong> the EGS5 Code System! ----------------------------------------------------------------------! This is a data-entry subprogram for use <strong>with</strong> a general-purpose! egs5 user code to do cartesian coordinate dose deposition studies.! Every voxel (volume element) can have different materials and/or! varying densities (for use <strong>with</strong> CT data).! Basic pats <strong>of</strong> this subroutine related <strong>with</strong> geometry taken from! xyzdos.mor.! ----------------------------------------------------------------------!! voxels are labeled by indicies (i,j,k) and defined by:! xbound(i)
- Page 1 and 2:
KEK Internal 2011-8December 2011R/D
- Page 3 and 4:
Lecture Notes ofDose distribution c
- Page 5 and 6:
2.8.1 Statistical uncertainty . . .
- Page 7 and 8:
1 ucxyz phantom.f ucxyz phantom.f
- Page 9 and 10:
common/score/! Variables to score*
- Page 11 and 12: emaxe = 0.D0 ! dummy value to extra
- Page 13 and 14: vin=dsin(phai)*sinthdis=sposi/winxp
- Page 15 and 16: 2.9 Step 9: Output of results ()wr
- Page 17 and 18: ipeangswiedgeswiaugerswirayswipolar
- Page 19 and 20: ! ---------------------------------
- Page 21 and 22: end ifend ifend ifdnear(np)=dnearlr
- Page 23 and 24: 4 ucxyz phantom.f (egs5job.out, e
- Page 25 and 26: 4.2 1. cp ucxyz phantom1.f ucxyz ph
- Page 27 and 28: call randomset(rnnow)do ie=1,nsebin
- Page 29 and 30: Linux 4 ucxyz phantom3 25 Enter
- Page 31 and 32: Linux ucxyz phantom5 , 4 25 "Doe
- Page 33 and 34: 1 Outlines of sample user code ucxy
- Page 35 and 36: common/score/! Variables to score*
- Page 37 and 38: Output the material data and parame
- Page 39 and 40: totke = totke + availkelatchi=0! Ke
- Page 41 and 42: * rhor(irl),dose(i,j,kkk),doseun(i,
- Page 43 and 44: Ifahistorynumberislessthanmaxpict,
- Page 45 and 46: 3 Exercise problems3.1 Problem 1 :
- Page 47 and 48: ! Source position from phantom surf
- Page 49 and 50: At the above data, a first 201 is t
- Page 51 and 52: &INP AE=0.521,AP=0.0100,UE=2.011,UP
- Page 53 and 54: (b) Add new material (Iron).ChangeA
- Page 55 and 56: !**********************************
- Page 57 and 58: !----------------------------------
- Page 59 and 60: faexp=0.D0faexps=0.D0faexp2s=0.D0fe
- Page 61: ! =======================if (iwatch
- Page 65 and 66: ! Record 10a ipeangsw, Switches for
- Page 67 and 68: if (maxz.gt.LKMAX) thenwrite(ifto,'
- Page 69 and 70: zbound(in+1)=zbound(in)+widthend do
- Page 71 and 72: if(idosu(idgrp).le.0 .or. idosu(idg
- Page 73 and 74: !--------------------------------if
- Page 75 and 76: end ifend ifelse if (u(np) .lt. 0.0