Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VertexFitterConcept.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file VertexFitterConcept.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 
16 
17 namespace Acts {
18 
19 namespace Concepts {
20 namespace VertexFitter {
21 
22 template <typename T>
23 using track_t = typename T::InputTrack_t;
24 template <typename T>
25 using propagator_t = typename T::Propagator_t;
26 template <typename T>
27 using linearizer_t = typename T::Linearizer_t;
28 template <typename T>
29 using state_t = typename T::State;
30 
31 METHOD_TRAIT(fit_t, fit);
32 
33 // clang-format off
34  template <typename S>
36  constexpr static bool fit_exists = has_method<const S, Result<Vertex<typename S::InputTrack_t>>,
37  fit_t,
38  const std::vector<const typename S::InputTrack_t*>&,
39  const typename S::Linearizer_t&,
41  typename S::State&>;
42  static_assert(fit_exists, "fit method not found");
43 
44  constexpr static bool track_exists = exists<track_t, S>;
45  static_assert(track_exists, "Track type not found");
46  constexpr static bool propagator_exists = exists<propagator_t, S>;
47  static_assert(propagator_exists, "Propagator type not found");
48  constexpr static bool linearizer_exists = exists<linearizer_t, S>;
49  static_assert(linearizer_exists, "Linearizer type not found");
50  constexpr static bool state_exists = exists<state_t, S>;
51  static_assert(state_exists, "State type not found");
52 
53  constexpr static bool value = require<fit_exists,
57  state_exists>;
58  };
59 // clang-format on
60 } // namespace VertexFitter
61 } // namespace Concepts
62 
63 template <typename fitter>
64 constexpr bool VertexFitterConcept =
66 
67 } // namespace Acts