Skip to content

Commit

Permalink
feat: Reintroduce default bin finder constructor (#1197)
Browse files Browse the repository at this point in the history
In Acts version 15.0.0, we see support being added for dynamic bins in the bin finder. However, this also means that we no longer have useful default constructors for this class. This has caused me a few issues in terms of backwards compatibility. I think it would be a good idea to reintroduce some sane default configuration for the bin finder, and I discussed with @LuisFelipeCoelho that having an empty list of _z_ neighbours with a single _φ_ neighbour would be a good default.
  • Loading branch information
stephenswat committed Mar 23, 2022
1 parent 3e014d5 commit b2364f6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Core/include/Acts/Seeding/BinFinder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ template <typename external_spacepoint_t>
class BinFinder {
public:
/// constructor
BinFinder();

BinFinder(const std::vector<std::pair<int, int> >&& zBinNeighbors,
const int&& numPhiNeighbors);

Expand Down
9 changes: 7 additions & 2 deletions Core/include/Acts/Seeding/BinFinder.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,21 @@
// 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/.

template <typename external_spacepoint_t>
Acts::BinFinder<external_spacepoint_t>::BinFinder()
: Acts::BinFinder<external_spacepoint_t>::BinFinder(
std::vector<std::pair<int, int>>(), 1) {}

template <typename external_spacepoint_t>
Acts::BinFinder<external_spacepoint_t>::BinFinder(
const std::vector<std::pair<int, int> >&& zBinNeighbors,
const std::vector<std::pair<int, int>>&& zBinNeighbors,
const int&& numPhiNeighbors)
: m_zBinNeighbors(std::move(zBinNeighbors)),
m_numPhiNeighbors(std::move(numPhiNeighbors)) {}

template <typename external_spacepoint_t>
Acts::BinFinder<external_spacepoint_t>::BinFinder(
const std::vector<std::pair<int, int> >& zBinNeighbors,
const std::vector<std::pair<int, int>>& zBinNeighbors,
const int& numPhiNeighbors)
: m_zBinNeighbors(zBinNeighbors), m_numPhiNeighbors(numPhiNeighbors) {}

Expand Down

0 comments on commit b2364f6

Please sign in to comment.