65 edgeMin(0.), edgeMax(0.), numberOfNodes(0),
67 dBin(0.), baseBin(0.),
97 if (&right==
this) {
return *
this; }
111 return (
this == &right);
118 return (
this != &right);
139 useSpline = vec.useSpline;
182 fOut.write((
char*)(&size),
sizeof size);
185 for(
size_t i = 0; i < size; ++i)
190 fOut.write((
char*)(value), 2*size*(
sizeof (
G4double)));
212 if (fIn.fail()) {
return false; }
216 if (fIn.fail()) {
return false; }
220 G4cerr <<
"G4PhysicsVector::Retrieve():";
230 for(
G4int i = 0; i < siz ; i++)
234 fIn >> vBin >> vData;
235 if (fIn.fail()) {
return false; }
255 fIn.read((
char*)(&size),
sizeof size);
258 fIn.read((
char*)(value), 2*size*(
sizeof(
G4double)) );
267 for(
size_t i = 0; i < size; ++i)
321 if(!SplinePossible()) {
return; }
331 - firstPointDerivative);
338 for(
G4int i=1; i<n; ++i)
351 *(endPointDerivative -
358 for(
G4int k=n-1; k>0; --k)
382 if(!SplinePossible()) {
return; }
401 for(
G4int i=2; i<n-1; ++i)
416 - (2.0*sig - 1.0)*u[n-2]/p;
424 for(
G4int k=n-2; k>1; --k)
444 if(!SplinePossible()) {
return; }
454 for(
size_t i=1; i<n; ++i)
467G4bool G4PhysicsVector::SplinePossible()
472 if(!useSpline) {
return useSpline; }
490 out << std::setprecision(12) << pv.
edgeMin <<
" "
495 for(
size_t i = 0; i < pv.
dataVector.size(); i++)
499 out << std::setprecision(6);
506void G4PhysicsVector::ComputeValue(
G4double theEnergy)
512 if( theEnergy < cache->lastEnergy
517 }
else if( theEnergy <=
edgeMin ) {
522 }
else if( theEnergy >=
edgeMax ) {
G4Allocator< G4PhysicsVector > aPVAllocator
std::ostream & operator<<(std::ostream &out, const G4PhysicsVector &pv)
G4DLLIMPORT std::ostream G4cerr
void ComputeSecondDerivatives(G4double firstPointDerivative, G4double endPointDerivative)
size_t GetLastBin() const
virtual size_t FindBinLocation(G4double theEnergy) const =0
virtual void ScaleVector(G4double factorE, G4double factorV)
G4PhysicsVectorCache * cache
G4PVDataVector secDerivative
virtual ~G4PhysicsVector()
void ComputeSecDerivatives()
G4PhysicsVector(G4bool spline=false)
void FillSecondDerivatives()
virtual G4bool Retrieve(std::ifstream &fIn, G4bool ascii=false)
G4PVDataVector dataVector
void CopyData(const G4PhysicsVector &vec)
virtual G4double GetLowEdgeEnergy(size_t binNumber) const
G4int operator==(const G4PhysicsVector &right) const
G4double GetLastValue() const
G4int operator!=(const G4PhysicsVector &right) const
G4PhysicsVector & operator=(const G4PhysicsVector &)
G4double GetLastEnergy() const
virtual G4bool Store(std::ofstream &fOut, G4bool ascii=false)