-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrate svg tools into the validation suite. The ray and helix scans
will dump the geometry, intersections and trajectory to an xy and rz view.
- Loading branch information
1 parent
4bd5b98
commit abfa1c1
Showing
19 changed files
with
516 additions
and
211 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
plugins/svgtools/include/detray/plugins/svgtools/conversion/intersection.hpp
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,41 @@ | ||
/** Detray library, part of the ACTS project (R&D line) | ||
* | ||
* (c) 2023 CERN for the benefit of the ACTS project | ||
* | ||
* Mozilla Public License Version 2.0 | ||
*/ | ||
|
||
#pragma once | ||
|
||
// Project include(s) | ||
#include "detray/intersection/intersection.hpp" | ||
#include "detray/plugins/svgtools/conversion/landmark.hpp" | ||
#include "detray/plugins/svgtools/meta/proto/intersection_record.hpp" | ||
|
||
// System include(s) | ||
#include <vector> | ||
|
||
namespace detray::svgtools::conversion { | ||
|
||
/// @returns The proto intersection of a detray intersection. | ||
template <typename point3_t, typename detector_t, typename intersection_t> | ||
inline auto intersection( | ||
const detector_t& detector, const dvector<intersection_t>& intersections, | ||
const typename detector_t::vector3& dir = {}, | ||
const typename detector_t::geometry_context& gctx = {}) { | ||
using p_intersection_t = svgtools::meta::proto::intersection<point3_t>; | ||
p_intersection_t p_ir; | ||
|
||
std::vector<typename p_intersection_t::landmark_type> landmarks; | ||
for (const auto& intr : intersections) { | ||
const detray::surface surface{detector, intr.sf_desc}; | ||
const auto position = surface.local_to_global(gctx, intr.local, dir); | ||
const auto p_lm = svgtools::conversion::landmark<point3_t>(position); | ||
landmarks.push_back(p_lm); | ||
} | ||
|
||
p_ir._landmarks = std::move(landmarks); | ||
return p_ir; | ||
} | ||
|
||
} // namespace detray::svgtools::conversion |
53 changes: 0 additions & 53 deletions
53
plugins/svgtools/include/detray/plugins/svgtools/conversion/intersection_record.hpp
This file was deleted.
Oops, something went wrong.
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.