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;
124 std::vector<G4double> edges = bins.
fEdges;
133 if ( hnInfo.
fFcnName !=
"none" ) { title +=
" "; title += hnInfo.
fFcnName; title +=
"("; }
134 if ( hnInfo.
fUnitName !=
"none" ) { title +=
" ["; title += hnInfo.
fUnitName; title +=
"]";}
135 if ( hnInfo.
fFcnName !=
"none" ) { title +=
")"; }
144 if ( minValue == 0. && maxValue == 0. )
return result;
146 if ( maxValue <= minValue ) {
163 Warn(
"Illegal value of number of " + xyz.substr(idim,1) +
" bins: nbins <= 0.",
171 Warn(
"Illegal value of " + xyz.substr(idim,1) +
" (min >= max)",
178 if ( dimension.
fEdges.empty() ) {
179 Warn(xyz.substr(idim,1) +
" edges vector is empty.",
184 for (
size_t i = 1; i < dimension.
fEdges.size(); ++i){
186 Warn(xyz.substr(idim,1) +
187 " edges vector values must be defined in increasing order.",
196 Warn(
"Combining " + xyz.substr(idim,1) +
" Function and Binning scheme is not supported.",
204 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