Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SimParticle.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file SimParticle.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 
13 
14 #include <boost/container/flat_set.hpp>
15 
16 namespace ActsExamples {
17 namespace detail {
19  using is_transparent = void;
20  constexpr bool operator()(const ActsFatras::Particle& lhs,
21  const ActsFatras::Particle& rhs) const {
22  return lhs.particleId() < rhs.particleId();
23  }
25  const ActsFatras::Particle& rhs) const {
26  return lhs < rhs.particleId();
27  }
28  constexpr bool operator()(const ActsFatras::Particle& lhs,
29  ActsFatras::Barcode rhs) const {
30  return lhs.particleId() < rhs;
31  }
32 };
35  const ActsFatras::Particle& particle) const {
37  particle.particleId().vertexPrimary());
38  }
39 };
42  const ActsFatras::Particle& particle) const {
43  return ActsFatras::Barcode(0u)
45  .setVertexSecondary(particle.particleId().vertexSecondary());
46  }
47 };
48 } // namespace detail
49 
53  ::boost::container::flat_set<SimParticle, detail::CompareParticleId>;
54 
56 inline GroupBy<SimParticleContainer::const_iterator,
59  return makeGroupBy(container, detail::PrimaryVertexIdGetter());
60 }
61 
67 inline GroupBy<SimParticleContainer::const_iterator,
68  detail::SecondaryVertexIdGetter>
70  return makeGroupBy(container, detail::SecondaryVertexIdGetter());
71 }
72 
73 } // namespace ActsExamples