38 fCountCalls(0), fCountEvaluations(0)
40 fpMagneticField= pMagField;
41 fDistanceConst= distance;
62 fpMagneticField= rightCMF.fpMagneticField;
63 fDistanceConst = rightCMF.fDistanceConst;
64 fLastLocation = rightCMF.fLastLocation;
65 fLastValue = rightCMF.fLastValue;
71 if (&p ==
this)
return *
this; *
this = p;
return *
this;
82 G4double distSq= (newLocation-fLastLocation).mag2();
84 if( distSq < fDistanceConst*fDistanceConst ) {
85 Bfield[0] = fLastValue.
x();
86 Bfield[1] = fLastValue.
y();
87 Bfield[2] = fLastValue.
z();
CLHEP::Hep3Vector G4ThreeVector
G4DLLIMPORT std::ostream G4cout
virtual void GetFieldValue(const G4double Point[4], G4double *Bfield) const
G4CachedMagneticField(G4MagneticField *, G4double distanceConst)
G4CachedMagneticField & operator=(const G4CachedMagneticField &p)
virtual ~G4CachedMagneticField()
virtual void GetFieldValue(const G4double Point[4], G4double *Bfield) const =0