38 fCountCalls(0), fCountEvaluations(0)
40 fpMagneticField= pMagField;
41 fDistanceConst= distance;
53 cloned->fLastLocation = fLastLocation;
54 cloned->fLastValue = fLastValue;
73 fpMagneticField= rightCMF.fpMagneticField;
74 fDistanceConst = rightCMF.fDistanceConst;
75 fLastLocation = rightCMF.fLastLocation;
76 fLastValue = rightCMF.fLastValue;
82 if (&p ==
this)
return *
this;
84 fpMagneticField= p.fpMagneticField;
85 fDistanceConst = p.fDistanceConst;
86 fLastLocation = p.fLastLocation;
87 fLastValue = p.fLastValue;
100 G4double distSq= (newLocation-fLastLocation).mag2();
102 if( distSq < fDistanceConst*fDistanceConst ) {
103 Bfield[0] = fLastValue.
x();
104 Bfield[1] = fLastValue.
y();
105 Bfield[2] = fLastValue.
z();
112 fLastLocation=
G4ThreeVector( Point[0], Point[1], Point[2] );
114 fLastValue=
G4ThreeVector( Bfield[0], Bfield[1], Bfield[2] );
virtual void GetFieldValue(const G4double Point[4], G4double *Bfield) const
CLHEP::Hep3Vector G4ThreeVector
virtual G4Field * Clone() const
virtual void GetFieldValue(const G4double Point[4], G4double *Bfield) const =0
virtual G4Field * Clone() const
G4GLOB_DLL std::ostream G4cout
G4CachedMagneticField(G4MagneticField *, G4double distanceConst)
virtual ~G4CachedMagneticField()
G4MagneticField & operator=(const G4MagneticField &p)
G4CachedMagneticField & operator=(const G4CachedMagneticField &p)