15 const HepMC3::ConstGenParticlePtr&
particle) {
20 SimParticle fw(particleId, static_cast<Acts::PdgParticle>(particle->pid()),
22 fw.
setDirection(particle->momentum().x(), particle->momentum().y(),
23 particle->momentum().z());
29 const std::shared_ptr<HepMC3::GenParticle>&
particle) {
30 return particle->id();
33 std::unique_ptr<ActsExamples::SimVertex>
35 const std::shared_ptr<HepMC3::GenParticle>&
particle) {
37 if (particle->production_vertex()) {
39 std::make_shared<HepMC3::GenVertex>(*particle->production_vertex()));
45 std::unique_ptr<ActsExamples::SimVertex>
47 const std::shared_ptr<HepMC3::GenParticle>&
particle) {
49 if (particle->end_vertex()) {
51 std::make_shared<HepMC3::GenVertex>(*(particle->end_vertex())));
58 const std::shared_ptr<HepMC3::GenParticle>&
particle) {
59 return particle->pid();
63 const std::shared_ptr<HepMC3::GenParticle>&
particle) {
65 mom(0) = particle->momentum().x();
66 mom(1) = particle->momentum().y();
67 mom(2) = particle->momentum().z();
72 const std::shared_ptr<HepMC3::GenParticle>&
particle) {
73 return particle->momentum().e();
77 const std::shared_ptr<HepMC3::GenParticle>&
particle) {
78 return particle->generated_mass();
82 const std::shared_ptr<HepMC3::GenParticle>&
particle) {
88 const std::shared_ptr<HepMC3::GenParticle>&
particle,
const int pid) {
89 particle->set_pid(pid);
93 const std::shared_ptr<HepMC3::GenParticle>&
particle,
95 HepMC3::FourVector fVec(mom(0), mom(1), mom(2), particle->momentum().e());
96 particle->set_momentum(fVec);
100 const std::shared_ptr<HepMC3::GenParticle>&
particle,
const double energy) {
101 HepMC3::FourVector fVec(particle->momentum().x(), particle->momentum().y(),
102 particle->momentum().z(),
energy);
103 particle->set_momentum(fVec);
107 const std::shared_ptr<HepMC3::GenParticle>&
particle,
const double mass) {
108 particle->set_generated_mass(mass);