40#include "tkn_config.h"
46#include "tkdb_table.h"
47#include "tkproperty_list.h"
49#include "tkspin_parity.h"
63 shared_ptr<tkspin_parity> fspin_parity;
65 bool fis_stable =
false;
66 bool fis_isomer =
false;
67 int fisomer_level = 0;
69 bool fisYrast_exact =
false;
70 bool fisYrast_uncertain =
false;
72 vector<shared_ptr<tkdecay>> fdecays_down;
73 vector<shared_ptr<tkdecay>> fdecays_up;
76 bool fhas_comment=
false;
80 tkstring fenergy_offset =
"";
83 tklevel(
int _id,
const tkdb_table::measure_data_struct &_struc);
121 bool is_yrast(
bool _with_tentative=
false);
147 void add_decay_up(shared_ptr<tkdecay> _dec) {fdecays_up.push_back(_dec);}
Stores information on a specific dataset.
Collection of levels and decay.
Stores information on a nuclear level.
bool is_isomer()
returns true is the level an isomer
void add_decay_up(shared_ptr< tkdecay > _dec)
add a up decay to the level
bool is_stable()
returns true if the level stable
double get_lifetime(const tkunit_manager::units_keys _unit=tkunit_manager::units_keys::s)
returns the lifetime (in second by default)
int get_id()
get the level id
shared_ptr< tkmeasure > get_lifetime_measure()
returns the lifetime tkmeasure object
const tkstring & get_comment()
get the level comment string
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
tkstring get_offset_bandhead()
returns the bandhead string offset value (ex: X)
shared_ptr< tkmeasure > get_energy_measure()
returns the energy tkmeasure object
void set_jpi(double _spin, int _parity, const tkstring &_jpi_str)
define the spin parity
void add_decay_down(shared_ptr< tkdecay > _dec)
add a down decay to the level
tklevel(int _id, const tkdb_table::measure_data_struct &_struc)
tkstring get_lifetime_str()
returns the lifetime in string (using the best adapted unit)
bool is_uncertain()
check if the level is uncertain
bool is_energy_offset()
to know if the energy is known with an energy offset
shared_ptr< tkspin_parity > get_spin_parity()
returns the spin parity shared pointer object
vector< shared_ptr< tkdecay > > get_decays_up()
return a vector of tkdecay containing the upward decays
void set_comment(const tkstring &_comment)
set the level comment string
void print(const tkstring &_option="")
print the level properties
int get_isomer_level()
get the isomer level (1 for the 1rst (lowest energy) isomer, 2 for the second, etc....
bool is_yrast(bool _with_tentative=false)
returns true is the leve is Yrast
void set_uncertain_level(const tkstring &_uncertain)
set the level as uncertain
vector< shared_ptr< tkdecay > > get_decays_down()
return a vector of tkdecay containing of the downward decays
const tkstring & get_spin_parity_str()
returns the spin parity as as string
void set_energy_offset(tkstring &_offset)
define the energy offset
void set_lifetime(tkdb_table::measure_data_struct &_struc)
define the level lifetime
bool has_comment()
check if a comment exists
virtual ~tklevel()=default
Contains list of properties.
shared_ptr< tkmeasure > get(const tkstring &_property) const
get the property as tkmeasure
std::string with usefull tricks from TString (ROOT) and KVString (KaliVeda) and more....
units_keys
units identifiers
data structure used to fill a tkmeasure object from the sqlite database