Loading [MathJax]/extensions/tex2jax.js
TkN 2.1
Toolkit for Nuclei
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages

Explore binding energies

This example macro fills the nuclear chart with binding energy per nucleon.

Start tkn-root, compile and execute this macro :

tkn-root
_____ _ _ | Documentation: https://tkn.in2p3.fr/
(_ _) | \ | | | Source: https://gitlab.in2p3.fr/tkn/tkn-lib
| |_ _| \| | |
| | |/ / | | Version 1.0
| | <| |\ | |
|_|_|\_\_| \_| | Database: TkN_ensdf_221101_xundl_210701_v1.0.db
tkn [0] .L draw_binding.C+
tkn [1] draw_binding()

It produces the following plot:

Source code :

#include "Rtypes.h"
#include "Riostream.h"
#include "tkmanager.h"
#include "tknuclear_chart.h"
using namespace tkn;
void draw_binding(){
auto* nn = new tknuclear_chart("Binding energy (in MeV/nuc)",tknuclear_chart::kAll,true);
for(const auto &nuc : dtm.get_nuclei()) {
nn->set_value(nuc->get_z(), nuc->get_n(), nuc->get_binding_energy_over_a());
}
nn->draw();
nn->hide_empty_bins();
nn->save_as("draw_binding.png");
}
Manages the database loading and provides access to the physics properties.
Definition: tkmanager.h:55
vector< shared_ptr< tknucleus > > get_nuclei(std::function< bool(shared_ptr< tknucleus >)>const &_selection)
return a vector containing all the known nuclei filtered by the lambda function
Definition: tkmanager.cpp:367
nuclear chart plot with ROOT
Definition: tklog.cpp:39