72 fOut.write((
char*) (&size),
sizeof size);
75 for(std::size_t i = 0; i < size; ++i)
80 fOut.write((
char*) (value), 2 * size * (
sizeof(
G4double)));
115 for(
G4int i = 0; i < siz; ++i)
119 fIn >> vBin >> vData;
139 fIn.read((
char*) (&size),
sizeof size);
142 fIn.read((
char*) (value), 2 * size * (
sizeof(
G4double)));
151 for(std::size_t i = 0; i < size; ++i)
174 std::size_t idx)
const
216 G4cout <<
"### G4PhysicsVector: spline cannot be used for "
233 G4cout <<
"### G4PhysicsVector: spline cannot be used, because "
235 <<
" >= E[" << i+1 <<
"]=" <<
binVector[i + 1]
251 G4cout <<
"### G4PhysicsVector:: FillSecondDerivatives N="
277 for(std::size_t i = 1; i <
n; ++i)
310 for(
G4int i = 2; i <
n - 1; ++i)
331 (2.0 * sig - 1.0) * u[
n - 2] / p;
339 for(
G4int k =
n - 2; k > 1; --k)
368 firstPointDerivative);
375 for(
G4int i = 1; i <
n; ++i)
400 for(
G4int k =
n - 1; k > 0; --k)
416 out << std::setprecision(12) << pv.
edgeMin <<
" " << pv.
edgeMax <<
" "
421 for(std::size_t i = 0; i < pv.
dataVector.size(); ++i)
425 out << std::setprecision(
prec);
465 <<
"; an attempt to put data at index= " << index
466 <<
" value= " << val <<
" in " << text;
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
G4GLOB_DLL std::ostream G4cout
G4double GetEnergy(const G4double value) const
void ComputeSecDerivative0()
void ComputeSecDerivative2(const G4double firstPointDerivative, const G4double endPointDerivative)
void PrintPutValueError(std::size_t index, G4double value, const G4String &text)
void ScaleVector(const G4double factorE, const G4double factorV)
G4bool Store(std::ofstream &fOut, G4bool ascii=false) const
void ComputeSecDerivative1()
std::size_t numberOfNodes
std::vector< G4double > secDerivative
G4PhysicsVector(G4bool spline=false)
G4bool Retrieve(std::ifstream &fIn, G4bool ascii=false)
std::vector< G4double > dataVector
std::vector< G4double > binVector
virtual void Initialise()
void FillSecondDerivatives(const G4SplineType=G4SplineType::Base, const G4double dir1=0.0, const G4double dir2=0.0)
std::size_t GetBin(const G4double energy) const
void DumpValues(G4double unitE=1.0, G4double unitV=1.0) const
std::size_t FindBin(const G4double energy, std::size_t idx) const
std::ostream & operator<<(std::ostream &, const BasicVector3D< float > &)
G4double energy(const ThreeVector &p, const G4double m)