Skip to content

Commit d539051

Browse files
committed
Adjusted the host Kalman fit testing code a little.
Taking into account that the updated code now returns tracks that have not been successfully fitted. Previously it would not return the tracks for which the fit failed.
1 parent dafb342 commit d539051

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

tests/cpu/test_kalman_fitter_momentum_resolution.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,12 @@ TEST_P(KalmanFittingMomentumResolutionTests, Run) {
184184

185185
for (std::size_t i_trk = 0; i_trk < n_tracks; i_trk++) {
186186

187+
// Some fits fail. The results of those cannot be reasonably tested.
188+
if (track_states.tracks.at(i_trk).fit_outcome() !=
189+
traccc::track_fit_outcome::SUCCESS) {
190+
continue;
191+
}
192+
187193
consistency_tests(track_states.tracks.at(i_trk),
188194
track_states.states);
189195

tests/cpu/test_kalman_fitter_telescope.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,9 @@ TEST_P(KalmanFittingTelescopeTests, Run) {
153153

154154
for (std::size_t i_trk = 0; i_trk < n_tracks; i_trk++) {
155155

156+
EXPECT_EQ(track_states.tracks.at(i_trk).fit_outcome(),
157+
traccc::track_fit_outcome::SUCCESS);
158+
156159
consistency_tests(track_states.tracks.at(i_trk),
157160
track_states.states);
158161

tests/cpu/test_kalman_fitter_wire_chamber.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,12 @@ TEST_P(KalmanFittingWireChamberTests, Run) {
160160

161161
for (std::size_t i_trk = 0; i_trk < n_tracks; i_trk++) {
162162

163+
// Some fits fail. The results of those cannot be reasonably tested.
164+
if (track_states.tracks.at(i_trk).fit_outcome() !=
165+
traccc::track_fit_outcome::SUCCESS) {
166+
continue;
167+
}
168+
163169
consistency_tests(track_states.tracks.at(i_trk),
164170
track_states.states);
165171

0 commit comments

Comments
 (0)