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

Represents a dataset of nuclear levels and decays for a given nucleus. More...

Detailed Description

Represents a dataset of nuclear levels and decays for a given nucleus.

Stores information on a specific dataset.

A tkdataset corresponds to a single ENSDF or XUNDL dataset entry. It holds the list of levels and gamma decays loaded from the database for that dataset. It is accessed via tklevel_scheme::get_dataset() or by iterating over tklevel_scheme::get_datasets().

See also
tklevel_scheme, tklevel, tkdecay

The database used for the levels and decays is extracted from the ENSDF database.

For a given nucleus, the database is composed of different validated datasets, corresponding to different ways to produce the nucleus. A global dataset named : "ADOPTED LEVELS, GAMMAS" is used to merge all the different datasets in one. This is the default dataset of any nucleus in TkN.

TkN allows to load the different datasets. For a given nucleus, the datasets and their associated ID can be listed using:

tknucleus nuc("132Sn");
nuc.get_level_scheme()->print("dataset")
Represents a nucleus and provides access to its properties.
Definition tknucleus.h:50
[ INFO ] --- ENSDF ---
[ INFO ] 132Sn : ADOPTED LEVELS, GAMMAS (14197) [2018-03]
[ INFO ] 133IN B-N DECAY (165 MS) (14198) [2018-03]
[ INFO ] 248CM SF DECAY (14199) [2018-03]
[ INFO ] COULOMB EXCITATION (14200) [2018-03]
[ INFO ] 132IN B- DECAY (0.200 S) (14201) [2018-03]
[ INFO ] 132SN IT DECAY (2.080 US) (14202) [2018-03]
[ INFO ] --- XUNDL ---
[ INFO ] U(N,F):IS,RADIUS:XUNDL-3 (14203) [2020-03]
[ INFO ] COULOMB EXCITATION:XUNDL-4 (14204) [2020-04]
[ INFO ] 133IN B-N DECAY:162 MS:XUNDL-5 (14205) [2020-10]
[ INFO ] 133IN B-N DECAY:167 MS:XUNDL-6 (14206) [2020-10]
[ INFO ] 132IN B- DECAY:XUNDL-7 (14207) [2022-05]
[ INFO ] 134IN B-2N DECAY:XUNDL-8 (14208) [2024-01]
[ INFO ] 133IN B-N DECAY:XUNDL-10 (14209) [2025-11]
[ INFO ] 133IN B-N DECAY:XUNDL-11 (14210) [2025-11]
[ INFO ] 132IN B- DECAY:XUNDL-9 (14211) [2025-11]
[ INFO ] U(N,F):IS,RADIUS:XUNDL-12 (14212) [2026-02]
[ COMMENT ] Current dataset is '132Sn : ADOPTED LEVELS, GAMMAS' (14197)

The datasets are displayed in two sections: evaluated ENSDF datasets and non-evaluated XUNDL datasets. The publication date of each dataset (in YYYY-MM format) is shown in brackets when available, e.g. [2024-01].

To display dataset comments alongside the list, pass the "com" option:

nuc.get_level_scheme()->print("dataset", "com")

The dataset can be selected as follows (using the Coulomb Excitation dataset ids):

tknucleus nuc("132Sn");
nuc.get_level_scheme()->select_dataset(12584);
nuc.get_level_scheme()->print("level");
nuc.get_level_scheme()->select_dataset(12588);
nuc.get_level_scheme()->print("level");
[ INFO ] dataset 'COULOMB EXCITATION' contains 2 levels:
[ INFO ] Level energy = 0 keV [no uncertainty] ; Jpi: 0+
[ INFO ] Level energy = 4040 keV [no uncertainty] ; Jpi: 2+
[ INFO ] dataset 'COULOMB EXCITATION:XUNDL-4' contains 4 levels:
[ INFO ] Level energy = 0 keV [no uncertainty] ; Jpi: 0+
[ INFO ] Level energy = 4041.2 keV [no uncertainty] ; Jpi: 2+ ; lifetime = 2.95 (-0.47 ; +0.70 ) fs
[ INFO ] Level energy = 4351.9 keV [no uncertainty] ; Jpi: 3- ; lifetime = 2.4 (-0.6 ; +1.3 ) ps
[ INFO ] Level energy = 4416 keV [no uncertainty] ; Jpi: 4+ ; lifetime = 3.95 (0.13 ) ns uncertain level tag: S

The current dataset object can be retrieved and inspected programmatically:

tknucleus nuc("132Sn");
auto ds = nuc.get_level_scheme()->get_dataset();

To iterate over all available datasets:

for (auto &[id, ds] : nuc.get_level_scheme()->get_datasets()) {
glog << info << ds->get_name() << " (" << id << ")" << do_endl;
}
tklog & info(tklog &log)
Definition tklog.h:313
tklog & do_endl(tklog &log)
Definition tklog.h:212

Here are the main methods available on a tkdataset:

method name description
get_id() returns the dataset integer ID
get_name() returns the dataset name as a string
get_comment() returns the dataset comment string (can be empty)
has_comment() returns true if a comment is available
get_date() returns the publication date in YYYY-MM format (can be empty)
has_date() returns true if a publication date is available
get_source() returns the source string: "ENSDF" or "XUNDL"
is_xundl() returns true if the dataset comes from XUNDL
\class tklevel_scheme
\brief Collection of levels and decay
\details

For all the nuclei with known data on the ENSDF or XUNDL databases, it is possible to access to a tkn::tklevel_scheme object.

The level scheme is determined for a given dataset see tkn::tkdataset documentation.

For one dataset, the level scheme gives access to the nuclear levels and decay information. Refer to the tkn::tklevel or tkn::tkdecay documentation.

Definition at line 43 of file tklevel_scheme.h.

#include <tklevel_scheme.h>

Public Member Functions

 tkdataset ()=default
 
 tkdataset (const tkstring &_nuc, int _zz, int _aa, const tkstring &_name, int _id)
 
virtual ~tkdataset ()=default
 
shared_ptr< tkgammadecayadd_gamma_decay (shared_ptr< tklevel > _lvlfrom, shared_ptr< tklevel > _lvlto, double _ener=0., double _unc=0.)
 add a new decay between two levels to the dataset
 
shared_ptr< tkleveladd_level (double _ener, double _unc, tkstring _unit, tkstring _jpistr)
 manually add a new level to the dataset
 
const tkstringget_comment () const
 returns the dataset comment
 
const tkstringget_date () const
 returns the dataset date (YYYY-MM format)
 
int get_id () const
 returns the dataset ID
 
const tkstringget_name () const
 returns the dataset name
 
const tkstringget_nucleus_name () const
 returns the nucleus name associated to this dataset
 
const tkstringget_source () const
 returns the dataset source ("ENSDF" or "XUNDL")
 
bool has_comment () const
 returns true if the dataset has a comment
 
bool has_date () const
 returns true if the dataset has a date
 
bool is_xundl () const
 returns true if the dataset comes from XUNDL
 

Friends

class tklevel
 
class tklevel_scheme
 

Constructor & Destructor Documentation

◆ tkdataset() [1/2]

tkdataset ( const tkstring & _nuc,
int _zz,
int _aa,
const tkstring & _name,
int _id )
inline

Definition at line 68 of file tklevel_scheme.h.

◆ tkdataset() [2/2]

tkdataset ( )
default

◆ ~tkdataset()

virtual ~tkdataset ( )
virtualdefault

Member Function Documentation

◆ add_gamma_decay()

shared_ptr< tkgammadecay > add_gamma_decay ( shared_ptr< tklevel > _lvlfrom,
shared_ptr< tklevel > _lvlto,
double _ener = 0.,
double _unc = 0. )

add a new decay between two levels to the dataset

Manually adds a gamma decay between two levels.

Parameters
_lvlfromparent level (decaying level)
_lvltodaughter level (populated level)
_energamma energy in keV (default 0: computed as the energy difference between the two levels)
_uncuncertainty on the gamma energy in keV
Returns
shared pointer to the newly created tkgammadecay.

Example:

tknucleus nuc("132Sn");
auto ds = nuc.get_level_scheme()->get_dataset();
auto lvl0 = ds->add_level(0., 0., "keV", "0+");
auto lvl1 = ds->add_level(4041., 0., "keV", "2+");
auto dec = ds->add_gamma_decay(lvl1, lvl0);
See also
add_level()

Definition at line 711 of file tklevel_scheme.cpp.

◆ add_level()

shared_ptr< tklevel > add_level ( double _ener,
double _unc,
tkstring _unit,
tkstring _jpistr )

manually add a new level to the dataset

Manually adds a new level to the dataset.

Parameters
_enerenergy of the level
_uncuncertainty on the energy
_unitunit of the energy (e.g. "keV")
_jpistrspin-parity string (e.g. "2+")
Returns
shared pointer to the newly created tklevel, inserted at the correct position by energy.

This method allows building a custom dataset programmatically, for example to compute transition probabilities for artificially constructed level schemes. The new level is inserted in the level list sorted by increasing energy and yrast status is updated accordingly.

See also
add_gamma_decay()

Definition at line 661 of file tklevel_scheme.cpp.

◆ get_comment()

const tkstring & get_comment ( ) const
inline

returns the dataset comment

Definition at line 79 of file tklevel_scheme.h.

◆ get_date()

const tkstring & get_date ( ) const
inline

returns the dataset date (YYYY-MM format)

Definition at line 83 of file tklevel_scheme.h.

◆ get_id()

int get_id ( ) const
inline

returns the dataset ID

Definition at line 73 of file tklevel_scheme.h.

◆ get_name()

const tkstring & get_name ( ) const
inline

returns the dataset name

Definition at line 75 of file tklevel_scheme.h.

◆ get_nucleus_name()

const tkstring & get_nucleus_name ( ) const
inline

returns the nucleus name associated to this dataset

Definition at line 77 of file tklevel_scheme.h.

◆ get_source()

const tkstring & get_source ( ) const
inline

returns the dataset source ("ENSDF" or "XUNDL")

Definition at line 87 of file tklevel_scheme.h.

◆ has_comment()

bool has_comment ( ) const
inline

returns true if the dataset has a comment

Definition at line 81 of file tklevel_scheme.h.

◆ has_date()

bool has_date ( ) const
inline

returns true if the dataset has a date

Definition at line 85 of file tklevel_scheme.h.

◆ is_xundl()

bool is_xundl ( ) const
inline

returns true if the dataset comes from XUNDL

Definition at line 89 of file tklevel_scheme.h.

Friends And Related Symbol Documentation

◆ tklevel

friend class tklevel
friend

Definition at line 45 of file tklevel_scheme.h.

◆ tklevel_scheme

friend class tklevel_scheme
friend

Definition at line 46 of file tklevel_scheme.h.


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