TkN 2.1
Toolkit for Nuclei
draw_binding.C
1#include "Rtypes.h"
2#include "Riostream.h"
3#include "tkmanager.h"
4#include "tknuclear_chart.h"
5
6using namespace tkn;
7
8void draw_binding(){
9
11 auto* nn = new tknuclear_chart("Binding energy (in MeV/nuc)",tknuclear_chart::kAll,true);
12 for(const auto &nuc : dtm.get_nuclei()) {
13 nn->set_value(nuc->get_z(), nuc->get_n(), nuc->get_binding_energy_over_a());
14 }
15
16 nn->draw();
17 nn->hide_empty_bins();
18 nn->save_as("draw_binding.png");
19}
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