32#include "tools/histo/axis"
40 return baseHisto.get_axis(dimension).bins();
48 return baseHisto.get_axis(dimension).lower_edge();
56 return baseHisto.get_axis(dimension).upper_edge();
63 auto nbins = baseHisto.get_axis(dimension).bins();
66 functionName += hnType;
67 functionName +=
"Width";
69 description <<
" nbins = 0 (for " << hnType <<
").";
74 return ( baseHisto.get_axis(dimension).upper_edge()
75 - baseHisto.get_axis(dimension).lower_edge() )/nbins;
81 return baseHisto.set_title(title);
88 if ( dimension ==
kX ) {
89 baseHisto.add_annotation(tools::histo::key_axis_x_title(), title);
91 else if ( dimension ==
kY ) {
92 baseHisto.add_annotation(tools::histo::key_axis_y_title(), title);
94 else if ( dimension ==
kZ ) {
95 baseHisto.add_annotation(tools::histo::key_axis_z_title(), title);
104 return baseHisto.title();
114 if ( dimension ==
kX ) {
115 result = baseHisto.annotation(tools::histo::key_axis_x_title(), title);
117 else if ( dimension ==
kY ) {
118 result = baseHisto.annotation(tools::histo::key_axis_y_title(), title);
120 else if ( dimension ==
kZ ) {
121 result = baseHisto.annotation(tools::histo::key_axis_z_title(), title);
128 functionName += hnType;
129 functionName += axis;
130 functionName +=
"Title";
132 description <<
" Failed to get " << axis <<
" axis " << hnType <<
" title.";
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
G4int GetNbins(const G4ToolsBaseHisto &baseHisto, G4int dimension)
G4bool SetTitle(G4ToolsBaseHisto &baseHisto, const G4String &title)
G4double GetMin(const G4ToolsBaseHisto &baseHisto, G4int dimension)
G4double GetMax(const G4ToolsBaseHisto &baseHisto, G4int dimension)
G4bool SetAxisTitle(G4ToolsBaseHisto &baseHisto, G4int dimension, const G4String &title)
G4String GetAxisTitle(const G4ToolsBaseHisto &baseHisto, G4int dimension, const G4String &hnType)
G4double GetWidth(const G4ToolsBaseHisto &baseHisto, G4int dimension, const G4String &hnType)
tools::histo::base_histo< double, unsigned int, unsigned int, double, double > G4ToolsBaseHisto
G4String GetTitle(const G4ToolsBaseHisto &baseHisto)