-
Notifications
You must be signed in to change notification settings - Fork 35
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
Support safety and reentrant boundaries for multi-universe ORANGE #1140
Conversation
@sethrj you can remove draft and begin your review |
test/orange/data/testem3.org.omn
Outdated
|
||
!#### LEVEL 0 UNIVERSE ####! | ||
|
||
[UNIVERSE][SHAPE=cuboid full] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be consistent with the gdml and "flat" geometry, could you rename this calorimeter
, and add a cell called world
that's outside it and inside a box with halfwidth 24?
{
'_type': "box",
'widths': [48, 48, 48],
'name': "world",
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, noting that the world cell will have an internal region, meaning supports_safety_
will now be false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if its worth keeping the original geom as well in order to test that this returns true for it:
supports_safety_
= std::all_of(
host_data.simple_units[AllItems<SimpleUnitRecord>()].begin(),
host_data.simple_units[AllItems<SimpleUnitRecord>()].end(),
[](SimpleUnitRecord const& su) { return su.simple_safety; })
&& host_data.rect_arrays.empty();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Model updated to include world
@sethrj this is ready for another look |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
…leritas-project#1140) * Add support for reentrant boundary crossing with multi-universe tracking * Fixing set_dir such that it queries the correct universe for finding the normal * Update safety distance for multiple levels * Add testem3 style unit test for safety distance calculation * Fix safety distance on multiple levels * Address comments from merge request * TestEM3 model updated to include world volume
) * Add support for reentrant boundary crossing with multi-universe tracking * Fixing set_dir such that it queries the correct universe for finding the normal * Update safety distance for multiple levels * Add testem3 style unit test for safety distance calculation * Fix safety distance on multiple levels * Address comments from merge request * TestEM3 model updated to include world volume
This MR adds support for reentrant cross_boundary() calls when a particle resides on boundary between geometric universes. In addition, safety distance calculations are updated to find the minimum safety distance over multiple levels. A TestEM3 unit test is added, using universes. This version of the this test problem supports simple safety. Finally, a bug in UnitInserter is fixed, in which volume flags were being erroneously unset.