![]() |
TkN 2.5
Toolkit for Nuclei
|
Represents a nuclear decay transition between two levels. More...
Represents a nuclear decay transition between two levels.
Stores information on a nuclear decay.
tkdecay is the base class for decay transitions stored in the TkN database. It holds the transition energy, decay type, parent and daughter levels, and optional comment and uncertainty flags.
Currently only gamma decays are stored in the database; they are represented by the derived class tkgammadecay.
Decays are accessed via tklevel_scheme::get_decays() or tklevel_scheme::get_decays<tkgammadecay>().
As for the levels, from the level scheme, it is possible to access to all the known decays of a nucleus. In the current version, only gamma decays are implemented. Support for additional decay types (beta, EC, alpha, particle) is planned in a future version.
Print the known decays as follows:
It is also possible to print at the same time the levels and its associated decays:
As for the levels, The decay list can be retrieved using:
It is also possible to restrict the decay list to a type of decay:
As for the moment only tkn::tkgammadecay are included, it is advised to only use this second option to easily benefit from the tkgammadecay methods on the decay list.
The same can be done using a lambda function to filter the decays (e.g. only decays coming from a level lower than 1 MeV):
A decay can also been accessed directly by its name (e.g. the decay from the first 3⁺ to the first 2⁺ state):
, or using its energy (the closest level in energy will be returned):
The get_decay(...) methods return a tkn::tkdecay object, and the get_decays(...) methods return a vector of tkn::tkdecay objects. As explained, if we want to play only with gamma decays, the template access get_decay<tkgammadecay>(...) methods return a tkn::tkgammadecay object, and the get_decays<tkgammadecay>(...) methods return a vector of tkn::tkgammadecay the tkn::tkgammadecay class inherits from the tkn::tkdecay, so all methods applicable for a tkdecay are also valid for a tkgammadecay.
Here are the main method that can be applied on a tkdecay:
| method name | description |
|---|---|
| get_energy() | to get the energy in keV |
| get_decay_type() | to get the decay type (enum: kgamma, kbeta, kec, kalpha, kparticle); currently only kgamma decays are stored in the database |
| get_level_from() | returns the parent level |
| get_level_to() | returns the daughter 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 the level is uncertain |
| print() | prints the main decay information (as already used above) |
Here are the main method that can be applied on a tkgammadecay:
| method name | description |
|---|---|
| get_relative_intensity() | get the gamma relative intensity (100% corresponds to the most intense gamma-ray) |
| get_mixing_ratio() | get the mixing ratio |
| get_conv_coeff() | get the gamma conversion coefficient |
| get_trans_prob(bool _elec, int _L, bool _WU) | get the transition probability |
| get_multipolarity() | get the transition multipolarity as a string |
The above methods giving access to a measure (ex: get_conv_coeff() ), are directly returning the value as a double. Dedicated methods allows to access the tkn::tkmeasure to access to units, uncertainties... etc (see Measures and units).
For example, for the lifetime, the method get_conv_coeff_measure() returns the tkmeasure object.
#include <tkdecay.h>
Public Types | |
| enum | decay_type { kundef , kbeta , kec , kalpha , kparticle , kgamma } |
Public Member Functions | |
| tkdecay (int _id, int _from_id, int _to_id, const tkdb_table::measure_data_struct &_struc, decay_type _type) | |
| virtual | ~tkdecay () override=default |
| const tkstring & | get_comment () const |
| get the level comment string | |
| decay_type | get_decay_type () |
| get the decay type | |
| double | get_energy (const tkunit_manager::units_keys _unit=tkunit_manager::units_keys::keV) |
| returns the energy in keV by default | |
| shared_ptr< tkmeasure > | get_energy_meas () const |
| returns the energy tkmeasure object | |
| shared_ptr< tklevel > | get_level_from () |
| get the parent level | |
| shared_ptr< tklevel > | get_level_to () |
| get the daughter level | |
| bool | has_comment () const |
| check if a comment exists | |
| bool | is_uncertain () const |
| check if the decay is uncertain | |
| void | print (const tkstring &_option="") const |
| print the decay properties | |
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 | |
Static Public Attributes | |
| static array< tkstring, 6 > | decay_type_str = {"undefined", "beta", "ec", "alpha", "particle", "gamma"} |
Friends | |
| class | tkdataset |
| class | tklevel_scheme |
| enum decay_type |
| tkdecay | ( | int | _id, |
| int | _from_id, | ||
| int | _to_id, | ||
| const tkdb_table::measure_data_struct & | _struc, | ||
| decay_type | _type ) |
Definition at line 146 of file tkdecay.cpp.
|
overridevirtualdefault |
|
inline |
|
inline |
| double get_energy | ( | const tkunit_manager::units_keys | _unit = tkunit_manager::units_keys::keV | ) |
returns the energy in keV by default
| _unit | unit of the returned result. keV is used by default |
This method returns the level energy in unit of _units.
Definition at line 168 of file tkdecay.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void print | ( | const tkstring & | _option = "" | ) | const |
print the decay properties
| _option | option for the print mode |
If _option contains "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.
If _option contains "com", the comments are printed.
If _option contains "quiet", the colored header '[ INFO ]' is not printed
Definition at line 181 of file tkdecay.cpp.
|
friend |
|
static |