4 Answer for exercisesIt is recommended to run ucxyz <strong>phantom</strong>.f and to save egs5job.out, egs5job.pict whichare the results <strong>with</strong> different file names like xyz <strong>phantom</strong>.out, xyz <strong>phantom</strong>.pictfor comparisons <strong>with</strong> the results <strong>of</strong> following problems.4.1 Problem 11. cp ucxyz <strong>phantom</strong>.f ucxyz <strong>phantom</strong>1.f2. cp ucxyz <strong>phantom</strong>.data ucxyz <strong>phantom</strong>1.data3. cp ucxyz <strong>phantom</strong>.inp ucxyz <strong>phantom</strong>1.inp4. Modify ucxyz <strong>phantom</strong>1.f as follows: Add variables for source data.Chanfgetoreal*8* depeh(LIMAX,LJMAX,LKMAX),depeh2(LIMAX,LJMAX,LKMAX),* dose(LIMAX,LJMAX,LKMAX),doseun(LIMAX,LJMAX,LKMAX)real*8* depeh(LIMAX,LJMAX,LKMAX),depeh2(LIMAX,LJMAX,LKMAX),* dose(LIMAX,LJMAX,LKMAX),doseun(LIMAX,LJMAX,LKMAX)* ,esbin(MXEBIN),espdf(MXEBIN),escdf(MXEBIN) Add variable for a number <strong>of</strong> source energy data.Changet integer* i,ii,iii,icases,idin,idose,ie,ipage,irl,j,jhist,jj,jl,ju,k,* kkk,nlist,nperpginteger* i,ii,iii,icases,idin,idose,ie,ipage,irl,j,jhist,jj,jl,ju,k,* kkk,nlist,nperpg,nsebin Add open statement for source data file.Changetoopen(6,file='egs5job.out',status='unknown')open(6,file='egs5job.out',status='unknown')open(2,file='co60.inp',status='unknown') co60.inp is the data file including source gamma-ray energies and theirpdf for Co-60 as follows:1.173,1.3330.5,0.5 Add statements to read source data and to create cdf from pdf data.Change! Source position from <strong>phantom</strong> surface in cm.sposi=10.0to40
! Source position from <strong>phantom</strong> surface in cm.sposi=10.0nsebin=2! Number <strong>of</strong> source energy binsread(2,*) (esbin(i),i=1,nsebin)read(2,*) (espdf(i),i=1,nsebin)!---------------------------! Calculate CDF from pdf!---------------------------tnum=0.D0do ie=1,nsebintnum=tnum+espdf(ie)end doescdf(1)=espdf(1)/tnumdo ie=2,nsebinescdf(ie)=escdf(ie-1)+espdf(ie)/tnumend do Modify the maximum electron kinetic energy used.Changeekein=1.253! Kinetic energy <strong>of</strong> source photontoekein=esbin(nsebin) ! Maximum kinetic energy} Add sampling routines for source photon energy sampling.Changeekin=ekeintocall randomset(rnnow)do ie=1,nsebinif(rnnow.le.escdf(ie)) go to 1000end do1000 ekin=esbin(ie) Modify output statement concerning the source energy.Change300 FORMAT(/' Absorbed energy <strong>inside</strong> <strong>phantom</strong> for 1.253MeV photon'/to300 FORMAT(/' Absorbed energy <strong>inside</strong> <strong>phantom</strong> for Co-60 photon'/5. Run ucxyz <strong>phantom</strong>1.f by egs5run. In the case <strong>of</strong> Linux or CygwinEnter ucxyz <strong>phantom</strong>1 as the user code.Simply enter "return" as the file name for unit 4 and 25.Enter 1 for "Does this user code read from the terminal?". In the case <strong>of</strong> DOSegs5run ucxyz <strong>phantom</strong>16. Check egs5job.out to confirm average source energy is nearly equal to 1.253MeV.Compare the obtained results <strong>with</strong> xyz <strong>phantom</strong>.out.4.2 Problem 21. cp ucxyz <strong>phantom</strong>1.f ucxyz <strong>phantom</strong>2.f2. cp ucxyz <strong>phantom</strong>1.data ucxyz <strong>phantom</strong>2.data3. cp ucxyz <strong>phantom</strong>1.inp ucxyz <strong>phantom</strong>2.inp41
- 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: 3 Exercise problems3.1 Problem 1 :
- 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 and 62: ! =======================if (iwatch
- Page 63 and 64: do k=kdosl(idose),kdosu(idose)do j=
- 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