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

ref: Update to detray version 0.69.1 #639

Merged
merged 1 commit into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions core/include/traccc/finding/finding_algorithm.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

// detray include(s).
#include "detray/geometry/barcode.hpp"
#include "detray/geometry/surface.hpp"
#include "detray/geometry/tracking_surface.hpp"

// System include
#include <algorithm>
Expand Down Expand Up @@ -125,7 +125,7 @@ finding_algorithm<stepper_t, navigator_t>::operator()(
*************************/

// Get intersection at surface
const detray::surface sf{det, in_param.surface_link()};
const detray::tracking_surface sf{det, in_param.surface_link()};

const cxt_t ctx{};

Expand Down
7 changes: 3 additions & 4 deletions core/include/traccc/fitting/kalman_filter/kalman_fitter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,7 @@ class kalman_fitter {
it != track_states.rend(); ++it) {

// Run kalman smoother
const detray::surface<detector_type> sf{m_detector,
it->surface_link()};
const detray::tracking_surface sf{m_detector, it->surface_link()};
sf.template visit_mask<gain_matrix_smoother<algebra_type>>(
*it, *(it - 1));
}
Expand All @@ -235,8 +234,8 @@ class kalman_fitter {

for (const auto& trk_state : track_states) {

const detray::surface<detector_type> sf{m_detector,
trk_state.surface_link()};
const detray::tracking_surface sf{m_detector,
trk_state.surface_link()};
sf.template visit_mask<statistics_updater<algebra_type>>(fit_res,
trk_state);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

// Detray include(s).
#include "detray/geometry/surface.hpp"
#include "detray/geometry/tracking_surface.hpp"

namespace traccc::experimental {

Expand All @@ -29,7 +29,7 @@ spacepoint_collection_types::host spacepoint_formation<detector_t>::operator()(
// Access the measurements of the current module.
const measurement& ms = measurements.at(i);

const detray::surface<detector_t> sf{det, ms.surface_link};
const detray::tracking_surface sf{det, ms.surface_link};

// This local to global transformation only works for 2D planar
// measurement
Expand Down
4 changes: 2 additions & 2 deletions core/include/traccc/utils/seed_generator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

// detray include(s).
#include "detray/geometry/barcode.hpp"
#include "detray/geometry/surface.hpp"
#include "detray/geometry/tracking_surface.hpp"
#include "detray/propagator/actor_chain.hpp"
#include "detray/propagator/actors/aborters.hpp"
#include "detray/propagator/actors/parameter_resetter.hpp"
Expand Down Expand Up @@ -52,7 +52,7 @@ struct seed_generator {
const free_track_parameters& free_param) {

// Get bound parameter
const detray::surface sf{m_detector, surface_link};
const detray::tracking_surface sf{m_detector, surface_link};

const cxt_t ctx{};
auto bound_vec = sf.free_to_bound_vector(ctx, free_param.vector());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "traccc/definitions/math.hpp"

// Detray include(s).
#include "detray/geometry/surface.hpp"
#include "detray/geometry/tracking_surface.hpp"

namespace traccc::device {

Expand All @@ -38,7 +38,7 @@ TRACCC_DEVICE inline void apply_interaction(
auto& bound_param = params.at(globalIndex);

// Get intersection at surface
const detray::surface sf{det, bound_param.surface_link()};
const detray::tracking_surface sf{det, bound_param.surface_link()};
const typename detector_t::geometry_context ctx{};

// Apply interactor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ TRACCC_DEVICE inline void find_tracks(

const auto& meas = measurements.at(meas_idx);
track_state<typename detector_t::algebra_type> trk_state(meas);
const detray::surface<detector_t> sf{det, bcd};
const detray::tracking_surface sf{det, bcd};

// Run the Kalman update
sf.template visit_mask<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

// Detray include(s).
#include "detray/geometry/surface.hpp"
#include "detray/geometry/tracking_surface.hpp"

namespace traccc::device::experimental {

Expand Down Expand Up @@ -35,7 +35,7 @@ TRACCC_HOST_DEVICE inline void form_spacepoints(
// Access the measurements of the current module.
const measurement& ms = measurements.at(globalIndex);

const detray::surface<detector_t> sf{det, ms.surface_link};
const detray::tracking_surface sf{det, ms.surface_link};

// This local to global transformation only works for 2D planar measurement
// (e.g. barrel pixel and endcap pixel detector)
Expand Down
2 changes: 1 addition & 1 deletion extern/detray/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ message( STATUS "Building Detray as part of the TRACCC project" )

# Declare where to get Detray from.
set( TRACCC_DETRAY_SOURCE
"URL;https://github.com/acts-project/detray/archive/refs/tags/v0.67.0.tar.gz;URL_MD5;e874ea4299bdfa55b74df1ad71fae066"
"URL;https://github.com/acts-project/detray/archive/refs/tags/v0.69.1.tar.gz;URL_MD5;38a0f8e786ac6a61fabcd3a28d7bb2d6"
CACHE STRING "Source for Detray, when built as part of this project" )

mark_as_advanced( TRACCC_DETRAY_SOURCE )
Expand Down
4 changes: 2 additions & 2 deletions io/include/traccc/io/read_geometry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

// Detray include(s).
#include <detray/geometry/barcode.hpp>
#include <detray/geometry/surface.hpp>
#include <detray/geometry/tracking_surface.hpp>

// System include(s).
#include <cstdint>
Expand Down Expand Up @@ -45,7 +45,7 @@ geometry alt_read_geometry(const detector_t& det) {
const cxt_t ctx0{};

for (const auto& sf_desc : det.surfaces()) {
const detray::surface<detector_t> sf{det, sf_desc.barcode()};
const detray::tracking_surface sf{det, sf_desc.barcode()};

maps.insert({sf.barcode().value(), sf.transform(ctx0)});
}
Expand Down
3 changes: 1 addition & 2 deletions io/src/obj/write_track_candidates.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ void write_track_candidates(
for (const measurement& m : track.items) {

// Find the detector surface that this measurement sits on.
const detray::surface<detray::detector<> > surface{detector,
m.surface_link};
const detray::tracking_surface surface{detector, m.surface_link};

// Calculate a position for this measurement in global 3D space.
const auto global = surface.bound_to_global({}, m.local, {});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class fitting_performance_writer {
const auto global_pos = evt_map.meas_xp_map[meas].first;
const auto global_mom = evt_map.meas_xp_map[meas].second;

const detray::surface<detector_t> sf{det, meas.surface_link};
const detray::tracking_surface sf{det, meas.surface_link};
using cxt_t = typename detector_t::geometry_context;
const cxt_t ctx{};
const auto truth_local =
Expand Down
2 changes: 1 addition & 1 deletion simulation/include/traccc/simulation/smearing_writer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "traccc/simulation/measurement_smearer.hpp"

// Detray core include(s).
#include "detray/geometry/surface.hpp"
#include "detray/geometry/tracking_surface.hpp"
#include "detray/propagator/base_actor.hpp"
#include "detray/tracks/bound_track_parameters.hpp"
#include "detray/tracks/free_track_parameters.hpp"
Expand Down
6 changes: 3 additions & 3 deletions tests/cpu/test_simulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "detray/geometry/mask.hpp"
#include "detray/geometry/shapes/line.hpp"
#include "detray/geometry/shapes/rectangle2D.hpp"
#include "detray/geometry/surface.hpp"
#include "detray/geometry/tracking_surface.hpp"
#include "detray/simulation/event_generator/track_generators.hpp"
#include "detray/tracks/bound_track_parameters.hpp"
#include "detray/utils/statistics.hpp"
Expand Down Expand Up @@ -172,8 +172,8 @@ GTEST_TEST(traccc_simulation, toy_detector_simulation) {
const point3 pos{hits[i].tx, hits[i].ty, hits[i].tz};
const vector3 mom{hits[i].tpx, hits[i].tpy, hits[i].tpz};
const auto truth_local =
detray::surface{detector,
detray::geometry::barcode(hits[i].geometry_id)}
detray::tracking_surface{
detector, detray::geometry::barcode(hits[i].geometry_id)}
.global_to_local(ctx, pos, vector::normalize(mom));

local0_diff.push_back(truth_local[0] - measurements[i].local0);
Expand Down
Loading