diff --git a/Core/include/Acts/EventData/Seed.hpp b/Core/include/Acts/EventData/Seed.hpp index 59215b7ffbf..dc97bb39084 100644 --- a/Core/include/Acts/EventData/Seed.hpp +++ b/Core/include/Acts/EventData/Seed.hpp @@ -13,37 +13,40 @@ namespace Acts { -enum class OwningPolicy : bool {Owner, Viewer}; - -template +enum class OwningPolicy : bool { Owner, Viewer }; + +template requires(N >= 3) class Seed { public: static constexpr std::size_t DIM = N; static constexpr OwningPolicy owning_policy = owningPolicy; - using value_type = typename std::conditional::type; + using value_type = + typename std::conditional::type; using element_type = external_spacepoint_t; Seed() = delete; - // lvalues - template - requires(sizeof...(args_t) == N) + // lvalues + template + requires(sizeof...(args_t) == N) Seed(const args_t&... points) requires(owningPolicy == OwningPolicy::Viewer); - - // rvalues - template - requires(sizeof...(args_t) == N) + + // rvalues + template + requires(sizeof...(args_t) == N) Seed(const args_t&&... points) - requires(owningPolicy == OwningPolicy::Viewer) = delete; - - // any value - template - requires(sizeof...(args_t) == N) - Seed(args_t&& ... points) + requires(owningPolicy == OwningPolicy::Viewer) + = delete; + + // any value + template + requires(sizeof...(args_t) == N) + Seed(args_t&&... points) requires(owningPolicy == OwningPolicy::Owner); void setVertexZ(float vertex); diff --git a/Core/include/Acts/EventData/Seed.ipp b/Core/include/Acts/EventData/Seed.ipp index cc9c5a23553..dd661589fda 100644 --- a/Core/include/Acts/EventData/Seed.ipp +++ b/Core/include/Acts/EventData/Seed.ipp @@ -1,4 +1,3 @@ -// -*- C++ -*- // This file is part of the ACTS project. // // Copyright (C) 2016 CERN for the benefit of the ACTS project @@ -9,51 +8,59 @@ namespace Acts { - template - requires(N >= 3) - template - requires(sizeof...(args_t) == N) - Seed::Seed(const args_t&... points) - requires(owningPolicy == OwningPolicy::Viewer) +template + requires(N >= 3) +template + requires(sizeof...(args_t) == N) +Seed::Seed(const args_t&... points) + requires(owningPolicy == OwningPolicy::Viewer) : m_spacepoints({&points...}) {} - - template + +template requires(N >= 3) - template - requires(sizeof...(args_t) == N) - Seed::Seed(args_t&& ... points) - requires(owningPolicy == OwningPolicy::Owner) - : m_spacepoints({std::forward(points)...}) - {} - - template +template + requires(sizeof...(args_t) == N) +Seed::Seed(args_t&&... points) + requires(owningPolicy == OwningPolicy::Owner) + : m_spacepoints({std::forward(points)...}) {} + +template requires(N >= 3) - void Seed::setVertexZ(float vertex) { +void Seed::setVertexZ(float vertex) { m_vertexZ = vertex; } - template +template requires(N >= 3) - void Seed::setQuality(float seedQuality) { +void Seed::setQuality( + float seedQuality) { m_seedQuality = seedQuality; } - template +template requires(N >= 3) - const std::array::value_type, N>& - Seed::sp() const { +const std::array< + typename Seed::value_type, N>& +Seed::sp() const { return m_spacepoints; } - template +template requires(N >= 3) - float Seed::z() const { +float Seed::z() const { return m_vertexZ; } - template +template requires(N >= 3) - float Seed::seedQuality() const { +float Seed::seedQuality() const { return m_seedQuality; } diff --git a/Core/include/Acts/EventData/SpacePointContainer.hpp b/Core/include/Acts/EventData/SpacePointContainer.hpp index 9d099bc2d08..fd93dc05ec8 100644 --- a/Core/include/Acts/EventData/SpacePointContainer.hpp +++ b/Core/include/Acts/EventData/SpacePointContainer.hpp @@ -131,7 +131,7 @@ class SpacePointContainer { ProxyType at(const std::size_t n); ProxyType at(const std::size_t n) const; const ValueType& sp(const std::size_t n) const; - + private: void initialize(); diff --git a/Core/include/Acts/EventData/SpacePointContainer.ipp b/Core/include/Acts/EventData/SpacePointContainer.ipp index a1d55d1a743..24c3f7eb397 100644 --- a/Core/include/Acts/EventData/SpacePointContainer.ipp +++ b/Core/include/Acts/EventData/SpacePointContainer.ipp @@ -1,4 +1,3 @@ -// -*- C++ -*- // This file is part of the ACTS project. // // Copyright (C) 2016 CERN for the benefit of the ACTS project diff --git a/Core/include/Acts/Seeding/SeedFinder.ipp b/Core/include/Acts/Seeding/SeedFinder.ipp index b518dd17ff8..91a2c6716fe 100644 --- a/Core/include/Acts/Seeding/SeedFinder.ipp +++ b/Core/include/Acts/Seeding/SeedFinder.ipp @@ -64,8 +64,7 @@ void SeedFinder::createSeedsForGroup( } // Get the middle space point candidates - const std::vector& middleSPs = - grid.at(middleSPsIdx); + const std::vector& middleSPs = grid.at(middleSPsIdx); // Return if somehow there are no middle sp candidates if (middleSPs.empty()) { return; @@ -182,10 +181,9 @@ void SeedFinder::createSeedsForGroup( // Iterate over middle-bottom dublets getCompatibleDoublets( - options, grid, state.spacePointMutableData, state.bottomNeighbours, - spM, state.linCircleBottom, state.compatBottomSP, - m_config.deltaRMinBottomSP, m_config.deltaRMaxBottomSP, uIP, uIP2, - cosPhiM, sinPhiM); + options, grid, state.spacePointMutableData, state.bottomNeighbours, spM, + state.linCircleBottom, state.compatBottomSP, m_config.deltaRMinBottomSP, + m_config.deltaRMaxBottomSP, uIP, uIP2, cosPhiM, sinPhiM); // no bottom SP found -> try next spM if (state.compatBottomSP.empty()) { diff --git a/Examples/Algorithms/TrackFinding/src/SeedingAlgorithm.cpp b/Examples/Algorithms/TrackFinding/src/SeedingAlgorithm.cpp index acd70fb01c9..499cce6c8eb 100644 --- a/Examples/Algorithms/TrackFinding/src/SeedingAlgorithm.cpp +++ b/Examples/Algorithms/TrackFinding/src/SeedingAlgorithm.cpp @@ -274,8 +274,10 @@ ActsExamples::ProcessCode ActsExamples::SeedingAlgorithm::execute( /// variable middle SP radial region of interest const Acts::Range1D rMiddleSPRange( - std::floor(minRange/2)*2 + m_cfg.seedFinderConfig.deltaRMiddleMinSPRange, - std::floor(maxRange/2)*2 - m_cfg.seedFinderConfig.deltaRMiddleMaxSPRange); + std::floor(minRange / 2) * 2 + + m_cfg.seedFinderConfig.deltaRMiddleMinSPRange, + std::floor(maxRange / 2) * 2 - + m_cfg.seedFinderConfig.deltaRMiddleMaxSPRange); // run the seeding static thread_local std::vector seeds;