Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the dose values in egs++ 3ddose output #645

Merged
merged 2 commits into from Mar 24, 2021
Merged

Conversation

rtownson
Copy link
Contributor

@rtownson rtownson commented Nov 2, 2020

Fix the value of dose in 3ddose files generated from egs++ apps using egs_dose_scoring. The dose was not being scaled by the correct mass/density of materials, because the getMass function in the ND geometry was not functioning properly for XYZ geometries unless they were defined using an egsphant file or density file. In other words, the dose was wrong if the XYZ geometry boundaries were defined using "slabs" or "planes".

This is a critical bug in the value of dose reported and has been an issue since the ability to generate 3ddose files was added to egs_dose_scoring. Any old dose in 3ddose files generated this way should be considered unreliable, due to the undefined value of density, and those simulations should be repeated.

Note that the doses reported by egs_dose_scoring by material, or by region were correct. Only the dose in 3ddose files from egs_dose_scoring has this issue. All 3ddose files from DOSXYZnrc are not affected.

Big thanks to our reddit user u/5xum for reporting this issue, and @marenaud for determining it was a bug.

@ftessier ftessier self-requested a review November 13, 2020 18:05
Copy link
Member

@ftessier ftessier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebased on develop and tweaked the commit message.

@ftessier ftessier force-pushed the fix-egspp-3ddose-mass branch 2 times, most recently from 59fa8f8 to 4aa617d Compare March 24, 2021 20:01
Fix the value of dose in 3ddose files generated from egs++ apps using
the egs_dose_scoring ausgab object. The dose was not being scaled by the
mass of materials, because the getMass function in the ND geometry class
was not defined properly for XYZ geometries. This critical bug has
existed since the inception of 3ddose file output in egs_dose_scoring
(in commit 7e5bf07 on 25 July 2017). In the limited case I tested, the
density in every voxel was 1 instead of the proper material density.
Fix a bug where egs_chamber would crash when trying to generate a 3ddose
file from an XYZ geometry. This happened because the app pointer was not
defined for all of the calculation geometries, since they may skip the
geometry initialization that normally occurs. Now the application
pointer is set directly in the XYZ geometry.
@ftessier
Copy link
Member

Rebased on develop.

@ftessier ftessier merged commit 932f981 into develop Mar 24, 2021
@ftessier ftessier deleted the fix-egspp-3ddose-mass branch March 24, 2021 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants