![]() |
TkN 2.1
Toolkit for Nuclei
|
nuclear chart plot with ROOT More...
nuclear chart plot with ROOT
Use this class (if TkN compiled with ROOT) to represent values on the neutron-proton plane. It also shown the projection on both axis. They are few example of use in the Examples example section
Definition at line 25 of file tknuclear_chart.h.
#include <tknuclear_chart.h>
Public Types | |
enum | chart_types { kAll , kEven , kOdd } |
Public Member Functions | |
tknuclear_chart (const char *title, int type=kAll, bool autofit=false) | |
default constructor More... | |
tknuclear_chart (const char *title, int type=kAll, double _min_val_histo=0, bool autofit=false) | |
constructor giving the possibility to give a min limit on the TH2 z axis More... | |
virtual | ~tknuclear_chart () |
void | draw (bool _update_only=false) |
draw the tknucleus chart More... | |
void | fill (int _zz, int _nn) |
fill the bin for a given nucleus (increment by 1) More... | |
void | fill (int _zz, int _nn, double _val) |
fill the bin for a given nucleus (increment by _val) More... | |
TH2 * | get_histo () |
get the underlying histogram More... | |
double | get_value (int _zz, int _nn) |
get the bin content for a given nucleus More... | |
void | hide_empty_bins () |
remove color on empty bins (usefull for plot with negative and positive values) More... | |
void | reset () |
reset the tknuclear chart More... | |
void | save_as (const char *file_name) |
save the nuclear chart in the file file_name More... | |
void | set_editables (bool _ed=true) |
allow to edit the canvases More... | |
void | set_even_color (int _col) |
define the color of the projections for even nuclei More... | |
void | set_line_width (int _width) |
set magic numbers lines width More... | |
void | set_log_scale (bool _log=true) |
print the tknuclear chart in log scale More... | |
void | set_ndivisions_x (int _ndiv) |
define the number of tics on the x axis More... | |
void | set_ndivisions_y (int _ndiv) |
define the number of tics on the y axis More... | |
void | set_ndivisions_z (int _ndiv) |
define the number of tics on the z axis More... | |
void | set_odd_color (int _col) |
define the color of the projections for odd nuclei More... | |
void | set_size (int _width, int _height) |
set the canvas size in pixels (default 900x900) More... | |
void | set_title (TString _title) |
define the nuclear chart title More... | |
void | set_value (int _zz, int _nn, double _val) |
set the bin value for a given nucleus More... | |
void | show_empty_bins () |
show color on empty bins More... | |
void | update () |
update the tknucleus chart More... | |
enum chart_types |
Enumerator | |
---|---|
kAll | |
kEven | |
kOdd |
Definition at line 65 of file tknuclear_chart.h.
tknuclear_chart | ( | const char * | title, |
int | type = kAll , |
||
bool | autofit = false |
||
) |
default constructor
Definition at line 21 of file tknuclear_chart.cpp.
tknuclear_chart | ( | const char * | title, |
int | type = kAll , |
||
double | _min_val_histo = 0 , |
||
bool | autofit = false |
||
) |
constructor giving the possibility to give a min limit on the TH2 z axis
Definition at line 54 of file tknuclear_chart.cpp.
|
inlinevirtual |
Definition at line 75 of file tknuclear_chart.h.
void draw | ( | bool | _update_only = false | ) |
draw the tknucleus chart
Definition at line 142 of file tknuclear_chart.cpp.
|
inline |
fill the bin for a given nucleus (increment by 1)
Definition at line 88 of file tknuclear_chart.h.
void fill | ( | int | _zz, |
int | _nn, | ||
double | _val | ||
) |
fill the bin for a given nucleus (increment by _val)
Definition at line 61 of file tknuclear_chart.cpp.
|
inline |
get the underlying histogram
Definition at line 131 of file tknuclear_chart.h.
double get_value | ( | int | _zz, |
int | _nn | ||
) |
get the bin content for a given nucleus
Definition at line 67 of file tknuclear_chart.cpp.
void hide_empty_bins | ( | ) |
remove color on empty bins (usefull for plot with negative and positive values)
Definition at line 482 of file tknuclear_chart.cpp.
void reset | ( | ) |
reset the tknuclear chart
Definition at line 137 of file tknuclear_chart.cpp.
void save_as | ( | const char * | file_name | ) |
save the nuclear chart in the file file_name
Definition at line 476 of file tknuclear_chart.cpp.
void set_editables | ( | bool | _ed = true | ) |
allow to edit the canvases
Definition at line 437 of file tknuclear_chart.cpp.
|
inline |
define the color of the projections for even nuclei
Definition at line 98 of file tknuclear_chart.h.
|
inline |
set magic numbers lines width
Definition at line 128 of file tknuclear_chart.h.
void set_log_scale | ( | bool | _log = true | ) |
print the tknuclear chart in log scale
Definition at line 253 of file tknuclear_chart.cpp.
void set_ndivisions_x | ( | int | _ndiv | ) |
define the number of tics on the x axis
Definition at line 446 of file tknuclear_chart.cpp.
void set_ndivisions_y | ( | int | _ndiv | ) |
define the number of tics on the y axis
Definition at line 455 of file tknuclear_chart.cpp.
void set_ndivisions_z | ( | int | _ndiv | ) |
define the number of tics on the z axis
Definition at line 465 of file tknuclear_chart.cpp.
|
inline |
define the color of the projections for odd nuclei
Definition at line 96 of file tknuclear_chart.h.
void set_size | ( | int | _width, |
int | _height | ||
) |
set the canvas size in pixels (default 900x900)
Definition at line 314 of file tknuclear_chart.cpp.
|
inline |
define the nuclear chart title
Definition at line 116 of file tknuclear_chart.h.
void set_value | ( | int | _zz, |
int | _nn, | ||
double | _val | ||
) |
set the bin value for a given nucleus
Definition at line 72 of file tknuclear_chart.cpp.
void show_empty_bins | ( | ) |
show color on empty bins
|
inline |
update the tknucleus chart
Definition at line 91 of file tknuclear_chart.h.