#include <G4CachedMagneticField.hh>
Definition at line 41 of file G4CachedMagneticField.hh.
◆ G4CachedMagneticField() [1/2]
◆ ~G4CachedMagneticField()
G4CachedMagneticField::~G4CachedMagneticField |
( |
| ) |
|
|
virtual |
◆ G4CachedMagneticField() [2/2]
Definition at line 65 of file G4CachedMagneticField.cc.
68{
69 fpMagneticField= rightCMF.fpMagneticField;
70 fDistanceConst = rightCMF.fDistanceConst;
71 fLastLocation = rightCMF.fLastLocation;
72 fLastValue = rightCMF.fLastValue;
74}
◆ ClearCounts()
void G4CachedMagneticField::ClearCounts |
( |
| ) |
|
|
inline |
◆ Clone()
G4Field * G4CachedMagneticField::Clone |
( |
| ) |
const |
|
virtual |
Reimplemented from G4Field.
Definition at line 41 of file G4CachedMagneticField.cc.
42{
43
44
47
48 cloned->fLastLocation = fLastLocation;
49 cloned->fLastValue = fLastValue;
50 return cloned;
51}
virtual G4Field * Clone() const
◆ GetConstDistance()
G4double G4CachedMagneticField::GetConstDistance |
( |
| ) |
const |
|
inline |
◆ GetCountCalls()
G4int G4CachedMagneticField::GetCountCalls |
( |
| ) |
const |
|
inline |
◆ GetCountEvaluations()
G4int G4CachedMagneticField::GetCountEvaluations |
( |
| ) |
const |
|
inline |
◆ GetFieldValue()
void G4CachedMagneticField::GetFieldValue |
( |
const G4double |
Point[4], |
|
|
G4double * |
Bfield |
|
) |
| const |
|
virtual |
Implements G4MagneticField.
Definition at line 90 of file G4CachedMagneticField.cc.
92{
94
95 G4double distSq= (newLocation-fLastLocation).mag2();
97 if( distSq < fDistanceConst*fDistanceConst )
98 {
99 Bfield[0] = fLastValue.
x();
100 Bfield[1] = fLastValue.
y();
101 Bfield[2] = fLastValue.
z();
102 }
103 else
104 {
107 fLastLocation =
G4ThreeVector( Point[0], Point[1], Point[2] );
108 fLastValue =
G4ThreeVector( Bfield[0], Bfield[1], Bfield[2] );
109 }
110}
CLHEP::Hep3Vector G4ThreeVector
virtual void GetFieldValue(const G4double Point[4], G4double *Bfield) const =0
◆ operator=()
Definition at line 77 of file G4CachedMagneticField.cc.
78{
79 if (&p == this) { return *this; }
81 fpMagneticField= p.fpMagneticField;
82 fDistanceConst = p.fDistanceConst;
83 fLastLocation = p.fLastLocation;
84 fLastValue = p.fLastValue;
86 return *this;
87}
G4MagneticField & operator=(const G4MagneticField &p)
◆ ReportStatistics()
void G4CachedMagneticField::ReportStatistics |
( |
| ) |
|
◆ SetConstDistance()
void G4CachedMagneticField::SetConstDistance |
( |
G4double |
dist | ) |
|
|
inline |
◆ fCountCalls
G4int G4CachedMagneticField::fCountCalls = 0 |
|
mutableprotected |
◆ fCountEvaluations
G4int G4CachedMagneticField::fCountEvaluations = 0 |
|
protected |
The documentation for this class was generated from the following files: