-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/trackvol-visit-surfaces-closure
- Loading branch information
Showing
18 changed files
with
1,837 additions
and
142 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// This file is part of the ACTS project. | ||
// | ||
// Copyright (C) 2016 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 https://mozilla.org/MPL/2.0/. | ||
|
||
#pragma once | ||
|
||
#include "Acts/Clusterization/Clusterization.hpp" | ||
#include "Acts/Definitions/Algebra.hpp" | ||
|
||
#include <limits> | ||
|
||
namespace Acts::Ccl { | ||
|
||
template <typename Cell> | ||
concept HasRetrievableTimeInfo = requires(Cell cell) { | ||
{ getCellTime(cell) } -> std::same_as<Acts::ActsScalar>; | ||
}; | ||
|
||
template <Acts::Ccl::HasRetrievableTimeInfo Cell, std::size_t N> | ||
struct TimedConnect : public Acts::Ccl::DefaultConnect<Cell, N> { | ||
Acts::ActsScalar timeTolerance{std::numeric_limits<Acts::ActsScalar>::max()}; | ||
|
||
TimedConnect() = default; | ||
TimedConnect(Acts::ActsScalar time); | ||
TimedConnect(Acts::ActsScalar time, bool commonCorner) | ||
requires(N == 2); | ||
~TimedConnect() override = default; | ||
|
||
ConnectResult operator()(const Cell& ref, const Cell& iter) const override; | ||
}; | ||
|
||
} // namespace Acts::Ccl | ||
|
||
#include "Acts/Clusterization/TimedClusterization.ipp" |
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,36 @@ | ||
// This file is part of the ACTS project. | ||
// | ||
// Copyright (C) 2016 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 https://mozilla.org/MPL/2.0/. | ||
|
||
namespace Acts::Ccl { | ||
|
||
template <Acts::Ccl::HasRetrievableTimeInfo Cell, std::size_t N> | ||
TimedConnect<Cell, N>::TimedConnect(Acts::ActsScalar time) | ||
: timeTolerance(time) {} | ||
|
||
template <Acts::Ccl::HasRetrievableTimeInfo Cell, std::size_t N> | ||
TimedConnect<Cell, N>::TimedConnect(Acts::ActsScalar time, bool commonCorner) | ||
requires(N == 2) | ||
: Acts::Ccl::DefaultConnect<Cell, N>(commonCorner), timeTolerance(time) {} | ||
|
||
template <Acts::Ccl::HasRetrievableTimeInfo Cell, std::size_t N> | ||
Acts::Ccl::ConnectResult TimedConnect<Cell, N>::operator()( | ||
const Cell& ref, const Cell& iter) const { | ||
Acts::Ccl::ConnectResult spaceCompatibility = | ||
Acts::Ccl::DefaultConnect<Cell, N>::operator()(ref, iter); | ||
if (spaceCompatibility != Acts::Ccl::ConnectResult::eConn) { | ||
return spaceCompatibility; | ||
} | ||
|
||
if (std::abs(getCellTime(ref) - getCellTime(iter)) < timeTolerance) { | ||
return Acts::Ccl::ConnectResult::eConn; | ||
} | ||
|
||
return Acts::Ccl::ConnectResult::eNoConn; | ||
} | ||
|
||
} // namespace Acts::Ccl |
Oops, something went wrong.