|
| Event (const Event &other_event) |
| Copy constructor.
|
|
| Event (const marley::Particle &a, const marley::Particle &b, const marley::Particle &c, const marley::Particle &d, double Ex, int twoJ, const marley::Parity &P) |
| Create a two-two scattering event. More...
|
|
| Event (double Ex=0.) |
| Create an event with dummy particles.
|
|
| Event (Event &&other_event) |
| Move constructor.
|
|
void | add_final_particle (const marley::Particle &p) |
| Add a Particle to the vector of final particles.
|
|
void | add_initial_particle (const marley::Particle &p) |
| Add a Particle to the vector of initial particles.
|
|
void | clear () |
| Deletes all particles from the event and resets the nuclear excitation energy to zero.
|
|
marley::Particle & | ejectile () |
| Get a non-const reference to the ejectile.
|
|
const marley::Particle & | ejectile () const |
| Get a const reference to the ejectile.
|
|
double | Ex () const |
| Get the excitation energy of the residue just after the initial two-body reaction.
|
|
const marley::Particle & | final_particle (size_t idx) const |
| Returns a const reference to the final particle with the given index. More...
|
|
size_t | final_particle_count () const |
| Returns the number of final particles in the Event.
|
|
void | from_json (const marley::JSON &json) |
| Replace the existing event contents with those read from a JSON representation.
|
|
std::vector< marley::Particle * > & | get_final_particles () |
| Get a non-const reference to the vector of final particles.
|
|
const std::vector< marley::Particle * > & | get_final_particles () const |
| Get a const reference to the vector of final particles.
|
|
std::vector< marley::Particle * > & | get_initial_particles () |
| Get a non-const reference to the vector of initial particles.
|
|
const std::vector< marley::Particle * > & | get_initial_particles () const |
| Get a const reference to the vector of initial particles.
|
|
const marley::Particle & | initial_particle (size_t idx) const |
| Returns a const reference to the initial particle with the given index. More...
|
|
size_t | initial_particle_count () const |
| Returns the number of initial particles in the Event.
|
|
Event & | operator= (const Event &other_event) |
| Copy assignment operator.
|
|
Event & | operator= (Event &&other_event) |
| Move assignment operator.
|
|
marley::Parity | parity () const |
| Get the intrinsic parity of the residue just after the initial two-body reaction.
|
|
void | print (std::ostream &out) const |
| Print this event to a std::ostream. More...
|
|
void | print_human_readable (std::ostream &out, int num=-1) const |
| Print this event to a std::ostream in an annotated format easily readable by humans. More...
|
|
marley::Particle & | projectile () |
| Get a non-const reference to the projectile.
|
|
const marley::Particle & | projectile () const |
| Get a const reference to the projectile.
|
|
void | read (std::istream &in) |
| Read in this event from a std::istream. Any previous contents of this event will be deleted. More...
|
|
bool | read_hepevt (std::istream &in, double *flux_avg_tot_xsec=nullptr) |
| Read in this event from a std::istream, assuming it will appear there in HEPEVT format. Any previous contents of this event will be deleted. More...
|
|
marley::Particle & | residue () |
| Get a non-const reference to the residue.
|
|
const marley::Particle & | residue () const |
| Get a const reference to the residue.
|
|
marley::Particle & | target () |
| Get a non-const reference to the target.
|
|
const marley::Particle & | target () const |
| Get a const reference to the target.
|
|
marley::JSON | to_json () const |
| Create a JSON representation of this event.
|
|
int | twoJ () const |
| Get two times the spin of the residue just after the initial two-body reaction.
|
|
void | write_hepevt (size_t event_num, double flux_avg_tot_xsec, std::ostream &out) const |
| Write a HEPEVT record for this event to a std::ostream. Use the spacetime origin (t = 0 mm/c, x = 0 mm, y = 0 mm, z = 0 mm) as the initial position 4-vector for all particles. More...
|
|
Container for ingoing and outgoing momentum 4-vectors from a reaction.
For a two-two scattering reaction a + b → c + d, this class calls the ingoing particles the projectile (a) and target (b). The outgoing particles are called the ejectile (c) and residue (d). If the residue is a composite particle (e.g., a nucleus), then the class member Ex_ stores its excitation energy just after the two-two reaction occurred. After MARLEY simulates its de-excitation, the residue Particle object will be in its ground state, and the final_particles_ member of this class will include Particle objects representing the de-excitation products.
- Note
- This class manually manages memory (using the “rule of 5”) for the Particle objects that it owns. A better implementation from a modern C++ perspective would be to use vectors of std::unique_ptr<marley::Particle> objects and let those manage the memory (i.e., use the “rule of zero”). This design choice was made to ensure compatibility with ROOT 5, which cannot generate dictionaries for C++11 classes like std::unique_ptr.