EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LinearizerConcept.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file LinearizerConcept.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2019 CERN for the benefit of the Acts project
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
9 #pragma once
10 
17 
18 namespace Acts {
19 
20 namespace Concepts {
21 namespace Linearizer {
22 
23 template <typename T>
24 using propagator_t = typename T::Propagator_t;
25 template <typename T>
26 using state_t = typename T::State;
27 
28 METHOD_TRAIT(linTrack_t, linearizeTrack);
29 
30 // clang-format off
31  template <typename S>
33 
34  constexpr static bool linTrack_exists = has_method<const S, Result<LinearizedTrack>,
35  linTrack_t, const BoundTrackParameters&,
36  const Vector4D&,
37  const Acts::GeometryContext&,
39  typename S::State&>;
40 
41  static_assert(linTrack_exists, "linearizeTrack method not found");
42 
43  constexpr static bool propagator_exists = exists<propagator_t, S>;
44  static_assert(propagator_exists, "Propagator type not found");
45 
46  constexpr static bool state_exists = exists<state_t, S>;
47  static_assert(state_exists, "State type not found");
48 
49  constexpr static bool value = require<linTrack_exists,
51  state_exists>;
52  };
53 // clang-format on
54 } // namespace Linearizer
55 } // namespace Concepts
56 
57 template <typename fitter>
58 constexpr bool LinearizerConcept =
60 
61 } // namespace Acts