13 std::unique_ptr<ActsExamples::SimParticle>
15 const std::shared_ptr<HepMC3::GenParticle>
particle) {
19 SimParticle fw(particleId, static_cast<Acts::PdgParticle>(particle->pid()),
21 fw.setDirection(particle->momentum().x(), particle->momentum().y(),
22 particle->momentum().z());
23 fw.setAbsMomentum(particle->momentum().p3mod());
24 return std::make_unique<SimParticle>(std::move(
fw));
28 const std::shared_ptr<HepMC3::GenParticle>
particle) {
29 return particle->id();
32 std::unique_ptr<ActsExamples::SimVertex>
34 const std::shared_ptr<HepMC3::GenParticle>
particle) {
38 if (particle->production_vertex())
40 std::make_shared<HepMC3::GenVertex>(*particle->production_vertex()));
45 std::unique_ptr<ActsExamples::SimVertex>
47 const std::shared_ptr<HepMC3::GenParticle>
particle) {
51 if (particle->end_vertex())
53 std::make_shared<HepMC3::GenVertex>(*(particle->end_vertex())));
59 const std::shared_ptr<HepMC3::GenParticle>
particle) {
60 return particle->pid();
64 const std::shared_ptr<HepMC3::GenParticle>
particle) {
66 mom(0) = particle->momentum().x();
67 mom(1) = particle->momentum().y();
68 mom(2) = particle->momentum().z();
73 const std::shared_ptr<HepMC3::GenParticle>
particle) {
74 return particle->momentum().e();
78 const std::shared_ptr<HepMC3::GenParticle>
particle) {
79 return particle->generated_mass();
83 const std::shared_ptr<HepMC3::GenParticle>
particle) {
88 std::shared_ptr<HepMC3::GenParticle>
particle,
const int pid) {
89 particle->set_pid(pid);
94 HepMC3::FourVector fVec(
mom(0),
mom(1),
mom(2), particle->momentum().e());
95 particle->set_momentum(fVec);
99 std::shared_ptr<HepMC3::GenParticle>
particle,
const double energy) {
100 HepMC3::FourVector fVec(particle->momentum().x(), particle->momentum().y(),
101 particle->momentum().z(), energy);
102 particle->set_momentum(fVec);
106 std::shared_ptr<HepMC3::GenParticle>
particle,
const double mass) {
107 particle->set_generated_mass(mass);