![]() |
TkN 2.2
Toolkit for Nuclei
|
Stores information on a nuclear level. More...
Stores information on a nuclear level.
For any nucleus, it is possible to access to its level scheme composed of the known levels and decays. Print the known levels as follows:
or using a lambda function to filter the levels (e.g. all the positive parity states in):
, or using its energy (the closest level in energy will be returned):
| method name | description |
|---|---|
| get_energy() | returns the energy in keV |
| is_energy_offset() | to know is the level is only known relatively to an offset |
| get_offset_bandhead() | returns the band offset value |
| get_lifetime() | to get the lifetime in seconds |
| get_spin_parity() | to get the spin and parity as a tkn::tkspin_parity object |
| get_spin_parity_str() | to get the spin and parity as a string |
| is_stable() | returns true is the level is stable |
| is_isomer() | returns true is the level is an isomer |
| get_isomer_level() | returns the isomer level (1st, second,...) |
| is_yrast() | returns true is the level yrast |
| get_decays_up() | returns the list of decays that populate this level |
| get_decays_down() | returns the list of decays that depopulate this level |
| has_comment() | returns true if a comment on this level exists |
| get_comment() | returns the comment on this level |
| is_uncertain() | returns true if a the level is uncertain |
| print() | prints the main level informations (as already used above) |
#include <tklevel.h>
Public Member Functions | |
| tklevel (int _id, const tkdb_table::measure_data_struct &_struc) | |
| virtual | ~tklevel ()=default |
| void | add_decay_down (shared_ptr< tkdecay > _dec) |
| add a down decay to the level More... | |
| void | add_decay_up (shared_ptr< tkdecay > _dec) |
| add a up decay to the level More... | |
| const tkstring & | get_comment () |
| get the level comment string More... | |
| vector< shared_ptr< tkdecay > > | get_decays_down () |
| return a vector of tkdecay containing of the downward decays More... | |
| vector< shared_ptr< tkdecay > > | get_decays_up () |
| return a vector of tkdecay containing the upward decays More... | |
| 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 More... | |
| shared_ptr< tkmeasure > | get_energy_measure () |
| returns the energy tkmeasure object More... | |
| int | get_id () |
| get the level id More... | |
| int | get_isomer_level () |
| get the isomer level (1 for the 1rst (lowest energy) isomer, 2 for the second, etc..) More... | |
| double | get_lifetime (const tkunit_manager::units_keys _unit=tkunit_manager::units_keys::s) |
| returns the lifetime (in second by default) More... | |
| shared_ptr< tkmeasure > | get_lifetime_measure () |
| returns the lifetime tkmeasure object More... | |
| tkstring | get_lifetime_str () |
| returns the lifetime in string (using the best adapted unit) More... | |
| tkstring | get_offset_bandhead () |
| returns the bandhead string offset value (ex: X) More... | |
| shared_ptr< tkspin_parity > | get_spin_parity () |
| returns the spin parity shared pointer object More... | |
| const tkstring & | get_spin_parity_str () |
| returns the spin parity as as string More... | |
| bool | has_comment () |
| check if a comment exists More... | |
| bool | is_energy_offset () |
| to know if the energy is known with an energy offset More... | |
| bool | is_isomer () |
| returns true is the level an isomer More... | |
| bool | is_stable () |
| returns true if the level stable More... | |
| bool | is_uncertain () |
| check if the level is uncertain More... | |
| bool | is_yrast (bool _with_tentative=false) |
| returns true is the leve is Yrast More... | |
| void | print (const tkstring &_option="") |
| print the level properties More... | |
| void | set_comment (const tkstring &_comment) |
| set the level comment string More... | |
| void | set_energy_offset (tkstring &_offset) |
| define the energy offset More... | |
| void | set_jpi (double _spin, int _parity, const tkstring &_jpi_str) |
| define the spin parity More... | |
| void | set_lifetime (tkdb_table::measure_data_struct &_struc) |
| define the level lifetime More... | |
| void | set_uncertain_level (const tkstring &_uncertain) |
| set the level as uncertain More... | |
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 More... | |
| vector< shared_ptr< tkmeasure > > | get_data_properties (const tkstring &_opt="*") |
| get a vector of data properties according to a regular expression More... | |
| const std::map< tkstring, property_string > | get_properties () |
| get the properties map More... | |
| tkstring | get_property (const tkstring &_property) const |
| get the property value as a string More... | |
| tkstring | get_property_type (const tkstring &_property) const |
| get the property type as a string More... | |
| tkstring | get_property_unit (const tkstring &_property) const |
| get the property unnit as a string More... | |
| bool | has_property (const tkstring &_property) const |
| to check if the property is available More... | |
| void | list_data_properties (const tkstring &_opt="*") const |
| list the available tkmeasure properties More... | |
| void | list_properties (const tkstring &_opt="*") const |
| list the available properties More... | |
Friends | |
| class | tkdataset |
| class | tklevel_scheme |
| tklevel | ( | int | _id, |
| const tkdb_table::measure_data_struct & | _struc | ||
| ) |
Definition at line 55 of file tklevel.cpp.
|
virtualdefault |
|
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 111 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 136 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 150 of file tklevel.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| bool is_yrast | ( | bool | _with_tentative = false | ) |
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 181 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 194 of file tklevel.cpp.
|
inline |
|
inline |
| void set_jpi | ( | double | _spin, |
| int | _parity, | ||
| const tkstring & | _jpi_str | ||
| ) |
define the spin parity
Definition at line 94 of file tklevel.cpp.
| void set_lifetime | ( | tkdb_table::measure_data_struct & | _struc | ) |
define the level lifetime
Definition at line 75 of file tklevel.cpp.
|
inline |
|
friend |