#include <G4CachedMagneticField.hh>
Definition at line 41 of file G4CachedMagneticField.hh.
◆ G4CachedMagneticField() [1/2]
◆ ~G4CachedMagneticField()
G4CachedMagneticField::~G4CachedMagneticField |
( |
| ) |
|
|
overridedefault |
◆ G4CachedMagneticField() [2/2]
Definition at line 63 of file G4CachedMagneticField.cc.
66{
67 fpMagneticField= rightCMF.fpMagneticField;
68 fDistanceConst = rightCMF.fDistanceConst;
69 fLastLocation = rightCMF.fLastLocation;
70 fLastValue = rightCMF.fLastValue;
72}
◆ ClearCounts()
void G4CachedMagneticField::ClearCounts |
( |
| ) |
|
|
inline |
◆ Clone()
G4Field * G4CachedMagneticField::Clone |
( |
| ) |
const |
|
overridevirtual |
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}
G4CachedMagneticField(G4MagneticField *, G4double distanceConst)
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 |
|
overridevirtual |
Implements G4MagneticField.
Definition at line 88 of file G4CachedMagneticField.cc.
90{
92
93 G4double distSq= (newLocation-fLastLocation).mag2();
95 if( distSq < fDistanceConst*fDistanceConst )
96 {
97 Bfield[0] = fLastValue.
x();
98 Bfield[1] = fLastValue.
y();
99 Bfield[2] = fLastValue.
z();
100 }
101 else
102 {
105 fLastLocation =
G4ThreeVector( Point[0], Point[1], Point[2] );
106 fLastValue =
G4ThreeVector( Bfield[0], Bfield[1], Bfield[2] );
107 }
108}
CLHEP::Hep3Vector G4ThreeVector
void GetFieldValue(const G4double Point[4], G4double *Bfield) const override=0
◆ operator=()
Definition at line 75 of file G4CachedMagneticField.cc.
76{
77 if (&p == this) { return *this; }
79 fpMagneticField= p.fpMagneticField;
80 fDistanceConst = p.fDistanceConst;
81 fLastLocation = p.fLastLocation;
82 fLastValue = p.fLastValue;
84 return *this;
85}
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: