33 #include "tools/histo/axis"
41 return baseHisto.get_axis(dimension).bins();
49 return baseHisto.get_axis(dimension).lower_edge();
57 return baseHisto.get_axis(dimension).upper_edge();
64 auto nbins = baseHisto.get_axis(dimension).bins();
67 functionName += hnType;
68 functionName +=
"Width";
70 description <<
" nbins = 0 (for " << hnType <<
").";
75 return ( baseHisto.get_axis(dimension).upper_edge()
76 - baseHisto.get_axis(dimension).lower_edge() )/nbins;
82 return baseHisto.set_title(title);
89 if ( dimension ==
kX ) {
90 baseHisto.add_annotation(tools::histo::key_axis_x_title(), title);
92 else if ( dimension ==
kY ) {
93 baseHisto.add_annotation(tools::histo::key_axis_y_title(), title);
95 else if ( dimension ==
kZ ) {
96 baseHisto.add_annotation(tools::histo::key_axis_z_title(), title);
105 return baseHisto.title();
115 if ( dimension ==
kX ) {
116 result = baseHisto.annotation(tools::histo::key_axis_x_title(), title);
118 else if ( dimension ==
kY ) {
119 result = baseHisto.annotation(tools::histo::key_axis_y_title(), title);
121 else if ( dimension ==
kZ ) {
122 result = baseHisto.annotation(tools::histo::key_axis_z_title(), title);
129 functionName += hnType;
130 functionName += axis;
131 functionName +=
"Title";
133 description <<
" Failed to get " << axis <<
" axis " << hnType <<
" title.";
G4double GetWidth(const G4ToolsBaseHisto &baseHisto, G4int dimension, const G4String &hnType)
G4String GetTitle(const G4ToolsBaseHisto &baseHisto)
G4String GetAxisTitle(const G4ToolsBaseHisto &baseHisto, G4int dimension, const G4String &hnType)
G4double GetMin(const G4ToolsBaseHisto &baseHisto, G4int dimension)
std::ostringstream G4ExceptionDescription
G4bool SetAxisTitle(G4ToolsBaseHisto &baseHisto, G4int dimension, const G4String &title)
tools::histo::base_histo< double, unsigned int, unsigned int, double, double > G4ToolsBaseHisto
G4bool SetTitle(G4ToolsBaseHisto &baseHisto, const G4String &title)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4double GetMax(const G4ToolsBaseHisto &baseHisto, G4int dimension)
G4int GetNbins(const G4ToolsBaseHisto &baseHisto, G4int dimension)