39 for (
auto value :
fEdges ) {
62 auto unit = hnInfo.
fUnit;
63 auto fcn = hnInfo.
fFcn;
67 Warn(
"Illegal unit value (0), 1. will be used instead",
71 value = fcn(value/unit);
80 auto unit = hnInfo.
fUnit;
81 auto fcn = hnInfo.
fFcn;
85 Warn(
"Illegal unit value (0), 1. will be used instead",
100 auto unit = hnInfo.
fUnit;
101 auto fcn = hnInfo.
fFcn;
104 if (binScheme == G4BinScheme::kLinear) {
116 if (binScheme == G4BinScheme::kLog) {
123 if (binScheme == G4BinScheme::kUser) {
131 if ( hnInfo.
fFcnName !=
"none" ) { title +=
" "; title += hnInfo.
fFcnName; title +=
"("; }
132 if ( hnInfo.
fUnitName !=
"none" ) { title +=
" ["; title += hnInfo.
fUnitName; title +=
"]";}
133 if ( hnInfo.
fFcnName !=
"none" ) { title +=
")"; }
142 if ( minValue == 0. && maxValue == 0. )
return result;
144 if ( maxValue <= minValue ) {
161 Warn(
"Illegal value of number of " + xyz.substr(idim,1) +
" bins: nbins <= 0.",
167 if ( dimension.
fEdges.empty() && (info.
fBinScheme == G4BinScheme::kUser) ) {
168 Warn(
"Illegal value of number of " + xyz.substr(idim,1) +
" edges vector size",
175 Warn(
"Illegal value of " + xyz.substr(idim,1) +
" (min >= max)",
182 Warn(
"Combining " + xyz.substr(idim,1) +
" Function and Binning scheme is not supported.",
188 if ( ( info.
fBinScheme == G4BinScheme::kLog ||
190 Warn(
"Illegal value of " + xyz.substr(idim,1) +
" (min = 0) with logarithmic function or binning",
G4GLOB_DLL std::ostream G4cout
G4bool CheckDimension(unsigned int idim, const G4HnDimension &dimension, const G4HnDimensionInformation &info)
void UpdateTitle(G4String &title, const G4HnDimensionInformation &hnInfo)
void Update(G4double &value, const G4HnDimensionInformation &hnInfo)
constexpr std::string_view kNamespaceName
void UpdateValues(G4HnDimension &bins, const G4HnDimensionInformation &hnInfo)
void ComputeEdges(G4int nbins, G4double xmin, G4double xmax, G4double unit, G4Fcn fcn, G4BinScheme, std::vector< G4double > &edges)
void Warn(const G4String &message, const std::string_view inClass, const std::string_view inFunction)
G4bool CheckMinMax(G4double min, G4double max)
std::vector< G4double > fEdges