Skip to content
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

chore: update to newest traccc+detray+friends #4068

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -269,11 +269,11 @@ set(_acts_root_version 6.20)
set(_acts_tbb_version 2020.1)
set(_acts_pythia8_version 8.309)
set(_acts_pybind11_version 2.13.1)
set(_acts_detray_version 0.75.3)
set(_acts_traccc_version 0.16.0)
set(_acts_covfie_version 0.10.0)
set(_acts_vecmem_version 1.4.0)
set(_acts_algebraplugins_version 0.22.0)
set(_acts_detray_version 0.87.0)
set(_acts_traccc_version 0.19.0)
set(_acts_covfie_version 0.11.0)
set(_acts_vecmem_version 1.13.0)
set(_acts_algebraplugins_version 0.26.2)
set(_acts_annoy_version 1.17.3)

# recommended dependency version. if there is an opportunity to reach
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@

#include <detray/navigation/navigator.hpp>
#include <detray/propagator/actor_chain.hpp>
#include <detray/propagator/propagation_config.hpp>
#include <detray/propagator/propagator.hpp>
#include <detray/test/utils/inspectors.hpp>
#include <detray/test/utils/material_validation_utils.hpp>
#include <detray/test/validation/material_validation_utils.hpp>

namespace ActsExamples {

Expand Down Expand Up @@ -110,10 +111,16 @@ class DetrayPropagator : public PropagatorInterface {
stepper_t, DetrayNavigator,
detray::actor_chain<detray::dtuple, MaterialTracer>>;

typename Propagator::state propagation(track,
m_cfg.detrayStore->detector);
// Context & Config
using Context = Propagator::state::context_type;
Context dCtx{};
using Config = detray::propagation::config;
Config dCfg{};

Propagator propagator;
typename Propagator::state propagation(track, m_cfg.detrayStore->detector,
dCtx);

Propagator propagator(dCfg);

MaterialTracer::state materialTracerState{
*m_cfg.detrayStore->memoryResource};
Expand Down Expand Up @@ -159,10 +166,16 @@ class DetrayPropagator : public PropagatorInterface {
using Propagator =
detray::propagator<stepper_t, DetrayNavigator, detray::actor_chain<>>;

typename Propagator::state propagation(track,
m_cfg.detrayStore->detector);
// Context & Config
using Context = Propagator::state::context_type;
Context dCtx{};
using Config = detray::propagation::config;
Config dCfg{};

typename Propagator::state propagation(track, m_cfg.detrayStore->detector,
dCtx);

Propagator propagator;
Propagator propagator(dCfg);
// Run the actual propagation
propagator.propagate(propagation);
}
Expand Down
6 changes: 3 additions & 3 deletions Examples/Python/src/Detray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

#include "Acts/Detector/Detector.hpp"
#include "Acts/Plugins/Detray/DetrayConversionUtils.hpp"
#include "Acts/Plugins/Detray/DetrayConverter.hpp"
#include "Acts/Plugins/Python/Utilities.hpp"

Expand All @@ -32,9 +33,8 @@ void addDetray(Context& ctx) {

auto detray = m.def_submodule("detray");
{
py::class_<detector<default_metadata>,
std::shared_ptr<detector<default_metadata>>>(detray,
"detray_detector");
py::class_<DetrayHostDetector, std::shared_ptr<DetrayHostDetector>>(
detray, "detray_detector");
}

{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
#include <map>

#include <detray/core/detector.hpp>
#include <detray/definitions/detail/algebra.hpp>
#include <detray/definitions/grid_axis.hpp>
#include <detray/detectors/default_metadata.hpp>
#include <detray/io/frontend/payloads.hpp>

namespace Acts {
Expand All @@ -24,7 +26,9 @@ namespace Experimental {
class DetectorVolume;
}

using DetrayHostDetector = detray::detector<detray::default_metadata>;
using DetrayMetaData = detray::default_metadata<detray::array<double>>;

using DetrayHostDetector = detray::detector<DetrayMetaData>;

namespace DetrayConversionUtils {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class DetrayConverter {
detectorPayload);

// (2a) homogeneous material
if constexpr (detray::detail::has_homogeneous_material_v<detector_t>) {
if constexpr (detray::concepts::has_homogeneous_material<detector_t>) {
if (options.convertMaterial) {
detray::io::detector_homogeneous_material_payload materialSlabsPayload =
DetrayMaterialConverter::convertHomogeneousSurfaceMaterial(
Expand All @@ -80,7 +80,7 @@ class DetrayConverter {
}

// (2b) material grids
if constexpr (detray::detail::has_material_grids_v<detector_t>) {
if constexpr (detray::concepts::has_material_rods<detector_t>) {
if (options.convertMaterial) {
detray::io::detector_grids_payload<detray::io::material_slab_payload,
detray::io::material_id>
Expand Down
10 changes: 5 additions & 5 deletions cmake/ActsExternSources.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,35 @@ set(ACTS_ACTSVG_SOURCE
mark_as_advanced(ACTS_ACTSVG_SOURCE)

set(ACTS_VECMEM_SOURCE
"URL;https://github.com/acts-project/vecmem/archive/refs/tags/v${_acts_vecmem_version}.tar.gz;URL_HASH;SHA256=545dfb4de4f9f3d773eef6a0e3297ebf981bb81950930d0991ad739e31ab16af"
"URL;https://github.com/acts-project/vecmem/archive/refs/tags/v${_acts_vecmem_version}.tar.gz;URL_HASH;SHA256=fc21cea04140e1210c83a32579b0a7194601889b6c895404214ac55ce547342b"
CACHE STRING
"Source to take VECMEM from"
)
mark_as_advanced(ACTS_VECMEM_SOURCE)

set(ACTS_ALGEBRAPLUGINS_SOURCE
"URL;https://github.com/acts-project/algebra-plugins/archive/refs/tags/v${_acts_algebraplugins_version}.tar.gz;URL_HASH;SHA256=6fde02181c1b856c0a17a1925f0969798eecd5e3d6f2a87ea2eb365b6c948cc1"
"URL;https://github.com/acts-project/algebra-plugins/archive/refs/tags/v${_acts_algebraplugins_version}.tar.gz;URL_HASH;SHA256=0170f22e1a75493b86464f27991117bc2c5a9d52554c75786e321d4c591990e7"
CACHE STRING
"Source to take ALGEBRAPLUGINS from"
)
mark_as_advanced(ACTS_ALGEBRAPLUGINS_SOURCE)

set(ACTS_COVFIE_SOURCE
"URL;https://github.com/acts-project/covfie/archive/refs/tags/v${_acts_covfie_version}.tar.gz;URL_HASH;SHA256=d44142b302ffc193ad2229f1d2cc6d8d720dd9da8c37989ada4f23018f86c964"
"URL;https://github.com/acts-project/covfie/archive/refs/tags/v${_acts_covfie_version}.tar.gz;URL_HASH;SHA256=39fcd0f218d3b4f3aacc6af497a8cda8767511efae7a72b47781f10fd4340f4f"
CACHE STRING
"Source to take COVFIE from"
)
mark_as_advanced(ACTS_COVFIE_SOURCE)

set(ACTS_DETRAY_SOURCE
"URL;https://github.com/acts-project/detray/archive/refs/tags/v${_acts_detray_version}.tar.gz;URL_HASH;SHA256=1249d7398d1e534bd36b6f5a7d06a5e67adf6adeb8bca188d7e35490a675de7a"
"URL;https://github.com/acts-project/detray/archive/refs/tags/v${_acts_detray_version}.tar.gz;URL_HASH;SHA256=2d4a76432dd6ddbfc00b88b5d482072e471fefc264b60748bb1f9a123963576e"
CACHE STRING
"Source to take DETRAY from"
)
mark_as_advanced(ACTS_DETRAY_SOURCE)

set(ACTS_TRACCC_SOURCE
"URL;https://github.com/acts-project/traccc/archive/refs/tags/v${_acts_traccc_version}.tar.gz;URL_HASH;SHA256=86e0ebe7364d3a2106301d50a89feef583470da53c9dae6d1430dcc6eda7dba9"
"URL;https://github.com/acts-project/traccc/archive/refs/tags/v${_acts_traccc_version}.tar.gz;URL_HASH;SHA256=0a0f923dd4da9b3e76c634264aadf3994bbfe790c0bf4965140e671aa3fd4e2d"
CACHE STRING
"Source to take TRACCC from"
)
Expand Down
Loading