20 #include "marley/Gamma.hh"
21 #include "marley/IteratorToPointerMember.hh"
22 #include "marley/Parity.hh"
39 inline const std::vector<marley::Gamma>&
gammas()
const;
42 inline std::vector<marley::Gamma>&
gammas();
45 inline double energy()
const;
50 inline int twoJ()
const;
108 std::vector<marley::Gamma> gammas_;
112 std::discrete_distribution<size_t> gamma_dist_;
116 void update_gamma_distribution();
139 &marley::Level::energy_);
A gamma-ray transition between two nuclear levels.
Definition: Gamma.hh:25
The MARLEY Event generator.
Definition: Generator.hh:42
Template class that creates an iterator to a class member based on an iterator to a pointer (either b...
Definition: IteratorToPointerMember.hh:31
A discrete nuclear energy level.
Definition: Level.hh:29
void set_twoJ(int twoJ)
Set two times the level spin.
Definition: Level.hh:124
bool has_gammas() const
Definition: Level.hh:133
Level(double E, int twoJ, marley::Parity pi)
Definition: Level.cc:26
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...
Definition: Level.hh:136
marley::Gamma & add_gamma(const marley::Gamma &gamma)
Add a new gamma-ray transition to this level.
Definition: Level.cc:42
const std::vector< marley::Gamma > & gammas() const
Retrieve a const reference to the vector of gamma rays owned by this level.
Definition: Level.hh:129
void set_parity(marley::Parity pi)
Set the level parity.
Definition: Level.hh:127
const marley::Gamma * sample_gamma(marley::Generator &gen)
Choose a gamma owned by this level randomly based on the relative intensities of all of the gammas.
Definition: Level.cc:29
marley::Parity parity() const
Get the level parity.
Definition: Level.hh:126
int twoJ() const
Get two times the level spin.
Definition: Level.hh:123
void clear_gammas()
Remove all gamma ray information from this level.
Definition: Level.cc:66
void set_energy(double E)
Set the excitation energy of this level (MeV)
Definition: Level.hh:121
std::string spin_parity_string() const
Returns the level spin-parity as a string.
Definition: Level.cc:74
double energy() const
Get the excitation energy of this level (MeV)
Definition: Level.hh:120
Type-safe representation of a parity value (either +1 or -1)
Definition: Parity.hh:25