-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
207 additions
and
166 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
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
55 changes: 55 additions & 0 deletions
55
Core/include/Acts/Navigation/NavigationDelegateHelpers.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,55 @@ | ||
// This file is part of the Acts project. | ||
// | ||
// Copyright (C) 2023 CERN for the benefit of the Acts project | ||
// | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
#pragma once | ||
|
||
#include "Acts/Definitions/Algebra.hpp" | ||
#include "Acts/Definitions/Common.hpp" | ||
#include "Acts/Navigation/NavigationDelegates.hpp" | ||
#include "Acts/Navigation/NavigationState.hpp" | ||
#include "Acts/Utilities/BinningType.hpp" | ||
#include "Acts/Utilities/Enumerate.hpp" | ||
#include "Acts/Utilities/IAxis.hpp" | ||
#include "Acts/Utilities/VectorHelpers.hpp" | ||
|
||
#include <array> | ||
#include <memory> | ||
|
||
namespace Acts { | ||
namespace Experimental { | ||
|
||
/// Helper struct that allows to fill surfaces into the candidate vector it | ||
/// allows to use common navigation structs for volume, portal, surfaces | ||
/// | ||
/// @param surfaces the surfaces that are filled in | ||
/// @param candidates the surface candidates to be updated | ||
inline static void fillSurfaceCandidates( | ||
NavigationState::SurfaceCandidates& candidates, | ||
const std::vector<const Surface*>& surfaces, bool boundaryCheck) { | ||
for (const auto& surface : surfaces) { | ||
candidates.push_back(NavigationState::SurfaceCandidate{ | ||
ObjectIntersection<Surface>{}, surface, nullptr, boundaryCheck}); | ||
} | ||
} | ||
|
||
/// Helper struct that allows to fill surfaces into the candidate vector it | ||
/// allows to use common navigation structs for volume, portal, surfaces | ||
/// | ||
/// @param portals the portals that are filled in | ||
/// @param candidates the surface candidates to be filled | ||
inline static void fillSurfaceCandidates( | ||
NavigationState::SurfaceCandidates& candidates, | ||
const std::vector<const Portal*>& portals) { | ||
for (const auto& portal : portals) { | ||
candidates.push_back(NavigationState::SurfaceCandidate{ | ||
ObjectIntersection<Surface>{}, nullptr, portal, true}); | ||
} | ||
} | ||
|
||
} // namespace Experimental | ||
} // namespace Acts |
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
Oops, something went wrong.