Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions include/marley/Event.hh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
// MARLEY includes
#include "marley/Parity.hh"
#include "marley/Particle.hh"
#include "marley/Level.hh"

namespace marley {

Expand Down Expand Up @@ -128,6 +129,10 @@ namespace marley {
/// @brief Get a non-const reference to the vector of final particles
inline std::vector<marley::Particle*>& get_final_particles();

inline const std::vector<marley::Level*>& get_cascade_levels() const;

inline std::vector<marley::Level*>& get_cascade_levels();

/// @brief Returns the number of initial particles in the Event
inline size_t initial_particle_count() const;

Expand All @@ -148,6 +153,8 @@ namespace marley {
/// equal to the size of the vector of final particles
inline const marley::Particle& final_particle( size_t idx ) const;

inline const marley::Level& cascade_level( size_t idx ) const;

/// @brief Get the excitation energy of the residue just after the
/// initial two-body reaction
inline double Ex() const;
Expand All @@ -166,6 +173,8 @@ namespace marley {
/// @brief Add a Particle to the vector of final particles
void add_final_particle(const marley::Particle& p);

void add_cascade_level(const marley::Level& l);

/// @brief Write a
/// <a href="http://home.fnal.gov/~mrenna/lutp0613man2/node49.html">
/// HEPEVT</a> record for this event to a std::ostream. Use the spacetime
Expand Down Expand Up @@ -242,6 +251,8 @@ namespace marley {
/// @brief Vector of pointers to each of the final state particles
std::vector<marley::Particle*> final_particles_;

std::vector<marley::Level*> cascade_levels_;

/// @brief Excitation energy (MeV) of the residue immediately after the
/// two-two scattering reaction
/// @note The Ex_ class member is always zero for residues that have no
Expand Down Expand Up @@ -290,6 +301,12 @@ namespace marley {
inline std::vector<marley::Particle*>& Event::get_final_particles()
{ return final_particles_; }

inline const std::vector<marley::Level*>& Event::get_cascade_levels()
const { return cascade_levels_; }

inline std::vector<marley::Level*>& Event::get_cascade_levels()
{ return cascade_levels_; }

inline size_t Event::initial_particle_count() const
{ return initial_particles_.size(); }

Expand Down
2 changes: 2 additions & 0 deletions src/DecayScheme.cc
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ void marley::DecayScheme::do_cascade(marley::Level& initial_level,
// post-gamma-emission mass.
double Exf = p_current_level->energy();

event.add_cascade_level(*p_gamma->start_level());

// Create new particle objects to represent the emitted gamma and
// recoiling nucleus
marley::Particle gamma(marley_utils::PHOTON, 0);
Expand Down
5 changes: 5 additions & 0 deletions src/Event.cc
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,11 @@ void marley::Event::add_final_particle(const marley::Particle& p)
final_particles_.push_back(new marley::Particle(p));
}

void marley::Event::add_cascade_level(const marley::Level& l)
{
cascade_levels_.push_back(new marley::Level(l));
}

void marley::Event::clear() {
this->delete_particles();
Ex_ = 0.;
Expand Down