Skip to content

Commit

Permalink
Set shell_be correctly for xcom cross sections
Browse files Browse the repository at this point in the history
When xcom photon cross sections are used, switch the calling order of
EDGSET and init_compton subroutine in HATCH, in order to include binding
energies below 1 keV for detailed atomic relaxation simulation.

There are 3 different binding energy arrays used in EGSnrc:

binding_energies:  used in Moller, PHOTO, and RELAX
be_array:          used in COMPT
shell_be:          used in egs_eadl_relax

When $EADL_RELAX is true, all these arrays are being set to the same
energy values for consistency. If one uses epdl or xcom photon cross
sections, the corresponding binding energies are read from either
epdl_photo.data or xcom_photo.data. However, these files only provide
data down to 1 keV. To include binding energies below 1 keV for detailed
atomic relaxation simulation, the values from either incoh.data (xcom)
or relax.data (epdl) are used.

Also remove a commented out portion of the code and the unused variable
tot_prob.
  • Loading branch information
mainegra authored and ftessier committed May 25, 2017
1 parent 94ce4b5 commit c2d8672
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions HEN_HOUSE/src/egsnrc.mortran
Original file line number Diff line number Diff line change
Expand Up @@ -2230,11 +2230,20 @@ ELSE["re-calculates photon xsections using available or user data"

call mscati; "Initialize new MS, step-sizes, etc, IK Oct 97"

call EDGSET(1,1); "Initialize relaxations and photo-absorption data,"
"if requested
"Calling order of the subroutines below is important when using"
"detailed atomic relaxation in order to use the binding energies"
"corresponding to the requested photon cross section library"
IF ($EADL_RELAX & photon_xsections = 'xcom' )[
call init_compton; "Initialize bound Compton scattering"
call EDGSET(1,1); "Initialize relaxations and photo-absorption data"
]
ELSE[
call EDGSET(1,1); "Initialize relaxations and photo-absorption data,"
"if requested
call init_compton; "Initialize bound compton scattering, IK, Jan 99"
"if requested
]

call init_compton; "Initialize bound compton scattering, IK, Jan 99"
"if requested

call fix_brems; "Re-calculate dl1,... for the different technique"
"employed in BREMS. Note that the old EGS sampling"
Expand Down Expand Up @@ -2459,6 +2468,7 @@ DO j=1,$MXTOTSH [
be_array(j) = binding_energies(shn_array(j),iz_array(j))/PRM;
]
ELSE IF(photon_xsections = 'xcom') [
"Use binding energies from incoh.data below 1 keV"
binding_energies(shn_array(j),iz_array(j)) = be_array(j)*PRM;
]
]
Expand Down Expand Up @@ -5512,15 +5522,11 @@ DO medio = 1,nmed [
shell_Z(ish) = iZ;
shell_num(ish) = ish - shell_ntot;
shell_eadl(iZ,shell_num(ish)) = ish;
"For consistent use of binding energies"
"reset array binding energies (XCOM)"
"IF (shell_num(ish) <= 4)[
" binding_energies(shell_num(ish),iZ) = be_r;
"]
IF (binding_energies(shell_num(ish),iZ) > 0)[
shell_be(ish) = binding_energies(shell_num(ish),iZ);
]
ELSE IF( photon_xsections = 'epdl' )[
"Use binding energies from relax.data below 1 keV"
binding_energies(shell_num(ish),iZ) = shell_be(ish);
]
DO k=1,ntran[
Expand Down Expand Up @@ -5841,7 +5847,6 @@ $IMPLICIT-NONE;
integer NREGLO,NREGHI;

$INTEGER i,j,k,jj,iz;
$REAL tot_prob;
logical do_relax;
logical got_data;
save got_data;
Expand Down Expand Up @@ -5879,7 +5884,7 @@ rewind($PHOTOUNIT);
DO i=1,$MXELEMENT
[
IF ($EADL_RELAX)[
"Skip, binding_energies from photo-electric xsections file
"Skip, using binding_energies from *_photo.data file
read($PHOTOUNIT,*);
]
ELSE[
Expand Down

0 comments on commit c2d8672

Please sign in to comment.