#include <G4Physics2DVector.hh>
|
| G4Physics2DVector () |
|
| G4Physics2DVector (size_t nx, size_t ny) |
|
| G4Physics2DVector (const G4Physics2DVector &) |
|
G4Physics2DVector & | operator= (const G4Physics2DVector &) |
|
| ~G4Physics2DVector () |
|
G4double | Value (G4double x, G4double y, size_t &lastidx, size_t &lastidy) const |
|
G4double | Value (G4double x, G4double y) const |
|
void | PutX (size_t idx, G4double value) |
|
void | PutY (size_t idy, G4double value) |
|
void | PutValue (size_t idx, size_t idy, G4double value) |
|
void | PutVectors (const std::vector< G4double > &vecX, const std::vector< G4double > &vecY) |
|
void | ScaleVector (G4double factor) |
|
G4double | FindLinearX (G4double rand, G4double y, size_t &lastidy) const |
|
G4double | FindLinearX (G4double rand, G4double y) const |
|
G4double | GetX (size_t index) const |
|
G4double | GetY (size_t index) const |
|
G4double | GetValue (size_t idx, size_t idy) const |
|
size_t | FindBinLocationX (G4double x, size_t lastidx) const |
|
size_t | FindBinLocationY (G4double y, size_t lastidy) const |
|
size_t | GetLengthX () const |
|
size_t | GetLengthY () const |
|
G4PhysicsVectorType | GetType () const |
|
void | SetBicubicInterpolation (G4bool) |
|
void | Store (std::ofstream &fOut) |
|
G4bool | Retrieve (std::ifstream &fIn) |
|
void | SetVerboseLevel (G4int value) |
|
G4int | GetVerboseLevel () const |
|
Definition at line 62 of file G4Physics2DVector.hh.
◆ G4Physics2DVector() [1/3]
G4Physics2DVector::G4Physics2DVector |
( |
| ) |
|
◆ G4Physics2DVector() [2/3]
G4Physics2DVector::G4Physics2DVector |
( |
size_t |
nx, |
|
|
size_t |
ny |
|
) |
| |
|
explicit |
◆ G4Physics2DVector() [3/3]
◆ ~G4Physics2DVector()
G4Physics2DVector::~G4Physics2DVector |
( |
| ) |
|
◆ BicubicInterpolation()
Definition at line 189 of file G4Physics2DVector.cc.
238 f1 + f1y*h2 + (3*(f4-
f1) - 2*f1y - f4y)*h22 + (2*(
f1 -
f4) + f1y + f4y)*h23
239 + f1x*
h1 + f1xy*
h1*
h2 +(3*(f4x - f1x) - 2*f1xy - f4xy)*
h1*h22
240 + (2*(f1x - f4x) + f1xy + f4xy)*
h1*h23
241 + (3*(
f2 -
f1) - 2*f1x - f2x)*
h12 + (3*f2y - 3*f1y - 2*f1xy - f2xy)*
h12*
h2 242 + (9*(
f1 -
f2 +
f3 -
f4) + 6*f1x + 3*f2x - 3*f3x - 6*f4x + 6*f1y - 6*f2y
243 - 3*f3y + 3*f4y + 4*f1xy + 2*f2xy + f3xy + 2*f4xy)*
h12*h22
244 + (6*(-
f1 +
f2 -
f3 +
f4) - 4*f1x - 2*f2x + 2*f3x + 4*f4x - 3*f1y
245 + 3*f2y + 3*f3y - 3*f4y - 2*f1xy - f2xy - f3xy - 2*f4xy)*
h12*h23
246 + (2*(
f1 -
f2) + f1x + f2x)*
h13 + (2*(f1y - f2y) + f1xy + f2xy)*
h13*
h2 247 + (6*(-
f1 +
f2 -
f3 +
f4) + 3*(-f1x - f2x + f3x + f4x) - 4*f1y
248 + 4*f2y + 2*f3y - 2*f4y - 2*f1xy - 2*f2xy - f3xy - f4xy)*
h13*h22
249 + (4*(
f1 -
f2 +
f3 -
f4) + 2*(f1x + f2x - f3x - f4x)
250 + 2*(f1y - f2y - f3y + f4y) + f1xy + f2xy + f3xy + f4xy)*
h13*h23;
G4double DerivativeXY(size_t idx, size_t idy, G4double fac) const
G4double DerivativeX(size_t idx, size_t idy, G4double fac) const
G4double GetValue(size_t idx, size_t idy) const
G4double DerivativeY(size_t idx, size_t idy, G4double fac) const
◆ ClearVectors()
void G4Physics2DVector::ClearVectors |
( |
| ) |
|
|
protected |
◆ CopyData()
Definition at line 131 of file G4Physics2DVector.cc.
std::vector< G4double > G4PV2DDataVector
void PutValue(size_t idx, size_t idy, G4double value)
◆ DerivativeX()
G4double G4Physics2DVector::DerivativeX |
( |
size_t |
idx, |
|
|
size_t |
idy, |
|
|
G4double |
fac |
|
) |
| const |
|
inlineprivate |
◆ DerivativeXY()
G4double G4Physics2DVector::DerivativeXY |
( |
size_t |
idx, |
|
|
size_t |
idy, |
|
|
G4double |
fac |
|
) |
| const |
|
inlineprivate |
◆ DerivativeY()
G4double G4Physics2DVector::DerivativeY |
( |
size_t |
idx, |
|
|
size_t |
idy, |
|
|
G4double |
fac |
|
) |
| const |
|
inlineprivate |
◆ FindBin()
◆ FindBinLocation()
Definition at line 361 of file G4Physics2DVector.cc.
365 size_t binmax =
v.size() - 2;
367 if(
z <=
v[0]) { bin = 0; }
368 else if(
z >=
v[binmax]) { bin = binmax; }
370 bin = std::lower_bound(
v.begin(),
v.end(),
z) -
v.begin() - 1;
◆ FindBinLocationX()
size_t G4Physics2DVector::FindBinLocationX |
( |
G4double |
x, |
|
|
size_t |
lastidx |
|
) |
| const |
|
inline |
◆ FindBinLocationY()
size_t G4Physics2DVector::FindBinLocationY |
( |
G4double |
y, |
|
|
size_t |
lastidy |
|
) |
| const |
|
inline |
◆ FindLinearX() [1/2]
Definition at line 377 of file G4Physics2DVector.cc.
397 res += (x2 -
x1)*(y - yVector[idy])/del;
size_t FindBinLocationY(G4double y, size_t lastidy) const
std::vector< G4PV2DDataVector * > value
G4double InterpolateLinearX(G4PV2DDataVector &v, G4double rand) const
◆ FindLinearX() [2/2]
◆ GetLengthX()
size_t G4Physics2DVector::GetLengthX |
( |
| ) |
const |
|
inline |
◆ GetLengthY()
size_t G4Physics2DVector::GetLengthY |
( |
| ) |
const |
|
inline |
◆ GetType()
◆ GetValue()
G4double G4Physics2DVector::GetValue |
( |
size_t |
idx, |
|
|
size_t |
idy |
|
) |
| const |
|
inline |
◆ GetVerboseLevel()
G4int G4Physics2DVector::GetVerboseLevel |
( |
| ) |
const |
|
inline |
◆ GetX()
G4double G4Physics2DVector::GetX |
( |
size_t |
index | ) |
const |
|
inline |
◆ GetY()
G4double G4Physics2DVector::GetY |
( |
size_t |
index | ) |
const |
|
inline |
◆ InterpolateLinearX()
Definition at line 404 of file G4Physics2DVector.cc.
407 size_t nn =
v.size();
408 if(1 >= nn) {
return 0.0; }
419 n2 = (n3 + n1 + 1)/2;
424 res += (y - v[n1])*(
xVector[n3] - res)/del;
◆ operator!=()
◆ operator=()
Definition at line 87 of file G4Physics2DVector.cc.
89 if (&right==
this) {
return *
this; }
void CopyData(const G4Physics2DVector &vec)
◆ operator==()
◆ PrepareVectors()
void G4Physics2DVector::PrepareVectors |
( |
| ) |
|
|
protected |
Definition at line 108 of file G4Physics2DVector.cc.
std::vector< G4double > G4PV2DDataVector
std::vector< G4PV2DDataVector * > value
◆ PutValue()
void G4Physics2DVector::PutValue |
( |
size_t |
idx, |
|
|
size_t |
idy, |
|
|
G4double |
value |
|
) |
| |
|
inline |
◆ PutVectors()
void G4Physics2DVector::PutVectors |
( |
const std::vector< G4double > & |
vecX, |
|
|
const std::vector< G4double > & |
vecY |
|
) |
| |
◆ PutX()
void G4Physics2DVector::PutX |
( |
size_t |
idx, |
|
|
G4double |
value |
|
) |
| |
|
inline |
◆ PutY()
void G4Physics2DVector::PutY |
( |
size_t |
idy, |
|
|
G4double |
value |
|
) |
| |
|
inline |
◆ Retrieve()
G4bool G4Physics2DVector::Retrieve |
( |
std::ifstream & |
fIn | ) |
|
Definition at line 302 of file G4Physics2DVector.cc.
315 if( 0 >= numberOfYNodes || numberOfYNodes >=
INT_MAX) {
327 if (
in.fail()) {
return false; }
331 if (
in.fail()) {
return false; }
336 if (
in.fail()) {
return false; }
void PutValue(size_t idx, size_t idy, G4double value)
◆ ScaleVector()
void G4Physics2DVector::ScaleVector |
( |
G4double |
factor | ) |
|
Definition at line 347 of file G4Physics2DVector.cc.
void PutValue(size_t idx, size_t idy, G4double value)
G4double GetValue(size_t idx, size_t idy) const
static const G4double factor
◆ SetBicubicInterpolation()
void G4Physics2DVector::SetBicubicInterpolation |
( |
G4bool |
| ) |
|
|
inline |
◆ SetVerboseLevel()
void G4Physics2DVector::SetVerboseLevel |
( |
G4int |
value | ) |
|
|
inline |
◆ Store()
void G4Physics2DVector::Store |
( |
std::ofstream & |
fOut | ) |
|
Definition at line 273 of file G4Physics2DVector.cc.
279 out << std::setprecision(5);
291 for(
size_t i = 0; i<numberOfXNodes-1; ++i) {
G4double GetValue(size_t idx, size_t idy) const
◆ Value() [1/2]
Definition at line 147 of file G4Physics2DVector.cc.
181 return ((y2 - y)*(v11*(x2 - x) + v12*(x - x1)) +
182 ((y - y1)*(v21*(x2 - x) + v22*(x - x1))))/((x2 -
x1)*(y2 - y1));
size_t FindBinLocationY(G4double y, size_t lastidy) const
G4double BicubicInterpolation(G4double x, G4double y, size_t idx, size_t idy) const
size_t FindBinLocationX(G4double x, size_t lastidx) const
G4double GetValue(size_t idx, size_t idy) const
◆ Value() [2/2]
◆ numberOfXNodes
size_t G4Physics2DVector::numberOfXNodes |
|
private |
◆ numberOfYNodes
size_t G4Physics2DVector::numberOfYNodes |
|
private |
◆ type
◆ useBicubic
G4bool G4Physics2DVector::useBicubic |
|
private |
◆ value
◆ verboseLevel
G4int G4Physics2DVector::verboseLevel |
|
private |
◆ xVector
◆ yVector
The documentation for this class was generated from the following files: