12.07.2015 Views

cg Version

cg Version

cg Version

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

! Write batch numberwrite(39,fmt="('01')")! ========================if(iwatch.gt.0) call swatch(-99,iwatch)! ========================do i=1,ncases! ----------------------! Select incident energy! ----------------------wtin = 1.0wtsum = wtsum + wtinetot = ekein + iabs(iqin)*RMavailke = etot + iqin*RMtotke = 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! Keep running sum of KE! ---------------------------------------------------! Print first NWRITE or NLINES, whichever comes first! ---------------------------------------------------if (ncount .le. nwrite .and. ilines .le. nlines) thenilines = ilines + 1write(6,280) etot,xin,yin,zin,uin,vin,win,iqin,irinn,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,irinn,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 if36

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

Saved successfully!

Ooh no, something went wrong!