-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Skip holes and continue propagation for GPU CKF
- Loading branch information
1 parent
74772b9
commit 3d062e9
Showing
20 changed files
with
576 additions
and
209 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/** TRACCC library, part of the ACTS project (R&D line) | ||
* | ||
* (c) 2023-2024 CERN for the benefit of the ACTS project | ||
* | ||
* Mozilla Public License Version 2.0 | ||
*/ | ||
|
||
#pragma once | ||
|
||
// Project include(s) | ||
#include "detray/definitions/detail/qualifiers.hpp" | ||
#include "detray/propagator/base_actor.hpp" | ||
#include "detray/propagator/base_stepper.hpp" | ||
|
||
// System include(s) | ||
#include <limits> | ||
|
||
namespace traccc { | ||
|
||
/// Aborter triggered when the next surface is reached | ||
struct ckf_aborter : detray::actor { | ||
struct state { | ||
// minimal step length to prevent from staying on the same surface | ||
scalar min_step_length = 0.f; | ||
bool success = false; | ||
|
||
unsigned int count = 0; | ||
unsigned int max_count = 100; | ||
}; | ||
|
||
template <typename propagator_state_t> | ||
DETRAY_HOST_DEVICE void operator()(state &abrt_state, | ||
propagator_state_t &prop_state) const { | ||
|
||
auto &navigation = prop_state._navigation; | ||
auto &stepping = prop_state._stepping; | ||
|
||
abrt_state.count++; | ||
|
||
// Abort at the next sensitive surface | ||
if (navigation.is_on_sensitive() && | ||
stepping._s > abrt_state.min_step_length) { | ||
prop_state._heartbeat &= navigation.abort(); | ||
abrt_state.success = true; | ||
} | ||
|
||
if (abrt_state.count > abrt_state.max_count) { | ||
prop_state._heartbeat &= navigation.abort(); | ||
} | ||
} | ||
}; | ||
|
||
} // namespace traccc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.