Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-10-28 08:20:53

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 #include "ActsExamples/EventData/IndexSourceLink.hpp"
0010 
0011 #include "Acts/Geometry/TrackingGeometry.hpp"
0012 #include "Acts/Surfaces/Surface.hpp"
0013 
0014 #include <cassert>
0015 
0016 namespace ActsExamples {
0017 
0018 const Acts::Surface* IndexSourceLinkSurfaceAccessor::operator()(
0019     const Acts::SourceLink& sourceLink) const {
0020   const auto& indexSourceLink = sourceLink.get<IndexSourceLink>();
0021   return geometry.findSurface(indexSourceLink.geometryId());
0022 }
0023 
0024 std::pair<IndexSourceLinkAccessor::Iterator, IndexSourceLinkAccessor::Iterator>
0025 IndexSourceLinkAccessor::range(const Acts::Surface& surface) const {
0026   assert(container != nullptr);
0027   auto [begin, end] = container->equal_range(surface.geometryId());
0028   return {Iterator{begin}, Iterator{end}};
0029 }
0030 
0031 }  // namespace ActsExamples