MARLEY (Model of Argon Reaction Low Energy Yields)
v1.2.0
A Monte Carlo event generator for tens-of-MeV neutrino interactions
|
A discrete nuclear energy level. More...
#include <Level.hh>
Public Member Functions | |
Level (double E, int twoJ, marley::Parity pi) | |
marley::Gamma & | add_gamma (const marley::Gamma &gamma) |
Add a new gamma-ray transition to this level. More... | |
marley::Gamma & | add_gamma (double energy, double branching_ratio, marley::Level *end_lev=nullptr) |
Add a new gamma-ray transition to this level. More... | |
void | clear_gammas () |
Remove all gamma ray information from this level. | |
double | energy () const |
Get the excitation energy of this level (MeV) | |
std::vector< marley::Gamma > & | gammas () |
Retrieve a reference to the vector of gamma rays owned by this level. | |
const std::vector< marley::Gamma > & | gammas () const |
Retrieve a const reference to the vector of gamma rays owned by this level. | |
bool | has_gammas () const |
marley::Parity | parity () const |
Get the level parity. | |
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. More... | |
void | set_energy (double E) |
Set the excitation energy of this level (MeV) | |
void | set_parity (marley::Parity pi) |
Set the level parity. | |
void | set_twoJ (int twoJ) |
Set two times the level spin. | |
std::string | spin_parity_string () const |
Returns the level spin-parity as a string. | |
int | twoJ () const |
Get two times the level spin. | |
Static Public Member Functions | |
template<typename It > | |
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 iterator that points to the Level's energy_ member variable. More... | |
A discrete nuclear energy level.
marley::Level::Level | ( | double | E, |
int | twoJ, | ||
marley::Parity | pi | ||
) |
E | excitation energy of this level (MeV) |
twoJ | two times the level spin |
pi | level parity |
marley::Gamma & marley::Level::add_gamma | ( | const marley::Gamma & | gamma | ) |
Add a new gamma-ray transition to this level.
marley::Gamma & marley::Level::add_gamma | ( | double | energy, |
double | branching_ratio, | ||
marley::Level * | end_lev = nullptr |
||
) |
Add a new gamma-ray transition to this level.
energy | Gamma-ray energy (MeV) |
branching_ratio | Branching ratio for the new gamma-ray transition |
end_lev | Pointer to the level that absorbs this gamma |
|
inline |
|
inlinestatic |
Convert an iterator that points to a marley::Level* (or a smart pointer to a marley::Level) into an iterator that points to the Level's energy_ member variable.
This function is used by the DecayScheme class to keep the vector of std::unique_ptr<marley::Level> objects that it owns sorted in order of increasing excitation energy.
const marley::Gamma * marley::Level::sample_gamma | ( | marley::Generator & | gen | ) |
Choose a gamma owned by this level randomly based on the relative intensities of all of the gammas.