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

Represents a nuclear excited level (or ground state). More...

#include <physics/tklevel.h>

Inheritance diagram for tklevel:
tkproperty_list

Public Member Functions

 tklevel (int _id, const tkdb_table::measure_data_struct &_struc)
 
virtual ~tklevel () override=default
 
void add_decay_down (shared_ptr< tkdecay > _dec)
 add a down decay to the level
 
void add_decay_up (shared_ptr< tkdecay > _dec)
 add a up decay to the level
 
const tkstringget_comment ()
 get the level comment string
 
vector< shared_ptr< tkdecay > > get_decays_down ()
 return a vector of tkdecay containing of the downward decays
 
vector< shared_ptr< tkdecay > > get_decays_up ()
 return a vector of tkdecay containing the upward decays
 
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
 
shared_ptr< tkmeasureget_energy_measure ()
 returns the energy tkmeasure object
 
int get_id ()
 get the level id
 
int get_isomer_level ()
 get the isomer level (1 for the 1rst (lowest energy) isomer, 2 for the second, etc..)
 
double get_lifetime (const tkunit_manager::units_keys _unit=tkunit_manager::units_keys::s)
 returns the lifetime (in second by default)
 
shared_ptr< tkmeasureget_lifetime_measure ()
 returns the lifetime tkmeasure object
 
tkstring get_lifetime_str ()
 returns the lifetime in string (using the best adapted unit)
 
tkstring get_offset_bandhead ()
 returns the bandhead string offset value (ex: X)
 
shared_ptr< tkspin_parityget_spin_parity ()
 returns the spin parity shared pointer object
 
const tkstringget_spin_parity_str ()
 returns the spin parity as a string
 
bool has_comment ()
 check if a comment exists
 
bool is_energy_offset ()
 to know if the energy is known with an energy offset
 
bool is_isomer ()
 returns true is the level an isomer
 
bool is_stable ()
 returns true if the level stable
 
bool is_uncertain ()
 check if the level is uncertain
 
bool is_yrast (bool _with_tentative=false)
 returns true if the level is yrast
 
void print (const tkstring &_option="")
 print the level properties
 
void set_comment (const tkstring &_comment)
 set the level comment string
 
void set_energy_offset (const tkstring &_offset)
 define the energy offset
 
void set_jpi (double _spin, int _parity, const tkstring &_jpi_str)
 define the spin parity
 
void set_lifetime (tkdb_table::measure_data_struct &_struc)
 define the level lifetime
 
void set_uncertain_level (const tkstring &_uncertain)
 set the level as uncertain
 
- 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
 

Friends

class tkdataset
 
class tklevel_scheme
 

Detailed Description

Represents a nuclear excited level (or ground state).

Stores information on a nuclear level.

A tklevel stores the energy, spin-parity, lifetime and comments of a single nuclear level. It also holds the lists of decays that depopulate (get_decays_down()) or populate (get_decays_up()) this level.

Levels are accessed via tklevel_scheme::get_levels() or tklevel_scheme::get_level().

See also
tklevel_scheme, tkdataset, tkdecay, tkmeasure

See the nuclear levels user guide.

Definition at line 43 of file tklevel.h.

Constructor & Destructor Documentation

◆ tklevel()

tklevel ( int _id,
const tkdb_table::measure_data_struct & _struc )

Definition at line 36 of file tklevel.cpp.

◆ ~tklevel()

virtual ~tklevel ( )
overridevirtualdefault

Member Function Documentation

◆ add_decay_down()

void add_decay_down ( shared_ptr< tkdecay > _dec)
inline

add a down decay to the level

Definition at line 133 of file tklevel.h.

◆ add_decay_up()

void add_decay_up ( shared_ptr< tkdecay > _dec)
inline

add a up decay to the level

Definition at line 135 of file tklevel.h.

◆ get_comment()

const tkstring & get_comment ( )
inline

get the level comment string

Definition at line 114 of file tklevel.h.

◆ get_decays_down()

vector< shared_ptr< tkdecay > > get_decays_down ( )
inline

