Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:10:49

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/Definitions/Algebra.hpp"
0012 #include "Acts/Utilities/HashedString.hpp"
0013 #include "Acts/Utilities/Holders.hpp"
0014 
0015 #include <any>
0016 #include <iostream>
0017 #include <string_view>
0018 #include <type_traits>
0019 
0020 namespace Acts {
0021 
0022 template <typename container_t>
0023 class SpacePointProxy {
0024  public:
0025   using ContainerType = container_t;
0026   using ValueType = typename ContainerType::ValueType;
0027 
0028   // Never take the ownership of the container
0029   SpacePointProxy(container_t&& container, std::size_t index) = delete;
0030   // Only get the reference
0031   SpacePointProxy(const container_t& container, std::size_t index);
0032 
0033   const ValueType& externalSpacePoint() const;
0034   std::size_t index() const;
0035 
0036   float x() const;
0037   float y() const;
0038   float z() const;
0039   float phi() const;
0040   float radius() const;
0041   float varianceR() const;
0042   float varianceZ() const;
0043 
0044   const Acts::Vector3& topStripVector() const;
0045   const Acts::Vector3& bottomStripVector() const;
0046   const Acts::Vector3& stripCenterDistance() const;
0047   const Acts::Vector3& topStripCenterPosition() const;
0048 
0049  private:
0050   const container_t& container() const;
0051 
0052   const container_t* m_container{nullptr};
0053   std::size_t m_index{0ul};
0054 };
0055 
0056 }  // namespace Acts
0057 
0058 #include "Acts/EventData/SpacePointProxy.ipp"