Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PhysicsList.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PhysicsList.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2018 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 Fatras {
19 
26 template <typename... processes>
27 struct PhysicsList : private Acts::detail::Extendable<processes...> {
28 private:
29  using Acts::detail::Extendable<processes...>::tuple;
30 
31 public:
32  using Acts::detail::Extendable<processes...>::get;
33 
47  template <typename generator_t, typename detector_t, typename particle_t>
48  bool operator()(generator_t &gen, const detector_t &det, particle_t &in,
49  std::vector<particle_t> &out) const {
50  // clang-format off
51  static_assert(Acts::detail::all_of_v<detail::process_signature_check_v<processes, generator_t, detector_t, particle_t>...>,
52  "not all processes support the specified interface");
53  // clang-format on
54 
55  // create an emtpy particle vector
56  typedef detail::physics_list_impl<processes...> impl;
57  return impl::process(tuple(), gen, det, in, out);
58  }
59 };
60 
61 } // namespace Fatras