nlines = 10idin = -1totke = 0.wtsum = 0.iwatch=0! =========================call ecnsv1(0,nreg,totke)call ntally(0,nreg)! =========================write(6,270)270 FORMAT(//,' Energy/Coordinates/Direction cosines/etc.',/,* 6X,'e',14X,'x',14X,'y',14X,'z',* 14X,'u',14X,'v',14X,'w',11X,'iq',3X,'ir',1X,'iarg',/)! Energy bin widthdeltae=ekein / 50! Zero the variablesdepe=0.D0pefs=0.D0pef2s=0.D0tefs=0.D0tef2S=0.D0do j=1,50phs(j)=0.D0ph2s(j)=0.D0do ntype=1,3spec(ntype,j)=0.D0specs(ntype,j)=0.D0spec2s(ntype,j)=0.D0end doend do! Set historiesncases=10000! Set maximum number for pictmaxpict=50tt=etime(tarray)tt0=tarray(1)!-----------------------------------------------------------------------! Step 8: Shower-call!-----------------------------------------------------------------------! Write batch numberwrite(39,fmt="('0 1')")! ========================if(iwatch.gt.0) call swatch(-99,iwatch)! ========================do i=1,ncases! ----------------------! Select incident energy! ----------------------wtin = 1.0wtsum = wtsum + wtinetot = ekein + iabs(iqin)*RMif(iqin.eq.1) thenavailke = ekein + 2.0*RMelseavailke = ekeinend iftotke = totke + availke! ----------------------! Select incident angle! ----------------------! -------------------------! Start of shower call-loop! -------------------------! Keep running sum of weights! Incident total energy (MeV)! Available K.E. (MeV) in system! for positron! Available K.E. (MeV) in system! for photon and electron! Keep running sum of KE! ---------------------------------------------------! Print first NWRITE or NLINES, whichever comes first! ---------------------------------------------------if (ncount .le. nwrite .and. ilines .le. nlines) then55
ilines = ilines + 1write(6,280) etot,xin,yin,zin,uin,vin,win,iqin,irin,idin280 FORMAT(7G15.7,3I5)end if! -----------------------------------------------------------! Compare maximum energy of 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 normalization of 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 ' normalized.',3e12.5)")uin,vin,winstopend if! ==========================================================call shower (iqin,etot,xin,yin,zin,uin,vin,win,irin,wtin)! ==========================================================! If some energy is deposited inside detector add pulse-height! and efficiency.if (depe .gt. 0.D0) thenie=depe/deltae + 1if (ie .gt. 50) ie = 50phs(ie)=phs(ie)+wtinph2s(ie)=ph2s(ie)+wtin*wtintefs=tefs + wtintef2s=tef2s + wtin*wtinif(depe .ge. ekein*0.999) thenpefs=pefs +wtinpef2s=pef2s +wtin*wtinend ifdepe = 0.D0end ifdo ntype=1,3do ie=1,50specs(ntype,ie)=specs(ntype,ie)+spec(ntype,ie)spec2s(ntype,ie)=spec2s(ntype,ie)+* spec(ntype,ie)*spec(ntype,ie)spec(ntype,ie)=0.D0end doend doncount = ncount + 1! ========================if(iwatch.gt.0) call swatch(-1,iwatch)! ========================end do! ========================if(iwatch.gt.0) call swatch(-88,iwatch)! ========================! Count total number of actual cases! -----------------------! End of CALL SHOWER loop! -----------------------call plotxyz(99,0,0,0.D0,0.D0,0.D0,0.D0,0,0.D0,0.D0)write(39,fmt="('9')")tt=etime(tarray)tt1=tarray(1)cputime=tt1-tt0write(6,300) cputime300 format(' Elapsed Time (sec)=',G15.5)! Set end of batch for CG View!-----------------------------------------------------------------------! Step 9: Output-of-results!-----------------------------------------------------------------------write(6,310) ncount,ncases,totke56
- Page 1 and 2:
KEK Internal 2011-5December 2011R/D
- Page 3 and 4:
Lecture Notes ofResponse calculatio
- Page 5 and 6:
3 Details of user code 313.1 Main p
- Page 7 and 8:
1 Combinatrial Geometry (CG)2 Combi
- Page 9 and 10: ody 3 2 body + ; OR B23A1Figure 2
- Page 11 and 12: Z4 +4Z5 +5 -3Z6 +6 -5END1 0 2 3 4 0
- Page 13 and 14: end if! ==============call block_se
- Page 15 and 16: ! pdf data for many sourcedeltae=0.
- Page 17 and 18: ! ---------------------------------
- Page 19 and 20: sigph=dsqrt((ph2s(ie)-avph*avph)/nc
- Page 21 and 22: 6 6.1 NaI 1. Cs-137 (0.662MeV) 2.
- Page 23 and 24: ekein=1.253ekein=1.333{ ! ---------
- Page 25 and 26: ROuter vacuum (region 6)Air region
- Page 27 and 28: nmed=2 medarr(1)='NAImedarr(2)='ALm
- Page 29 and 30: ROuter vacuum (region 4)Air region
- Page 31 and 32: EGS5 sample user code (ucnaicgv.f)R
- Page 33 and 34: operator, it means that the region
- Page 35 and 36: 2 Outlines of sample user code uccg
- Page 37 and 38: include 'auxcommons/edata.f'include
- Page 39 and 40: The material assignment is read in
- Page 41 and 42: ! Write batch numberwrite(39,fmt="(
- Page 43 and 44: ! ---------------------------------
- Page 45 and 46: a distance to the boundary of regio
- Page 47 and 48: { Add sampling routines for source
- Page 49 and 50: ROuter vacuum (region 6)Air region
- Page 51 and 52: to* xi0,yi0,zi0,avab,depes,depe2s,s
- Page 53 and 54: ROuter vacuum (region 4)Air region
- Page 55 and 56: Appendix: Full listings of ucnaicgv
- Page 57 and 58: open(39,FILE='egs5job.pic',STATUS='
- Page 59: write(6,140)140 FORMAT(/,' HATCH-ca
- Page 63 and 64: * 14X,' Positron')do ie=1,50elow=de
- Page 65 and 66: ! ---------------------------------
- Page 67 and 68: ccyidd=y_np+tval0*v_npzidd=z_np+tva