39 if ( binSchemeName !=
"linear" ) {
40 if ( binSchemeName ==
"log" )
46 <<
" \"" << binScheme <<
"\" binning scheme is not supported." <<
G4endl
47 <<
" " <<
"Linear binning will be applied.";
58 std::vector<G4double>& edges)
67 G4double dx = (fcn(xumax) - fcn(xumin) ) / nbins;
69 while (
G4int(edges.size()) <= nbins ) {
70 edges.push_back(binValue);
77 = (std::log10(xumax) - std::log10(xumin))/ nbins;
80 while (
G4int(edges.size()) <= nbins ) {
81 edges.push_back(binValue);
90 <<
" User binning scheme setting was ignored." <<
G4endl
91 <<
" Linear binning will be applied with given (nbins, xmin, xmax) values";
100 std::vector<G4double>& newBins)
103 std::vector<G4double>::const_iterator it;
104 for (it = edges.begin(); it != edges.end(); it++ ) {
105 newBins.push_back(fcn((*it)/unit));
std::ostringstream G4ExceptionDescription
void ComputeEdges(G4int nbins, G4double xmin, G4double xmax, G4double unit, G4Fcn fcn, G4BinScheme, std::vector< G4double > &edges)
G4double(* G4Fcn)(G4double)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4BinScheme GetBinScheme(const G4String &binSchemeName)