TkN 2.5
Toolkit for Nuclei
Loading...
Searching...
No Matches
tkdecay Class Reference

Represents a nuclear decay transition between two levels. More...

Detailed Description

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>().

See also
tkgammadecay, tklevel_scheme, tklevel, tkmeasure

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:

tknucleus nuc("8B");
nuc.get_level_scheme()->print("decay")
Represents a nucleus and provides access to its properties.
Definition tknucleus.h:50
[ INFO ] dataset '8B : ADOPTED LEVELS, GAMMAS' contains 2 decays:
[ INFO ] gamma decay energy = 769.5 (2.4 ) keV, mult M1
[ INFO ] gamma decay energy = 2320 (30 ) keV, mult M1

It is also possible to print at the same time the levels and its associated decays:

tknucleus nuc("8B");
nuc.get_level_scheme()->print("level,decay")
[ INFO ] dataset '8B : ADOPTED LEVELS, GAMMAS' contains 5 levels
[ INFO ] dataset '8B : ADOPTED LEVELS, GAMMAS' contains 2 decays
[ INFO ] Level energy = 0 keV [no uncertainty] ; Jpi: 2+ ; lifetime = 770 (3 ) ms
[ INFO ] Level energy = 769.5 (2.5 ) keV ; Jpi: 1+ ; lifetime = 35.6 (0.6 ) keV
-> gamma decay energy = 769.5 (2.4 ) keV, mult M1
[ INFO ] Level energy = 2320 (20 ) keV ; Jpi: 3+ ; lifetime = 350 (30 ) keV
-> gamma decay energy = 2320 (30 ) keV, mult M1
[ INFO ] Level energy = 3500 (500 ) keV ; Jpi: 2- ; lifetime = 8 (4 ) MeV
[ INFO ] Level energy = 10619 (9 ) keV ; Jpi: 0+ ; lifetime < 60 keV [limit value]

As for the levels, The decay list can be retrieved using:

tknucleus nuc("8B");
auto levels = nuc.get_level_scheme()->get_decays();

It is also possible to restrict the decay list to a type of decay:

tknucleus nuc("8B");
auto levels = nuc.get_level_scheme()->get_decays<tkgammadecay>();
Represents a gamma-ray decay transition between two nuclear levels.
Definition tkdecay.h:151

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):

tknucleus nuc("8B");
auto decays = nuc.get_level_scheme()->get_decays<tkgammadecay>( [](auto dec) {
return dec->get_level_from()->get_energy_measure()->get_value(tkunit_manager::MeV) < 1.;
});
for(auto &dec: decays) dec->print()
void print(const tkstring &_option="") const
print the decay properties
Definition tkdecay.cpp:181
[ INFO ] gamma decay energy = 769.5 (2.4 ) keV, mult M1

A decay can also been accessed directly by its name (e.g. the decay from the first 3⁺ to the first 2⁺ state):

tknucleus nuc("8B");
nuc.get_level_scheme()->get_decay<tkgammadecay>("3+1->2+1")->print();
[ INFO ] gamma decay energy = 2320 (30 ) keV, mult M1

, or using its energy (the closest level in energy will be returned):

tknucleus nuc("8B");
nuc.get_level_scheme()->get_decay<tkgammadecay>(700.)->print();
[ INFO ] gamma decay energy = 769.5 (2.4 ) keV, mult M1

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.

Definition at line 48 of file tkdecay.h.

Inheritance diagram for tkdecay:
tkproperty_list tkgammadecay

#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 tkstringget_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< tkmeasureget_energy_meas () const
 returns the energy tkmeasure object
 
shared_ptr< tklevelget_level_from ()
 get the parent level
 
shared_ptr< tklevelget_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< tkmeasureget (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
 

Member Enumeration Documentation

◆ decay_type

enum decay_type
Enumerator
kundef 
kbeta 
kec 
kalpha 
kparticle 
kgamma 

Definition at line 53 of file tkdecay.h.

Constructor & Destructor Documentation

◆ tkdecay()

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.

◆ ~tkdecay()

virtual ~tkdecay ( )
overridevirtualdefault

Member Function Documentation

◆ get_comment()

const tkstring & get_comment ( ) const
inline

get the level comment string

Definition at line 93 of file tkdecay.h.

◆ get_decay_type()

decay_type get_decay_type ( )
inline

get the decay type

Definition at line 88 of file tkdecay.h.

◆ get_energy()

double get_energy ( const tkunit_manager::units_keys _unit = tkunit_manager::units_keys::keV)

returns the energy in keV by default

Parameters
_unitunit 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.

◆ get_energy_meas()

shared_ptr< tkmeasure > get_energy_meas ( ) const
inline

returns the energy tkmeasure object

Definition at line 83 of file tkdecay.h.

◆ get_level_from()

shared_ptr< tklevel > get_level_from ( )
inline

get the parent level

Definition at line 98 of file tkdecay.h.

◆ get_level_to()

shared_ptr< tklevel > get_level_to ( )
inline

get the daughter level

Definition at line 100 of file tkdecay.h.

◆ has_comment()

bool has_comment ( ) const
inline

check if a comment exists

Definition at line 91 of file tkdecay.h.

◆ is_uncertain()

bool is_uncertain ( ) const
inline

check if the decay is uncertain

Definition at line 95 of file tkdecay.h.

◆ print()

void print ( const tkstring & _option = "") const

print the decay properties

Parameters
_optionoption 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.

Friends And Related Symbol Documentation

◆ tkdataset

friend class tkdataset
friend

Definition at line 49 of file tkdecay.h.

◆ tklevel_scheme

friend class tklevel_scheme
friend

Definition at line 50 of file tkdecay.h.

Member Data Documentation

◆ decay_type_str

array< tkstring, 6 > decay_type_str = {"undefined", "beta", "ec", "alpha", "particle", "gamma"}
static

Definition at line 61 of file tkdecay.h.


The documentation for this class was generated from the following files: