|
Celeritas 0.7.0-dev.555+develop.5c5a8f0a7
|
Test the two-box geometry. More...
#include <GeoTests.hh>
Public Member Functions | |
| TwoBoxesGeoTest (GenericGeoTestInterface *geo_test) | |
| Construct with a reference to the GoogleTest. | |
| void | test_accessors () const |
| Test geometry accessors. | |
| void | test_detailed_tracking () const |
| void | test_reentrant () const |
| Cross into a new volume and then reflect into the old. | |
| void | test_reentrant_undo () const |
| Emulate an edge case with field propagation plus MSC. | |
| void | test_substep_retry () const |
| Emulate the geometry calls of the field propagator's substep loop. | |
| void | test_substep_retry_backscatter () const |
| Approach a boundary like the field propagator, then scatter back inside. | |
| void | test_tangent () const |
| Instead of crossing into a new volume, reflect without exiting. | |
| void | test_trace () const |
Static Public Member Functions | |
| static std::string_view | gdml_basename () |
Test the two-box geometry.
Inner box inner enclosed in an outer box world . The box's half-width is 5 cm.
| void celeritas::test::TwoBoxesGeoTest::test_reentrant | ( | ) | const |
Cross into a new volume and then reflect into the old.
This is how optical physics is performed: we enter the new volume to determine its characteristics, then apply the optical surface crossing, which might reflect back into the original.
| void celeritas::test::TwoBoxesGeoTest::test_reentrant_undo | ( | ) | const |
Emulate an edge case with field propagation plus MSC.
| void celeritas::test::TwoBoxesGeoTest::test_substep_retry | ( | ) | const |
Emulate the geometry calls of the field propagator's substep loop.
The field propagator intersects the straight chord of each curved substep, searching a little past its end, and only moves to a boundary that is close to the end of the substep. Otherwise it discards the intersection, changes direction along the chord of a shorter substep, and searches again. It moves internally to the end of an accepted substep, including when the boundary lies just past the end of the step.
After crossing, a track whose chords curve back toward the surface it is on finds it at (nearly) zero distance, which is also discarded; if no substep can move, the track is bumped along its final direction.
| void celeritas::test::TwoBoxesGeoTest::test_substep_retry_backscatter | ( | ) | const |
Approach a boundary like the field propagator, then scatter back inside.
This is the same approach as test_substep_retry , but the final direction after moving to the boundary points back into the original volume, so crossing should not change volumes.
| void celeritas::test::TwoBoxesGeoTest::test_tangent | ( | ) | const |
Instead of crossing into a new volume, reflect without exiting.
This simulates a looping track almost tangent to a geometry boundary. The end-of-step direction is changed to account for the momentum vector's end-of-step state, and the boundary isn't actually exited when we call cross boundary.