|
Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
|
G4CachedMagneticField is a specialisation of G4MagneticField and is used to cache the Magnetic Field value, for fields whose evaluation is expensive. More...
#include <G4CachedMagneticField.hh>
Protected Attributes | |
| G4int | fCountCalls = 0 |
| G4int | fCountEvaluations = 0 |
Additional Inherited Members | |
| Static Public Attributes inherited from G4Field | |
| static constexpr G4int | MAX_NUMBER_OF_COMPONENTS = 24 |
G4CachedMagneticField is a specialisation of G4MagneticField and is used to cache the Magnetic Field value, for fields whose evaluation is expensive.
Definition at line 47 of file G4CachedMagneticField.hh.
| G4CachedMagneticField::G4CachedMagneticField | ( | G4MagneticField * | pMagField, |
| G4double | distance ) |
Constructor for G4CachedMagneticField.
| [in] | pMagField | Pointer to the original magnetic field. |
| [in] | distance | Distance for field evaluation, within which the field does not change. |
Definition at line 33 of file G4CachedMagneticField.cc.
Referenced by Clone(), G4CachedMagneticField(), operator=(), and ~G4CachedMagneticField().
|
overridedefault |
Default Destructor.
| G4CachedMagneticField::G4CachedMagneticField | ( | const G4CachedMagneticField & | r | ) |
Copy constructor and assignment operator.
Definition at line 61 of file G4CachedMagneticField.cc.
|
inline |
Resets counters.
Definition at line 93 of file G4CachedMagneticField.hh.
Referenced by G4CachedMagneticField(), G4CachedMagneticField(), and operator=().
|
overridevirtual |
Returns a pointer of an allocated clone of the field.
Reimplemented from G4Field.
Definition at line 41 of file G4CachedMagneticField.cc.
|
inline |
Getter and setter for the distance within which field is constant.
Definition at line 81 of file G4CachedMagneticField.hh.
|
inline |
|
inline |
Definition at line 88 of file G4CachedMagneticField.hh.
|
overridevirtual |
Returns the value of the field at the give 'Point'.
| [in] | Point | The given position time vector (x,y,z,t). |
| [out] | Bfield | The returned field array. |
Implements G4MagneticField.
Definition at line 86 of file G4CachedMagneticField.cc.
| G4CachedMagneticField & G4CachedMagneticField::operator= | ( | const G4CachedMagneticField & | p | ) |
Definition at line 73 of file G4CachedMagneticField.cc.
| void G4CachedMagneticField::ReportStatistics | ( | ) |
Streams on standard output the values of counters.
Definition at line 54 of file G4CachedMagneticField.cc.
|
inline |
Definition at line 82 of file G4CachedMagneticField.hh.
|
mutableprotected |
Definition at line 107 of file G4CachedMagneticField.hh.
Referenced by ClearCounts(), GetCountCalls(), GetFieldValue(), and ReportStatistics().
|
protected |
Definition at line 107 of file G4CachedMagneticField.hh.
Referenced by ClearCounts(), GetCountEvaluations(), GetFieldValue(), and ReportStatistics().