Skip to content

Commit 6764bb4

Browse files
authored
Merge branch 'main' into main-regchecks
2 parents 22edd51 + 9ac3f7e commit 6764bb4

File tree

14 files changed

+469
-105
lines changed

14 files changed

+469
-105
lines changed

CMakeLists.txt

-15
Original file line numberDiff line numberDiff line change
@@ -225,21 +225,6 @@ if(DETRAY_SETUP_NLOHMANN)
225225
endif()
226226
endif()
227227

228-
# Set up dfelibs.
229-
option(DETRAY_SETUP_DFELIBS "Set up the dfelibs target(s) explicitly" TRUE)
230-
option(
231-
DETRAY_USE_SYSTEM_DFELIBS
232-
"Pick up an existing installation of dfelibs from the build environment"
233-
${DETRAY_USE_SYSTEM_LIBS}
234-
)
235-
if(DETRAY_SETUP_DFELIBS)
236-
if(DETRAY_USE_SYSTEM_DFELIBS)
237-
find_package(dfelibs REQUIRED)
238-
else()
239-
add_subdirectory(extern/dfelibs)
240-
endif()
241-
endif()
242-
243228
# Set up GoogleTest.
244229
option(
245230
DETRAY_SETUP_GOOGLETEST

CMakePresets.json

-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
"DETRAY_SETUP_ACTSVG": "TRUE",
3737
"DETRAY_SETUP_BENCHMARK": "TRUE",
3838
"DETRAY_SETUP_COVFIE": "TRUE",
39-
"DETRAY_SETUP_DFELIBS": "TRUE",
4039
"DETRAY_SETUP_NLOHMANN": "TRUE",
4140
"ALGEBRA_PLUGINS_INCLUDE_EIGEN": "TRUE",
4241
"ALGEBRA_PLUGINS_SETUP_EIGEN3": "TRUE",

cmake/detray-config.cmake.in

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ include( CMakeFindDependencyMacro )
2626
find_dependency( algebra-plugins )
2727
find_dependency( covfie )
2828
find_dependency( vecmem )
29-
find_dependency( dfelibs )
3029
find_dependency( nlohmann_json )
3130
if( DETRAY_DISPLAY )
3231
find_dependency( actsvg )

core/include/detray/navigation/navigation_config.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ struct config {
3939
/// Maximal absolute path distance for a track to be considered 'on surface'
4040
float path_tolerance{1.f * unit<float>::um};
4141
/// How far behind the track position to look for candidates
42-
float overstep_tolerance{-300.f * unit<float>::um};
42+
float overstep_tolerance{-1000.f * unit<float>::um};
4343
/// Search window size for grid based acceleration structures
4444
/// (0, 0): only look at current bin
4545
darray<dindex, 2> search_window = {0u, 0u};

core/include/detray/navigation/navigator.hpp

+21-7
Original file line numberDiff line numberDiff line change
@@ -640,9 +640,10 @@ class navigator {
640640
/// @param state the current navigation state
641641
/// @param cfg the navigation configuration
642642
template <typename track_t>
643-
DETRAY_HOST_DEVICE inline void init(const track_t &track, state &navigation,
644-
const navigation::config &cfg,
645-
const context_type &ctx) const {
643+
DETRAY_HOST_DEVICE inline void init(
644+
const track_t &track, state &navigation, const navigation::config &cfg,
645+
const context_type &ctx,
646+
const bool use_path_tolerance_as_overstep_tolerance = true) const {
646647
const auto &det = navigation.detector();
647648
const auto volume = tracking_volume{det, navigation.volume()};
648649

@@ -651,12 +652,16 @@ class navigator {
651652
navigation.m_heartbeat = true;
652653

653654
// Search for neighboring surfaces and fill candidates into cache
655+
const scalar_type overstep_tol =
656+
use_path_tolerance_as_overstep_tolerance ? -cfg.path_tolerance
657+
: cfg.overstep_tolerance;
658+
654659
volume.template visit_neighborhood<candidate_search>(
655660
track, cfg, ctx, det, ctx, track, navigation,
656661
darray<scalar_type, 2u>{cfg.min_mask_tolerance,
657662
cfg.max_mask_tolerance},
658663
static_cast<scalar_type>(cfg.mask_tolerance_scalor),
659-
static_cast<scalar_type>(cfg.overstep_tolerance));
664+
static_cast<scalar_type>(overstep_tol));
660665

661666
// Determine overall state of the navigation after updating the cache
662667
update_navigation_state(navigation, cfg);
@@ -729,7 +734,11 @@ class navigator {
729734
// If no trust could be restored for the current state, (local)
730735
// navigation might be exhausted: re-initialize volume
731736
else {
732-
init(track, navigation, cfg, ctx);
737+
// Use overstep tolerance instead of path tolerance
738+
const bool use_path_tolerance_as_overstep_tolerance = false;
739+
740+
init(track, navigation, cfg, ctx,
741+
use_path_tolerance_as_overstep_tolerance);
733742
is_init = true;
734743

735744
// Sanity check: Should never be the case after complete update call
@@ -743,7 +752,8 @@ class navigator {
743752
math::min(100.f * cfg.overstep_tolerance,
744753
-10.f * cfg.max_mask_tolerance);
745754

746-
init(track, navigation, loose_cfg, ctx);
755+
init(track, navigation, loose_cfg, ctx,
756+
use_path_tolerance_as_overstep_tolerance);
747757

748758
// Unrecoverable
749759
if (navigation.trust_level() !=
@@ -849,7 +859,11 @@ class navigator {
849859
// Actor flagged cache as broken (other cases of 'no trust' are
850860
// handeled after volume switch was checked in 'update()')
851861
if (navigation.trust_level() == navigation::trust_level::e_no_trust) {
852-
init(track, navigation, cfg, ctx);
862+
// Use overstep tolerance instead of path tolerance
863+
const bool use_path_tolerance_as_overstep_tolerance = false;
864+
865+
init(track, navigation, cfg, ctx,
866+
use_path_tolerance_as_overstep_tolerance);
853867
return true;
854868
}
855869

extern/dfelibs/CMakeLists.txt

-55
This file was deleted.

extern/dfelibs/README.md

-4
This file was deleted.

io/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ file(
8383
detray_add_library( detray_csv_io csv_io
8484
${_detray_csv_io_public_headers}
8585
)
86-
target_link_libraries(detray_csv_io INTERFACE dfelibs::dfelibs detray::io_utils)
86+
target_link_libraries(detray_csv_io INTERFACE detray::io_utils)
8787

8888
# Test the public headers of the detray I/O libraries.
8989
if(BUILD_TESTING AND DETRAY_BUILD_TESTING)

0 commit comments

Comments
 (0)