Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-07-23 08:06:43

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 namespace Acts::Ccl {
0010 
0011 template <Acts::Ccl::HasRetrievableTimeInfo Cell, std::size_t N>
0012 TimedConnect<Cell, N>::TimedConnect(double time) : timeTolerance(time) {}
0013 
0014 template <Acts::Ccl::HasRetrievableTimeInfo Cell, std::size_t N>
0015 TimedConnect<Cell, N>::TimedConnect(double time, bool commonCorner)
0016   requires(N == 2)
0017     : Acts::Ccl::DefaultConnect<Cell, N>(commonCorner), timeTolerance(time) {}
0018 
0019 template <Acts::Ccl::HasRetrievableTimeInfo Cell, std::size_t N>
0020 Acts::Ccl::ConnectResult TimedConnect<Cell, N>::operator()(
0021     const Cell& ref, const Cell& iter) const {
0022   Acts::Ccl::ConnectResult spaceCompatibility =
0023       Acts::Ccl::DefaultConnect<Cell, N>::operator()(ref, iter);
0024   if (spaceCompatibility != Acts::Ccl::ConnectResult::eConn) {
0025     return spaceCompatibility;
0026   }
0027 
0028   if (std::abs(getCellTime(ref) - getCellTime(iter)) < timeTolerance) {
0029     return Acts::Ccl::ConnectResult::eConn;
0030   }
0031 
0032   return Acts::Ccl::ConnectResult::eNoConn;
0033 }
0034 
0035 }  // namespace Acts::Ccl