Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-17 08:20:34

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 CERN for the benefit of the ACTS project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
0008 
0009 #pragma once
0010 
0011 #include "Acts/Clusterization/Clusterization.hpp"
0012 #include "Acts/Definitions/Algebra.hpp"
0013 
0014 #include <limits>
0015 
0016 namespace Acts::Ccl {
0017 
0018 template <typename Cell>
0019 concept HasRetrievableTimeInfo = requires(Cell cell) {
0020   { getCellTime(cell) } -> std::same_as<double>;
0021 };
0022 
0023 /// Connection type with an added time compatibility requirement.
0024 template <Acts::Ccl::HasRetrievableTimeInfo Cell, std::size_t N>
0025 struct TimedConnect : public Acts::Ccl::DefaultConnect<Cell, N> {
0026   /// Maximum time difference for cells to be considered connected
0027   double timeTolerance{std::numeric_limits<double>::max()};
0028 
0029   TimedConnect() = default;
0030   /// @brief Constructor
0031   /// @param time Time tolerance
0032   explicit TimedConnect(double time);
0033   /// @brief Constructor
0034   /// @param time Time tolerance
0035   /// @param commonCorner Whether cells sharing only a corner are considered connected
0036   TimedConnect(double time, bool commonCorner)
0037     requires(N == 2);
0038   ~TimedConnect() override = default;
0039 
0040   /// @brief Check if two cells are connected in space and time
0041   /// @param ref Reference cell
0042   /// @param iter Candidate cell
0043   /// @return Connection result
0044   ConnectResult operator()(const Cell& ref, const Cell& iter) const override;
0045 };
0046 
0047 }  // namespace Acts::Ccl
0048 
0049 #include "Acts/Clusterization/TimedClusterization.ipp"