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#include "Framework/Exception/Exception.h"
12
13// HepMC3
14#include "HepMC3/FourVector.h"
15#include "HepMC3/GenParticle.h"
16
17// STL
18#include <iostream>
19#include <memory>
20
21// Geant4
22#include "globals.hh"
23
24namespace simcore {
25namespace hepmc {
26
32 public:
37 HepMCParticle(std::shared_ptr<HepMC3::GenParticle> particle);
38
43 int getPdgId() const;
44
49 int getStatus() const;
50
56 double getMomentum(int index) const;
57
62 double getMass() const;
63
68 std::shared_ptr<HepMC3::GenParticle> getGenParticle() const;
69
73 void print() const;
74
80 friend std::ostream& operator<<(std::ostream& stream,
81 const HepMCParticle& particle);
82
83 private:
87 std::shared_ptr<HepMC3::GenParticle> particle_;
88};
89
90} // namespace hepmc
91} // namespace simcore
92
93#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 ...