return a vector of tkdecay containing of the downward decays

Definition at line 97 of file tklevel.h.

◆ get_decays_up()

vector< shared_ptr< tkdecay > > get_decays_up ( )
inline

return a vector of tkdecay containing the upward decays

Definition at line 99 of file tklevel.h.

◆ get_energy()

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

Parameters
_unitunit of the returned result. keV is used by default
_with_offsetif 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 95 of file tklevel.cpp.

◆ get_energy_measure()

shared_ptr< tkmeasure > get_energy_measure ( )
inline

returns the energy tkmeasure object

Definition at line 75 of file tklevel.h.

◆ get_id()

int get_id ( )
inline

get the level id

Definition at line 122 of file tklevel.h.

◆ get_isomer_level()

int get_isomer_level ( )
inline

get the isomer level (1 for the 1rst (lowest energy) isomer, 2 for the second, etc..)

Definition at line 106 of file tklevel.h.

◆ get_lifetime()

double get_lifetime ( const tkunit_manager::units_keys _unit = tkunit_manager::units_keys::s)

returns the lifetime (in second by default)

Parameters
_unitunit 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 120 of file tklevel.cpp.

◆ get_lifetime_measure()

shared_ptr< tkmeasure > get_lifetime_measure ( )
inline

returns the lifetime tkmeasure object

Definition at line 85 of file tklevel.h.

◆ get_lifetime_str()

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 134 of file tklevel.cpp.

◆ get_offset_bandhead()

tkstring get_offset_bandhead ( )
inline

returns the bandhead string offset value (ex: X)

Definition at line 82 of file tklevel.h.

◆ get_spin_parity()

shared_ptr< tkspin_parity > get_spin_parity ( )
inline

returns the spin parity shared pointer object

Definition at line 92 of file tklevel.h.

◆ get_spin_parity_str()

const tkstring & get_spin_parity_str ( )
inline

returns the spin parity as a string

Definition at line 94 of file tklevel.h.

◆ has_comment()

bool has_comment ( )
inline

check if a comment exists

Definition at line 112 of file tklevel.h.

◆ is_energy_offset()

bool is_energy_offset ( )
inline

to know if the energy is known with an energy offset

Definition at line 80 of file tklevel.h.

◆ is_isomer()

bool is_isomer ( )
inline

returns true is the level an isomer

Definition at line 104 of file tklevel.h.

◆ is_stable()

bool is_stable ( )
inline

returns true if the level stable

Definition at line 102 of file tklevel.h.

◆ is_uncertain()

bool is_uncertain ( )
inline

check if the level is uncertain

Definition at line 116 of file tklevel.h.

◆ is_yrast()

bool is_yrast ( bool _with_tentative = false)

returns true if the level is yrast

returns true is the leve is Yrast

Parameters
_with_tentativeif 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 165 of file tklevel.cpp.

◆ print()

void print ( const tkstring & _option = "")

print the level properties

Parameters
_optionoption 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 179 of file tklevel.cpp.

◆ set_comment()

void set_comment ( const tkstring & _comment)
inline

set the level comment string

Definition at line 138 of file tklevel.h.

◆ set_energy_offset()

void set_energy_offset ( const tkstring & _offset)
inline

define the energy offset

Definition at line 125 of file tklevel.h.

◆ set_jpi()

void set_jpi ( double _spin,
int _parity,
const tkstring & _jpi_str )

define the spin parity

Definition at line 78 of file tklevel.cpp.

◆ set_lifetime()

void set_lifetime ( tkdb_table::measure_data_struct & _struc)

define the level lifetime

Definition at line 57 of file tklevel.cpp.

◆ set_uncertain_level()

void set_uncertain_level ( const tkstring & _uncertain)
inline

set the level as uncertain

Definition at line 144 of file tklevel.h.

Friends And Related Symbol Documentation

◆ tkdataset

friend class tkdataset
friend

Definition at line 44 of file tklevel.h.

◆ tklevel_scheme

friend class tklevel_scheme
friend

Definition at line 45 of file tklevel.h.


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