Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-15 08:18:10

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/EventData/BoundTrackParameters.hpp"
0012 #include "Acts/EventData/TrackParametersConcept.hpp"
0013 
0014 namespace Acts::detail {
0015 
0016 /// @brief Shorthand for Bound or Free track parameters
0017 template <class parameters_t>
0018 concept isBoundOrFreeTrackParams = FreeTrackParametersConcept<parameters_t> ||
0019                                    BoundTrackParametersConcept<parameters_t>;
0020 
0021 /// @brief Shorthand for GenericBoundTrackParameters
0022 template <class parameters_t>
0023 concept isBoundTrackParams = std::same_as<parameters_t, BoundTrackParameters>;
0024 
0025 /// @brief Concept that restricts the type of the
0026 /// accumulation grid cell
0027 template <typename grid_t>
0028 concept TrackParamsGrid = requires {
0029   typename grid_t::value_type::first_type;
0030   typename grid_t::value_type::second_type;
0031 
0032   requires isBoundOrFreeTrackParams<
0033       typename grid_t::value_type::first_type::element_type>;
0034   requires isBoundOrFreeTrackParams<
0035       typename grid_t::value_type::second_type::element_type>;
0036 
0037   requires requires(typename grid_t::value_type val) {
0038     {
0039       val.first
0040     } -> std::same_as<
0041         std::shared_ptr<typename decltype(val.first)::element_type>&>;
0042     { val.second } -> std::same_as<decltype(val.first)&>;
0043   };
0044 };
0045 
0046 }  // namespace Acts::detail