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 GetMin(const G4ToolsBaseHisto &baseHisto, G4int dimension)
std::ostringstream G4ExceptionDescription
G4double GetMax(const G4ToolsBaseHisto &baseHisto, G4int dimension)
G4String GetAxisTitle(const G4ToolsBaseHisto &baseHisto, G4int dimension, const G4String &hnType)
tools::histo::base_histo< double, unsigned int, unsigned int, double, double > G4ToolsBaseHisto
G4double GetWidth(const G4ToolsBaseHisto &baseHisto, G4int dimension, const G4String &hnType)
G4int GetNbins(const G4ToolsBaseHisto &baseHisto, G4int dimension)
G4bool SetAxisTitle(G4ToolsBaseHisto &baseHisto, G4int dimension, const G4String &title)
G4double G4ParticleHPJENDLHEData::G4double result
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4bool SetTitle(G4ToolsBaseHisto &baseHisto, const G4String &title)
G4String GetTitle(const G4ToolsBaseHisto &baseHisto)