EGS5 Bug Alert
Initialization of photon electric vector

Status of Bug

Bug was fixed. (Feb 28, 2015)

When a flag to enable linearly polarized photon scattering, lpolar(), is turned on by setting its values to be 1, initial value of any photon electric vector must be set. Otherwise, photon electric vector will have arbitral value and may not be perpenducular to photon propagation vector. This may disturb normarization of propagation vector and cause error in geometry calculation.

When a user intentionally turn on lpolar()=1 to simulate photon scattering while considering the effect of linear polarization, initial electric vector of source photon is specified in user code. Electric vector of photons from compton, rayleigh, brems, annihilation gamma [at rest] is adequately handled.

Recently two things were found and they were fixed.

The first point: Some user turned on lpolar()=1 but did not specified initial electric vector. This was written with examples in a manual when linearly polarized photon scatterinig was introduced into EGS4 code. [1] But this description was not succeeded in EGS5 manual. Also, in ucsampl5.f and ucsampcg.f, only lpolar()=1 is included but initialization of uf(1) etc was not included.
If one want to start unpolarized photon transport while considering linearly polarized photon scatttering, set UF(1)=0.0 VF(1)=0.0 WF(1)=0.0 just before call shower, and set LPOLAR(I)=1 .
This was added to manual (description on lpolar) and sample codes.

The second point is that electric vector of some photon was not set for optional case. This is necessary to prevent the case that electric vector is left for NP=2 (or greater) and new photon propagation vector is written for the same NP. In this case electric vector and propagation vector may not be perpenducular and this cause the same problem as source photon. Electric vector of photons from brems with splitting, fluorescent X ray after photoelectric effect and EII was not handled. Electric vector of photons from annihilation in motion was set but it had problem. To fix these, egs5_collis.f, egs5_eii.f, and egs5_photo.f were updated.

Problem of annihilation photon in motion:
In subroutine annih, a line of np=np+1 appears and then program returns to collis. In this point, annihilation photon is located at np and np-1. Right after this, uf(np)=0.0; uf(np+1)=0.0 etc appears in collis. This is modified as uf(np)=0.0; uf(np-1)=0.0 etc.


Reference
1. Y.Namito, S.Ban and H.Hirayama, "LSCAT: Low-Energy Photon-Scattering Expansion for the EGS4 Code" KEK Internal 95-10(Aug 1995), Page 9. Download PDF file from KEK library.


return to main EGS web page
Webmasters

Last updated 5Mar2015