Skip to content

Commit f74a256

Browse files
committed
Remove hotfix from random numbers
1 parent 60b86d9 commit f74a256

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

tests/include/detray/test/utils/simulation/event_generator/random_numbers.hpp

+3-14
Original file line numberDiff line numberDiff line change
@@ -75,20 +75,9 @@ struct random_numbers {
7575

7676
/// Explicit normal distribution around a @param mean and @param stddev
7777
DETRAY_HOST auto normal(const scalar_t mean, const scalar_t stddev) {
78-
const bool is_zero_stddev{stddev == scalar_t{0}};
79-
const scalar_t ret{is_zero_stddev ? mean
80-
: std::normal_distribution<scalar_t>(
81-
mean, stddev)(m_engine)};
82-
// Hotfix for the traccc wire chamber Kalman fitter CI tests: Only a
83-
// specific set of tracks pass the test, so detray needs to make sure
84-
// that these tracks are generated in the random_track_generator. This
85-
// means that the correct number of draws from the random number engine
86-
// needs to be done in order to arrive at the SAME internal state of
87-
// 'm_engine'. TODO: Remove once the test are stable
88-
if (is_zero_stddev) {
89-
std::normal_distribution<scalar_t>(mean, 1.f)(m_engine);
90-
}
91-
return ret;
78+
return (stddev == scalar_t{0})
79+
? mean
80+
: std::normal_distribution<scalar_t>(mean, stddev)(m_engine);
9281
}
9382

9483
/// 50:50 coin toss

0 commit comments

Comments
 (0)