Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SimVertex.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file SimVertex.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 
14 
15 #include <vector>
16 
17 namespace ActsExamples {
18 
20 struct SimVertex {
23 
25  Vector4 position4 = Vector4::Zero();
27  ActsFatras::ProcessType process = ActsFatras::ProcessType::eUndefined;
29  std::vector<ActsFatras::Particle> incoming = {};
31  std::vector<ActsFatras::Particle> outgoing = {};
32 
40  SimVertex(const Vector4& position4_, ActsFatras::ProcessType process_ =
41  ActsFatras::ProcessType::eUndefined)
42  : position4(position4_), process(process_) {}
43  // explicitly default rule-of-five.
44  SimVertex() = default;
45  SimVertex(const SimVertex&) = default;
46  SimVertex(SimVertex&&) = default;
47  SimVertex& operator=(const SimVertex&) = default;
48  SimVertex& operator=(SimVertex&&) = default;
49 
51  auto position() const { return position4.head<3>(); }
53  Scalar time() const { return position4[3]; }
54 };
55 
56 } // namespace ActsExamples