Skip to content

Commit

Permalink
Fixed absorption cross sections for energies below L1 edge but above L3
Browse files Browse the repository at this point in the history
  • Loading branch information
jdickerson95 committed Oct 18, 2023
1 parent f95443d commit 0413c30
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Binary file modified raddose3d.jar
Binary file not shown.
12 changes: 9 additions & 3 deletions src/se/raddo/raddose3D/Element.java
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,10 @@ private double getPhotoelectricXSForEnergy(final double energy) {
}
Double absorptionEdgeL =
elementData.get(ElementDatabase.DatabaseFields.EDGE_L);
Double absorptionEdgeL2 =
elementData.get(ElementDatabase.DatabaseFields.L2);
Double absorptionEdgeL3 =
elementData.get(ElementDatabase.DatabaseFields.L3);
Double absorptionEdgeM =
elementData.get(ElementDatabase.DatabaseFields.EDGE_M);

Expand All @@ -362,7 +366,7 @@ private double getPhotoelectricXSForEnergy(final double energy) {
double photoelectric = 0;
if ((energy > absorptionEdgeK) || (absorptionEdgeL == null)) {
photoelectric = baxForEdge(energy, AbsorptionEdge.K);
} else if ((energy > absorptionEdgeL) || (absorptionEdgeM == null)) {
} else if ((energy > absorptionEdgeL3) || (absorptionEdgeM == null)) {
photoelectric = baxForEdge(energy, AbsorptionEdge.L);
} else if (energy > absorptionEdgeM) {
photoelectric = baxForEdge(energy, AbsorptionEdge.M);
Expand All @@ -371,7 +375,9 @@ private double getPhotoelectricXSForEnergy(final double energy) {
}

// Correction of the absorption coefficient for light elements
if (atomicNumber <= LIGHT_ATOM_MAX_NUM) {
//I don't think this is doing it correctly. It's not just for light atoms
//if (atomicNumber <= LIGHT_ATOM_MAX_NUM) {
// if (atomicNumber <= 99) {
// Fortran says...
// correct for L-edges since McMaster uses L1 edge.
// Use edge jumps for correct X-sections.
Expand All @@ -384,7 +390,7 @@ private double getPhotoelectricXSForEnergy(final double energy) {
&& (energy < absorptionEdgeL)) {
photoelectric /= LJ_1;
}
}
// }

return photoelectric;
}
Expand Down

0 comments on commit 0413c30

Please sign in to comment.