TkN 2.1
Toolkit for Nuclei
tkdecay Class Reference

Stores information on a nuclear decay. More...

Detailed Description

Stores information on a nuclear decay.

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. Particle decays are planned to be added in next TkN version.Print the known decays as follows:

tknucleus nuc("8B");
nuc.get_level_scheme()->print("decay")
A nucleus made of Z protons and N neutrons.
Definition: tknucleus.h:54
[ 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();

Is 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>();
Stores information on a gamma-ray decay.
Definition: tkdecay.h:131

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:92
[ 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_levels(...) 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_levels<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 [kbeta, kec, kalpha, kparticle, kgamma], but only kgamma for the moment
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 a the level is uncertain
print() prints the main level informations (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% correspond the the more intence gamma-ray) as a tkn::tkmeasure
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 exemple, for the lifetime, the method get_conv_coeff_measure() returns the tkmeasure object.

Definition at line 56 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 ()=default
 
const tkstringget_comment () const
 get the level comment string More...
 
decay_type get_decay_type ()
 get the decay type More...
 
double get_energy (const tkunit_manager::units_keys _unit=tkunit_manager::units_keys::keV)
 returns the energy in keV by default More...
 
shared_ptr< tkmeasureget_energy_meas () const
 returns the energy tkmeasure object More...
 
shared_ptr< tklevelget_level_from ()
 get the parent level More...
 
shared_ptr< tklevelget_level_to ()
 get the daughter level More...
 
bool has_comment () const
 check if a comment exists More...
 
bool is_uncertain () const
 check if the decay is uncertain More...
 
void print (const tkstring &_option="") const
 print the decay properties More...
 
- 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 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...
 

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 62 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 58 of file tkdecay.cpp.

◆ ~tkdecay()

virtual ~tkdecay ( )
virtualdefault

Member Function Documentation

◆ get_comment()

const tkstring & get_comment ( ) const
inline

get the level comment string

Definition at line 96 of file tkdecay.h.

◆ get_decay_type()

decay_type get_decay_type ( )
inline

get the decay type

Definition at line 91 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 79 of file tkdecay.cpp.

◆ get_energy_meas()

shared_ptr< tkmeasure > get_energy_meas ( ) const
inline

returns the energy tkmeasure object

Definition at line 86 of file tkdecay.h.

◆ get_level_from()

shared_ptr< tklevel > get_level_from ( )
inline

get the parent level

Definition at line 101 of file tkdecay.h.

◆ get_level_to()

shared_ptr< tklevel > get_level_to ( )
inline

get the daughter level

Definition at line 103 of file tkdecay.h.

◆ has_comment()

bool has_comment ( ) const
inline

check if a comment exists

Definition at line 94 of file tkdecay.h.

◆ is_uncertain()

bool is_uncertain ( ) const
inline

check if the decay is uncertain

Definition at line 98 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 92 of file tkdecay.cpp.

Friends And Related Function Documentation

◆ tkdataset

friend class tkdataset
friend

Definition at line 57 of file tkdecay.h.

◆ tklevel_scheme

friend class tklevel_scheme
friend

Definition at line 58 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 63 of file tkdecay.h.


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