#include <G4PhysicsVector.hh>
Definition at line 76 of file G4PhysicsVector.hh.
G4PhysicsVector::G4PhysicsVector |
( |
G4bool |
spline = false | ) |
|
|
explicit |
G4PhysicsVector::~G4PhysicsVector |
( |
| ) |
|
|
virtual |
void G4PhysicsVector::ComputeSecDerivatives |
( |
| ) |
|
Definition at line 431 of file G4PhysicsVector.cc.
440 if(!SplinePossible()) {
return; }
446 for(
size_t i=1; i<
n; ++i)
G4PVDataVector dataVector
G4PVDataVector secDerivative
void G4PhysicsVector::ComputeSecondDerivatives |
( |
G4double |
firstPointDerivative, |
|
|
G4double |
endPointDerivative |
|
) |
| |
Definition at line 294 of file G4PhysicsVector.cc.
307 if(!SplinePossible()) {
return; }
319 - firstPointDerivative);
337 p = sig*secDerivative[n-2] + 2.0;
339 *(endPointDerivative -
341 secDerivative[
n] = un/(secDerivative[n-1] + 2.0);
346 for(
G4int k=n-1; k>0; --k)
349 (secDerivative[k+1] -
352 secDerivative[0] = 0.5*(u[0] - secDerivative[1]);
G4PVDataVector dataVector
G4PVDataVector secDerivative
void ComputeSecDerivatives()
Definition at line 124 of file G4PhysicsVector.cc.
130 useSpline = vec.useSpline;
G4PVDataVector dataVector
G4PVDataVector secDerivative
void G4PhysicsVector::DeleteData |
( |
| ) |
|
|
protected |
Definition at line 266 of file G4PhysicsVector.cc.
G4PVDataVector dataVector
G4GLOB_DLL std::ostream G4cout
G4double G4PhysicsVector::Energy |
( |
size_t |
index | ) |
const |
|
inline |
void G4PhysicsVector::FillSecondDerivatives |
( |
| ) |
|
Definition at line 359 of file G4PhysicsVector.cc.
370 if(!SplinePossible()) {
return; }
391 for(
G4int i=2; i<n-1; ++i)
406 - (2.0*sig - 1.0)*u[n-2]/
p;
414 for(
G4int k=n-2; k>1; --k)
G4PVDataVector dataVector
G4PVDataVector secDerivative
void ComputeSecDerivatives()
size_t G4PhysicsVector::FindBin |
( |
G4double |
energy, |
|
|
size_t |
idx |
|
) |
| const |
|
inline |
Definition at line 516 of file G4PhysicsVector.cc.
520 size_t bin = std::lower_bound(dataVector.begin(), dataVector.end(), y)
521 - dataVector.begin() - 1;
524 G4double del = dataVector[bin+1] - dataVector[bin];
526 res += (y - dataVector[bin])*(
binVector[bin+1] - res)/del;
G4PVDataVector dataVector
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
G4double G4PhysicsVector::GetLowEdgeEnergy |
( |
size_t |
binNumber | ) |
const |
G4double G4PhysicsVector::GetMaxEnergy |
( |
| ) |
const |
|
inline |
size_t G4PhysicsVector::GetVectorLength |
( |
| ) |
const |
|
inline |
G4bool G4PhysicsVector::IsFilledVectorExist |
( |
| ) |
const |
|
inline |
G4double G4PhysicsVector::operator() |
( |
const size_t |
index | ) |
const |
|
inline |
Definition at line 88 of file G4PhysicsVector.cc.
90 if (&right==
this) {
return *
this; }
void CopyData(const G4PhysicsVector &vec)
G4double G4PhysicsVector::operator[] |
( |
const size_t |
index | ) |
const |
|
inline |
void G4PhysicsVector::PrintPutValueError |
( |
size_t |
index | ) |
|
|
protected |
Definition at line 533 of file G4PhysicsVector.cc.
537 <<
" an attempt to put data at index= " << index;
539 ed,
"Memory overwritten");
std::ostringstream G4ExceptionDescription
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
void G4PhysicsVector::PutValue |
( |
size_t |
index, |
|
|
G4double |
theValue |
|
) |
| |
|
inline |
G4bool G4PhysicsVector::Retrieve |
( |
std::ifstream & |
fIn, |
|
|
G4bool |
ascii = false |
|
) |
| |
|
virtual |
Reimplemented in G4PhysicsLogVector, and G4PhysicsLinearVector.
Definition at line 191 of file G4PhysicsVector.cc.
202 if (fIn.fail()) {
return false; }
206 if (fIn.fail() || siz<=0) {
return false; }
212 for(
G4int i = 0; i < siz ; i++)
216 fIn >> vBin >> vData;
217 if (fIn.fail()) {
return false; }
233 fIn.read((
char*)(&numberOfNodes),
sizeof numberOfNodes );
237 fIn.read((
char*)(&size),
sizeof size);
240 fIn.read((
char*)(value), 2*size*(
sizeof(
G4double)) );
249 for(
size_t i = 0; i < size; ++i)
257 numberOfNodes = size;
G4PVDataVector dataVector
const XML_Char int const XML_Char * value
G4PVDataVector secDerivative
void G4PhysicsVector::SetVerboseLevel |
( |
G4int |
value | ) |
|
|
inline |
G4bool G4PhysicsVector::Store |
( |
std::ofstream & |
fOut, |
|
|
G4bool |
ascii = false |
|
) |
| const |
Definition at line 158 of file G4PhysicsVector.cc.
175 fOut.write((
char*)(&size),
sizeof size);
178 for(
size_t i = 0; i < size; ++i)
183 fOut.write((
char*)(value), 2*size*(
sizeof (
G4double)));
G4PVDataVector dataVector
const XML_Char int const XML_Char * value
Definition at line 498 of file G4PhysicsVector.cc.
504 }
else if(theEnergy >=
edgeMax) {
508 lastIdx =
FindBin(theEnergy, lastIdx);
509 y = Interpolation(lastIdx, theEnergy);
G4PVDataVector dataVector
size_t FindBin(G4double energy, size_t idx) const
std::ostream& operator<< |
( |
std::ostream & |
out, |
|
|
const G4PhysicsVector & |
pv |
|
) |
| |
|
friend |
Definition at line 479 of file G4PhysicsVector.cc.
482 out << std::setprecision(12) << pv.
edgeMin <<
" "
487 for(
size_t i = 0; i < pv.
dataVector.size(); i++)
491 out << std::setprecision(6);
G4PVDataVector dataVector
size_t G4PhysicsVector::numberOfNodes |
|
protected |
G4int G4PhysicsVector::verboseLevel |
|
protected |
The documentation for this class was generated from the following files: