38 fCountCalls(0), fCountEvaluations(0)
40 fpMagneticField= pMagField;
41 fDistanceConst= distance;
52 this->fDistanceConst );
53 cloned->fLastLocation = this->fLastLocation;
54 cloned->fLastValue = this->fLastValue;
73 fpMagneticField= rightCMF.fpMagneticField;
74 fDistanceConst = rightCMF.fDistanceConst;
75 fLastLocation = rightCMF.fLastLocation;
76 fLastValue = rightCMF.fLastValue;
82 if (&p ==
this)
return *
this; *
this =
p;
return *
this;
93 G4double distSq= (newLocation-fLastLocation).mag2();
95 if( distSq < fDistanceConst*fDistanceConst ) {
96 Bfield[0] = fLastValue.
x();
97 Bfield[1] = fLastValue.
y();
98 Bfield[2] = fLastValue.
z();
105 fLastLocation=
G4ThreeVector( Point[0], Point[1], Point[2] );
107 fLastValue=
G4ThreeVector( Bfield[0], Bfield[1], Bfield[2] );
virtual void GetFieldValue(const G4double Point[4], G4double *Bfield) const
CLHEP::Hep3Vector G4ThreeVector
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()
virtual G4CachedMagneticField * Clone() const
G4CachedMagneticField & operator=(const G4CachedMagneticField &p)