MARLEY (Model of Argon Reaction Low Energy Yields)
v1.0.0
A Monte Carlo event generator for tens-of-MeV neutrino-nucleus interactions in liquid argon
|
Container for ingoing and outgoing momentum 4-vectors from a reaction. More...
#include <Event.hh>
Public Member Functions | |
Event (double Ex=0.) | |
Create an event with dummy particles. | |
Event (const marley::Particle &a, const marley::Particle &b, const marley::Particle &c, const marley::Particle &d, double Ex=0.) | |
Create a two-two scattering event. More... | |
Event (const Event &other_event) | |
Copy constructor. | |
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. | |
const marley::Particle & | ejectile () const |
Get a const reference to the ejectile. | |
marley::Particle & | ejectile () |
Get a non-const reference to the ejectile. | |
double | Ex () const |
Get the excitation energy of the residue just after the initial two-body reaction. | |
const std::vector < marley::Particle * > & | get_final_particles () const |
Get a const reference to the vector of final particles. | |
std::vector< marley::Particle * > & | get_final_particles () |
Get a non-const reference to the vector of final particles. | |
const std::vector < marley::Particle * > & | get_initial_particles () const |
Get a const reference to the vector of initial particles. | |
std::vector< marley::Particle * > & | get_initial_particles () |
Get a non-const reference to the vector of initial particles. | |
Event & | operator= (const Event &other_event) |
Copy assignment operator. | |
Event & | operator= (Event &&other_event) |
Move assignment operator. | |
void | print (std::ostream &out) const |
Print this event to a std::ostream. More... | |
const marley::Particle & | projectile () const |
Get a const reference to the projectile. | |
marley::Particle & | projectile () |
Get a non-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... | |
const marley::Particle & | residue () const |
Get a const reference to the residue. | |
marley::Particle & | residue () |
Get a non-const reference to the residue. | |
const marley::Particle & | target () const |
Get a const reference to the target. | |
marley::Particle & | target () |
Get a non-const reference to the target. | |
marley::JSON | to_json () const |
Create a JSON representation of this event. | |
void | write_hepevt (size_t event_num, 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... | |
Protected Attributes | |
double | Ex_ |
Excitation energy (MeV) of the residue. More... | |
std::vector< marley::Particle * > | final_particles_ |
Vector of pointers to each of the final state particles. | |
std::vector< marley::Particle * > | initial_particles_ |
Vector of pointers to each of the initial state particles. | |
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.
marley::Event::Event | ( | const marley::Particle & | a, |
const marley::Particle & | b, | ||
const marley::Particle & | c, | ||
const marley::Particle & | d, | ||
double | Ex = 0. |
||
) |
Create a two-two scattering event.
a | the projectile |
b | the target |
c | the ejectile |
d | the residue |
Ex | residue excitation energy (MeV) just after the two-two reaction |
void marley::Event::print | ( | std::ostream & | out | ) | const |
Print this event to a std::ostream.
out | The std::ostream to which this event will be written |
void marley::Event::read | ( | std::istream & | in | ) |
Read in this event from a std::istream. Any previous contents of this event will be deleted.
in | The std::istream from which this event will be read |
void marley::Event::write_hepevt | ( | size_t | event_num, |
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.
event_num | The event number to use in the output HEPEvt record |
out | The std::ostream to which the HEPEvt record will be written |
|
protected |
Excitation energy (MeV) of the residue.