20#include "marley/Gamma.hh"
21#include "marley/IteratorToPointerMember.hh"
22#include "marley/Parity.hh"
40 inline const std::vector<marley::Gamma>&
gammas()
const;
43 inline std::vector<marley::Gamma>&
gammas();
46 inline double energy()
const;
51 inline int twoJ()
const;
93 double* prob_ptr =
nullptr );
123 std::vector< marley::Gamma > gammas_;
127 std::discrete_distribution< size_t > gamma_dist_;
131 void update_gamma_distribution();
158 &marley::Level::energy_ );
A gamma-ray transition between two nuclear levels.
The MARLEY Event generator.
Template class that creates an iterator to a class member based on an iterator to a pointer (either b...
A discrete nuclear energy level.
void set_twoJ(int twoJ)
Set two times the level spin.
static marley::IteratorToPointerMember< It, double > make_energy_iterator(It it)
Convert an iterator that points to a marley::Level* (or a smart pointer to a marley::Level) into an i...
double half_life() const
Get the level half-life (s)
marley::Gamma & add_gamma(const marley::Gamma &gamma)
Add a new gamma-ray transition to this level.
const std::vector< marley::Gamma > & gammas() const
Retrieve a const reference to the vector of gamma rays owned by this level.
void set_parity(marley::Parity pi)
Set the level parity.
Level(double E, int twoJ, marley::Parity pi, double half_life)
const marley::Gamma * sample_gamma(marley::Generator &gen, double *prob_ptr=nullptr)
Choose a gamma owned by this level randomly based on the relative intensities of all of the gammas.
marley::Parity parity() const
Get the level parity.
int twoJ() const
Get two times the level spin.
void clear_gammas()
Remove all gamma ray information from this level.
void set_energy(double E)
Set the excitation energy of this level (MeV)
std::string spin_parity_string() const
Returns the level spin-parity as a string.
double energy() const
Get the excitation energy of this level (MeV)
void set_half_life(double half_life)
Set the level half-life (s)
Type-safe representation of a parity value (either +1 or -1)