Back to home page

EIC code displayed by LXR

 
 

    


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

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/GenericBoundTrackParameters.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 =
0019     Acts::FreeTrackParametersConcept<parameters_t> ||
0020     Acts::BoundTrackParametersConcept<parameters_t>;
0021 
0022 /// @brief Shorthand for GenericBoundTrackParameters
0023 template <class parameters_t>
0024 concept isGenericBoundTrackParams =
0025     std::same_as<parameters_t, Acts::GenericBoundTrackParameters<
0026                                    typename parameters_t::ParticleHypothesis>>;
0027 
0028 /// @brief Concept that restricts the type of the
0029 /// accumulation grid cell
0030 template <typename grid_t>
0031 concept TrackParamsGrid = requires {
0032   typename grid_t::value_type::first_type;
0033   typename grid_t::value_type::second_type;
0034 
0035   requires isBoundOrFreeTrackParams<
0036       typename grid_t::value_type::first_type::element_type>;
0037   requires isBoundOrFreeTrackParams<
0038       typename grid_t::value_type::second_type::element_type>;
0039 
0040   requires requires(typename grid_t::value_type val) {
0041     {
0042       val.first
0043     } -> std::same_as<
0044           std::shared_ptr<typename decltype(val.first)::element_type>&>;
0045     { val.second } -> std::same_as<decltype(val.first)&>;
0046   };
0047 };
0048 
0049 }  // namespace Acts::detail