TkN 2.1
Toolkit for Nuclei

Explore mas excess

This example macro fills the nuclear chart with mass excess.

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_mass_excess.C+
tkn [1] draw_mass_excess()

It produces the following plot:

TkN also allows to know if a value has been really measured or is derived from systematics. One can produce the same picture, only for really measured mass excess:

tkn [1] draw_mass_excess_no_systematic()

Or only for the mass excess derived from systematics:

tkn [1] draw_mass_excess_from_systematic()

Source code :

#include "TStyle.h"
#include "TROOT.h"
#include "tkmanager.h"
#include "tknuclear_chart.h"
using namespace tkn;
void draw_mass_excess(){
auto* nn = new tknuclear_chart("Mass Excess in MeV",tknuclear_chart::kAll,false);
for(const auto &nuc : dtm.get_nuclei()) {
auto mass_excess = nuc->get_mass_excess_measure();
if(!mass_excess) continue;
double yy = mass_excess->get_value(tkn::tkunit_manager::units_keys::MeV);
nn->set_value(nuc->get_z(), nuc->get_n(), yy);
}
nn->draw();
nn->hide_empty_bins();
gROOT->SetBatch(true);
gROOT->ForceStyle(true);
gStyle->SetImageScaling(2.);
nn->save_as("draw_mass_excess.png");
gROOT->SetBatch(false);
}
void draw_mass_excess_no_systematic(){
auto* nn = new tknuclear_chart("Measured Mass Excess in MeV",tknuclear_chart::kAll,false);
for(const auto &nuc : dtm.get_nuclei()) {
auto mass_excess = nuc->get_mass_excess_measure();
if(!mass_excess) continue;
double yy = mass_excess->get_value(tkn::tkunit_manager::units_keys::MeV);
if(!(mass_excess->get_info()==tkproperty::kSystematic)) nn->set_value(nuc->get_z(), nuc->get_n(), yy);
}
nn->draw();
nn->hide_empty_bins();
gROOT->SetBatch(true);
gROOT->ForceStyle(true);
gStyle->SetImageScaling(2.);
nn->save_as("draw_mass_excess_no_systematic.png");
gROOT->SetBatch(false);
}
void draw_mass_excess_from_systematic(){
auto* nn = new tknuclear_chart("Mass Excess in MeV from systematics",tknuclear_chart::kAll,false);
for(const auto &nuc : dtm.get_nuclei()) {
auto mass_excess = nuc->get_mass_excess_measure();
if(!mass_excess) continue;
double yy = mass_excess->get_value(tkn::tkunit_manager::units_keys::MeV);
if((mass_excess->get_info()==tkproperty::kSystematic)) nn->set_value(nuc->get_z(), nuc->get_n(), yy);
}
nn->draw();
nn->hide_empty_bins();
gROOT->SetBatch(true);
gROOT->ForceStyle(true);
gStyle->SetImageScaling(2.);
nn->save_as("draw_mass_excess_from_systematic.png");
gROOT->SetBatch(false);
}
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