LDMX Software
HepMCParticle.h
Go to the documentation of this file.
1
7#ifndef SIMCORE_HEPMCPARTICLE_H_
8#define SIMCORE_HEPMCPARTICLE_H_
9
10// LDMX
11
12// HepMC3
13#include "HepMC3/GenParticle.h"
14
15// STL
16#include <iostream>
17#include <memory>
18
19// Geant4
20
21namespace simcore {
22namespace hepmc {
23
29 public:
34 HepMCParticle(std::shared_ptr<HepMC3::GenParticle> particle);
35
40 int getPdgId() const;
41
46 int getStatus() const;
47
53 double getMomentum(int index) const;
54
59 double getMass() const;
60
65 std::shared_ptr<HepMC3::GenParticle> getGenParticle() const;
66
70 void print() const;
71
77 friend std::ostream& operator<<(std::ostream& stream,
78 const HepMCParticle& particle);
79
80 private:
84 std::shared_ptr<HepMC3::GenParticle> particle_;
85};
86
87} // namespace hepmc
88} // namespace simcore
89
90#endif
Wrapper class for HepMC3::GenParticle.
double getMomentum(int index) const
Get a momentum component by index.
double getMass() const
Get the particle's mass.
std::shared_ptr< HepMC3::GenParticle > particle_
The underlying HepMC3 GenParticle.
int getStatus() const
Get the status code.
void print() const
Print particle information to an output stream.
HepMCParticle(std::shared_ptr< HepMC3::GenParticle > particle)
Class constructor.
friend std::ostream & operator<<(std::ostream &stream, const HepMCParticle &particle)
Overloaded stream operator.
int getPdgId() const
Get the PDG code.
std::shared_ptr< HepMC3::GenParticle > getGenParticle() const
Get the underlying HepMC3 GenParticle.
Dynamically loadable photonuclear models either from SimCore or external libraries implementing this ...