![]() |
TkN 2.6
Toolkit for Nuclei
|
Represents a nuclear excited level (or ground state). More...
#include <physics/tklevel.h>
Public Member Functions | |
| tklevel (int _id, const tkdb_table::measure_data_struct &_struc) | |
| virtual | ~tklevel () override=default |
| void | add_decay_down (shared_ptr< tkdecay > _dec) |
| add a down decay to the level | |
| void | add_decay_up (shared_ptr< tkdecay > _dec) |
| add a up decay to the level | |
| const tkstring & | get_comment () |
| get the level comment string | |
| vector< shared_ptr< tkdecay > > | get_decays_down () |
| return a vector of tkdecay containing of the downward decays | |
| vector< shared_ptr< tkdecay > > | get_decays_up () |
| return a vector of tkdecay containing the upward decays | |
| double | get_energy (const tkunit_manager::units_keys _unit=tkunit_manager::units_keys::keV, bool _with_offset=false) |
| returns the energy in keV by default | |
| shared_ptr< tkmeasure > | get_energy_measure () |
| returns the energy tkmeasure object | |
| int | get_id () |
| get the level id | |
| int | get_isomer_level () |
| get the isomer level (1 for the 1rst (lowest energy) isomer, 2 for the second, etc..) | |
| double | get_lifetime (const tkunit_manager::units_keys _unit=tkunit_manager::units_keys::s) |
| returns the lifetime (in second by default) | |
| shared_ptr< tkmeasure > | get_lifetime_measure () |
| returns the lifetime tkmeasure object | |
| tkstring | get_lifetime_str () |
| returns the lifetime in string (using the best adapted unit) | |
| tkstring | get_offset_bandhead () |
| returns the bandhead string offset value (ex: X) | |
| shared_ptr< tkspin_parity > | get_spin_parity () |
| returns the spin parity shared pointer object | |
| const tkstring & | get_spin_parity_str () |
| returns the spin parity as a string | |
| bool | has_comment () |
| check if a comment exists | |
| bool | is_energy_offset () |
| to know if the energy is known with an energy offset | |
| bool | is_isomer () |
| returns true is the level an isomer | |
| bool | is_stable () |
| returns true if the level stable | |
| bool | is_uncertain () |
| check if the level is uncertain | |
| bool | is_yrast (bool _with_tentative=false) |
| returns true if the level is yrast | |
| void | print (const tkstring &_option="") |
| print the level properties | |
| void | set_comment (const tkstring &_comment) |
| set the level comment string | |
| void | set_energy_offset (const tkstring &_offset) |
| define the energy offset | |
| void | set_jpi (double _spin, int _parity, const tkstring &_jpi_str) |
| define the spin parity | |
| void | set_lifetime (tkdb_table::measure_data_struct &_struc) |
| define the level lifetime | |
| void | set_uncertain_level (const tkstring &_uncertain) |
| set the level as uncertain | |
Public Member Functions inherited from tkproperty_list | |
| tkproperty_list (tkstring _name) | |
| virtual | ~tkproperty_list ()=default |
| shared_ptr< tkmeasure > | get (const tkstring &_property) const |
| get the property as tkmeasure | |
| vector< shared_ptr< tkmeasure > > | get_data_properties (const tkstring &_opt="*") |
| get a vector of data properties according to a regular expression | |
| const auto & | get_properties () const |
| get the properties map | |
| tkstring | get_property (const tkstring &_property) const |
| get the property value as a string | |
| tkstring | get_property_type (const tkstring &_property) const |
| get the property type as a string | |
| tkstring | get_property_unit (const tkstring &_property) const |
| get the property unnit as a string | |
| bool | has_property (const tkstring &_property) const |
| to check if the property is available | |
| void | list_data_properties (const tkstring &_opt="*") const |
| list the available tkmeasure properties | |
| void | list_properties (const tkstring &_opt="*") const |
| list the available properties | |
Friends | |
| class | tkdataset |
| class | tklevel_scheme |
Represents a nuclear excited level (or ground state).
Stores information on a nuclear level.
A tklevel stores the energy, spin-parity, lifetime and comments of a single nuclear level. It also holds the lists of decays that depopulate (get_decays_down()) or populate (get_decays_up()) this level.
Levels are accessed via tklevel_scheme::get_levels() or tklevel_scheme::get_level().
See the nuclear levels user guide.
| tklevel | ( | int | _id, |
| const tkdb_table::measure_data_struct & | _struc ) |
Definition at line 36 of file tklevel.cpp.
|
overridevirtualdefault |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| double get_energy | ( | const tkunit_manager::units_keys | _unit = tkunit_manager::units_keys::keV, |
| bool | _with_offset = false ) |
returns the energy in keV by default
| _unit | unit of the returned result. keV is used by default |
| _with_offset | if energy known only relatively to an offset, returns the relative energy |
This method returns the level energy in unit of _units. If the level is only known relatively to an offset value (ex: E=X, or E=X+100), a nan is returned if the option _with_offset is not specified. Use in this case get_offset_bandhead() to obtain the band ground state (X) If the option _with_offset is defined, the relative energy is returned (0. or 100 in the previous example)
Definition at line 95 of file tklevel.cpp.
|
inline |
|
inline |
| double get_lifetime | ( | const tkunit_manager::units_keys | _unit = tkunit_manager::units_keys::s | ) |
returns the lifetime (in second by default)
| _unit | unit of the returned result. second is used by default |
This method returns the level lifetime in unit of _units. A std::nan(1) is returned in case no lifetime is known for this nucleus. It can be tested using tknucleus::has_property("lifetime") prior to call this method or std::is_nan() on the returned value.
Definition at line 120 of file tklevel.cpp.
|
inline |
| tkstring get_lifetime_str | ( | ) |
returns the lifetime in string (using the best adapted unit)
This method returns the level lifetime as string using the best adapted unit
Definition at line 134 of file tklevel.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| bool is_yrast | ( | bool | _with_tentative = false | ) |
returns true if the level is yrast
returns true is the leve is Yrast
| _with_tentative | if enabled, consider also the tentative spin assignments |
This method returns true if the level is Yrast: corresponding to the lowest energy level for a given spin value
Definition at line 165 of file tklevel.cpp.
| void print | ( | const tkstring & | _option = "" | ) |
print the level properties
| _option | option for the print mode |
If _option equals "tab", print the level properties in a tabular view (usefull for the tklevel_scheme::print("level","tab") ) else, print the level properties with a verboser view
Definition at line 179 of file tklevel.cpp.
|
inline |
|
inline |
| void set_jpi | ( | double | _spin, |
| int | _parity, | ||
| const tkstring & | _jpi_str ) |
define the spin parity
Definition at line 78 of file tklevel.cpp.
| void set_lifetime | ( | tkdb_table::measure_data_struct & | _struc | ) |
define the level lifetime
Definition at line 57 of file tklevel.cpp.
|
inline |
|
friend |