Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HepMC3Particle.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file HepMC3Particle.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 <HepMC3/FourVector.h>
15 #include <HepMC3/GenParticle.h>
16 #include <HepMC3/GenVertex.h>
17 
18 namespace ActsExamples {
19 namespace HepMC3Particle {
20 
24 SimParticle particle(const HepMC3::ConstGenParticlePtr& particle);
25 
29 int id(const std::shared_ptr<HepMC3::GenParticle>& particle);
30 
34 std::unique_ptr<SimVertex> productionVertex(
35  const std::shared_ptr<HepMC3::GenParticle>& particle);
36 
40 std::unique_ptr<SimVertex> endVertex(
41  const std::shared_ptr<HepMC3::GenParticle>& particle);
42 
46 int pdgID(const std::shared_ptr<HepMC3::GenParticle>& particle);
47 
51 Acts::Vector3 momentum(const std::shared_ptr<HepMC3::GenParticle>& particle);
52 
56 double energy(const std::shared_ptr<HepMC3::GenParticle>& particle);
57 
61 double mass(const std::shared_ptr<HepMC3::GenParticle>& particle);
62 
66 double charge(const std::shared_ptr<HepMC3::GenParticle>& particle);
67 
71 void pdgID(const std::shared_ptr<HepMC3::GenParticle>& particle, const int pid);
72 
76 void momentum(const std::shared_ptr<HepMC3::GenParticle>& particle,
77  const Acts::Vector3& mom);
78 
82 void energy(const std::shared_ptr<HepMC3::GenParticle>& particle,
83  const double energy);
84 
88 void mass(const std::shared_ptr<HepMC3::GenParticle>& particle,
89  const double mass);
90 
91 } // namespace HepMC3Particle
92 } // namespace ActsExamples