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/Definitions/TrackParametrization.hpp"
0012 #include "Acts/EventData/Types.hpp"
0013 #include "Acts/Surfaces/Surface.hpp"
0014 #include "Acts/Utilities/HashedString.hpp"
0015 
0016 #include <any>
0017 #include <concepts>
0018 #include <type_traits>
0019 
0020 namespace Acts {
0021 
0022 template <typename C>
0023 concept ChargeConcept = requires(C c, C c2, float f, double d) {
0024   { C{f} };
0025 
0026   { c == c2 } -> std::same_as<bool>;
0027   { c != c2 } -> std::same_as<bool>;
0028 
0029   { c.absQ() } -> std::same_as<float>;
0030   { c.extractCharge(d) } -> std::same_as<float>;
0031   { c.extractMomentum(d) } -> std::same_as<double>;
0032   { c.qOverP(d, d) } -> std::same_as<double>;
0033 };
0034 
0035 }  // namespace Acts