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

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

#include <physics/tkdecay.h>

Inheritance diagram for tkdecay:
tkproperty_list tkgammadecay

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
 

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

See the nuclear decays user guide.

Definition at line 48 of file tkdecay.h.

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 42 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 64 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 77 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: