![]() |
TkN 2.5
Toolkit for Nuclei
|
Manages the available datasets for a given nucleus. More...
Manages the available datasets for a given nucleus.
A tklevel_scheme is the entry point to access nuclear level and decay data. It lists all ENSDF and XUNDL datasets available for a nucleus, and allows selecting the active dataset with select_dataset(). Levels and decays are then accessed from the selected dataset.
It is obtained via tknucleus::get_level_scheme().
Example:
Definition at line 132 of file tklevel_scheme.h.
#include <tklevel_scheme.h>
Public Member Functions | |
| tklevel_scheme (const tkstring &_nuc, int _zz, int _aa, bool _load_default_dataset=true) | |
| virtual | ~tklevel_scheme ()=default |
| const shared_ptr< tkdataset > & | get_dataset () |
| returns the current dataset | |
| const std::map< int, shared_ptr< tkdataset > > & | get_datasets () const |
| returns the list of available datasets | |
| template<typename T> | |
| const shared_ptr< T > | get_decay (const tkstring &_name, bool _exact=true) |
| Template method to get the decay of type T (ex: tkgammadecay) corresponding to the given name. | |
| template<typename T> | |
| const shared_ptr< T > | get_decay (double _energy) |
| Template method to get the decay of type T (ex: tkgammadecay) corresponding to the closest energy. | |
| const std::vector< shared_ptr< tkdecay > > & | get_decays () |
| get the vector containing all the decays | |
| template<typename T> | |
| const std::vector< shared_ptr< T > > | get_decays () |
| Template method to get the vector containing all the decays of type T (ex: tkgammadecay) | |
| template<typename T> | |
| const std::vector< shared_ptr< T > > | get_decays (const std::function< bool(shared_ptr< T >)> &_selection) |
| Template method to get the vector containing all the decays of type T (ex: tkgammadecay) filtered by the selection fonction. | |
| std::vector< shared_ptr< tkdecay > > | get_decays (std::function< bool(shared_ptr< tkdecay >)> const &_selection) |
| get the vector containing decays filtered by the selection fonction | |
| shared_ptr< tklevel > | get_level (const tkstring &_name, bool _exact=true) |
| get the level corresponding to the given name | |
| shared_ptr< tklevel > | get_level (double _energy, tkstring _offset="") |
| get the level corresponding to the given energy | |
| const std::vector< shared_ptr< tklevel > > & | get_levels () |
| get the vector containing all the levels | |
| std::vector< shared_ptr< tklevel > > | get_levels (std::function< bool(shared_ptr< tklevel >)> const &_selection) |
| get the vector containing all the levels filtered by the selection fonction | |
| void | print (const tkstring &_data="", const tkstring &_option="") |
| print the level scheme information | |
| bool | select_dataset (const tkstring &_dataset_name) |
| select a dataset using its name | |
| bool | select_dataset (int _dataset_id=0) |
| select a dataset using its id | |
| tklevel_scheme | ( | const tkstring & | _nuc, |
| int | _zz, | ||
| int | _aa, | ||
| bool | _load_default_dataset = true ) |
Definition at line 137 of file tklevel_scheme.cpp.
|
virtualdefault |
|
inline |
returns the current dataset
Definition at line 155 of file tklevel_scheme.h.
|
inline |
returns the list of available datasets
Definition at line 157 of file tklevel_scheme.h.
|
inline |
Template method to get the decay of type T (ex: tkgammadecay) corresponding to the given name.
| _name | string expression of the required level (spin + parity (level from) -> spin + parity (level to)) |
| _exact | if set to true, temptative spin assignments will be ignored |
Example:
Definition at line 229 of file tklevel_scheme.h.
|
inline |
Template method to get the decay of type T (ex: tkgammadecay) corresponding to the closest energy.
| _energy | approximative decay energy |
Example:
Definition at line 265 of file tklevel_scheme.h.
|
inline |
get the vector containing all the decays
Definition at line 165 of file tklevel_scheme.h.
|
inline |
Template method to get the vector containing all the decays of type T (ex: tkgammadecay)
Example:
Definition at line 176 of file tklevel_scheme.h.
|
inline |
Template method to get the vector containing all the decays of type T (ex: tkgammadecay) filtered by the selection fonction.
Example:
Definition at line 202 of file tklevel_scheme.h.
| std::vector< shared_ptr< tkdecay > > get_decays | ( | std::function< bool(shared_ptr< tkdecay >)> const & | _selection | ) |
get the vector containing decays filtered by the selection fonction
| _selection | lambda function to filter the list of decays to be returned |
Example:
Definition at line 183 of file tklevel_scheme.cpp.
get the level corresponding to the given name
| _name | string expression of the required level (spin + parity) |
| _exact | if set to true, temptative spin assignments will be ignored |
Example:
Definition at line 301 of file tklevel_scheme.cpp.
get the level corresponding to the given energy
get the level corresponding to the closest energy
| _energy | energy value of the desired level |
| _offset | if the level is supposed to be part of a band with unknown bandhead energy, offset of the band (ex: X) |
if offset is set to *, all offset values will be considered. if offset contains "dec", only levels that have known decays will be considered
Definition at line 353 of file tklevel_scheme.cpp.
|
inline |
get the vector containing all the levels
Definition at line 160 of file tklevel_scheme.h.
| std::vector< shared_ptr< tklevel > > get_levels | ( | std::function< bool(shared_ptr< tklevel >)> const & | _selection | ) |
get the vector containing all the levels filtered by the selection fonction
| _selection | lambda function to filter the list of levels to be returned |
Example:
Definition at line 160 of file tklevel_scheme.cpp.
print the level scheme information
| _data | data type to be printed (dataset, level, decay, level-decay, *) |
| _option | print option relative to the data type to be printed (see the dedicated print methods in tkn::tklevel::print and tkn::tkdecay::print) |
Details for each _data type:
| dataset | list the available datasets for the current nucleus |
| level | list the levels by increasing energy order |
| decay | list the decays sorted by the emmiting level energy |
| level-decay | list the levels by increasing energy order, and its associated decays |
| * | list the level and decays for all datasets |
Available _option values:
| tab | print data as sorted in a tabular view |
| yrast | only confirmed yrast levels will be printed |
| yrastt | only confirmed and tentative yrast levels will be printed |
| com | print comments |
Definition at line 213 of file tklevel_scheme.cpp.
| bool select_dataset | ( | const tkstring & | _dataset_name | ) |
select a dataset using its name
| _dataset_name | name of the dataset to be selected |
to list the available datasets, use tkn::tklevel_scheme::print("dataset")
Definition at line 261 of file tklevel_scheme.cpp.
| bool select_dataset | ( | int | _dataset_id = 0 | ) |
select a dataset using its id
| _dataset_id | id of the dataset to be selected |
to list the available datasets, use tkn::tklevel_scheme::print("dataset")
Definition at line 276 of file tklevel_scheme.cpp.