28.11.2014 Views

THE EGS5 CODE SYSTEM

THE EGS5 CODE SYSTEM

THE EGS5 CODE SYSTEM

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

do i=1,ncases<br />

uf(1)=ufi<br />

vf(1)=vfi<br />

wf(1)=wfi<br />

call shower(iqi,e,xi,yi,zi,ui,vi,wi,iri,wti)<br />

end do<br />

Example 2. Partially linearly polarized photon source with source propagation vector along<br />

the z-direction and polarization vector along the y-axis with P=0.85 (P is the degree of linear<br />

polarization):<br />

ui=0.0<br />

vi=0.0<br />

wi=1.0<br />

pval=0.85<br />

pratio=0.5+pval*0.5<br />

! Degree of linear polarization<br />

! Ratio of y-polarization<br />

do i=1,ncases<br />

call randomset(value)<br />

if(value.lt.pratio) then<br />

ufi=0.0<br />

vfi=1.0<br />

wfi=0.0<br />

else<br />

ufi=1.0<br />

vfi=0.0<br />

wfi=0.0<br />

end if<br />

uf(1)=ufi<br />

vf(1)=vfi<br />

wf(1)=wfi<br />

call shower(iqi,e,xi,yi,zi,ui,vi,wi,iri,wti)<br />

end do<br />

Example 3. Unpolarized photon source. In a photon transport simulation modeling linear polarization,<br />

an unpolarized photon source is automatically generated by setting:<br />

uf(1)=0.0<br />

vf(1)=0.0<br />

wf(1)=0.0<br />

335

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

Saved successfully!

Ooh no, something went wrong!