-
Notifications
You must be signed in to change notification settings - Fork 19
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: several assertions #917
fix: several assertions #917
Conversation
934f76f
to
28e0ffb
Compare
core/include/detray/propagator/actors/pointwise_material_interactor.hpp
Outdated
Show resolved
Hide resolved
tests/include/detray/test/utils/simulation/event_generator/random_numbers.hpp
Outdated
Show resolved
Hide resolved
168e9d6
to
a9de44a
Compare
@@ -52,7 +52,10 @@ struct random_track_generator_config { | |||
|
|||
/// Track origin | |||
darray<scalar_t, 3> m_origin{0.f, 0.f, 0.f}; | |||
darray<scalar_t, 3> m_origin_stddev{0.f, 0.f, 0.f}; | |||
darray<scalar_t, 3> m_origin_stddev{ |
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.
BTW, what is an advantage of setting default values to epsilon
? clients will need to change this to (0,0,0) manually when they want to fix the vertex.
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.
My compiler throws an assertion in release mode when 0 is passed as stddev. So I cannot run any test/tool that involves the random track generation
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.
The Gaussian distribution is not directly defined for stddev = 0 mathematically, so I guess that the implementation in the standard library calculates the sample value by dividing by the standard deviation somewhere, so that this would result in an FPE? I changed our method now, so that it returns the mean when the standard dev is zero without calling the dist
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.
Now I think the epsilon is a bit weird..
a9de44a
to
067c5c5
Compare
067c5c5
to
17571ed
Compare
|
Fixes a couple of assertions:
std::normal_distribution