Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HepMC3Event.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file HepMC3Event.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 <HepMC3/FourVector.h>
16 #include <HepMC3/GenEvent.h>
17 #include <HepMC3/GenParticle.h>
18 #include <HepMC3/GenVertex.h>
19 
20 namespace ActsExamples {
21 namespace HepMC3Event {
22 
26 
31 void momentumUnit(HepMC3::GenEvent& event, const double momentumUnit);
32 
37 void lengthUnit(HepMC3::GenEvent& event, const double lengthUnit);
38 
43 void shiftPositionBy(HepMC3::GenEvent& event, const Acts::Vector3& deltaPos,
44  const double deltaTime);
45 
50 void shiftPositionTo(HepMC3::GenEvent& event, const Acts::Vector3& pos,
51  const double time);
52 
56 void shiftPositionTo(HepMC3::GenEvent& event, const Acts::Vector3& pos);
57 
61 void shiftPositionTo(HepMC3::GenEvent& event, const double time);
62 
66 
70 void addParticle(HepMC3::GenEvent& event,
71  const std::shared_ptr<SimParticle>& particle);
72 
77 void addVertex(HepMC3::GenEvent& event,
78  const std::shared_ptr<SimVertex>& vertex);
82 
86 void removeParticle(HepMC3::GenEvent& event,
87  const std::shared_ptr<SimParticle>& particle);
88 
94 void removeVertex(HepMC3::GenEvent& event,
95  const std::shared_ptr<SimVertex>& vertex);
96 
100 
104 double momentumUnit(const HepMC3::GenEvent& event);
105 
109 double lengthUnit(const HepMC3::GenEvent& event);
110 
114 Acts::Vector3 eventPos(const HepMC3::GenEvent& event);
115 
119 double eventTime(const HepMC3::GenEvent& event);
120 
124 std::vector<SimParticle> particles(const HepMC3::GenEvent& event);
125 
129 std::vector<std::unique_ptr<SimVertex>> vertices(const HepMC3::GenEvent& event);
130 
134 std::vector<SimParticle> beams(const HepMC3::GenEvent& event);
135 
139 std::vector<SimParticle> finalState(const HepMC3::GenEvent& event);
140 
141 } // namespace HepMC3Event
142 } // namespace ActsExamples