20#include "BDSFieldMagMuonSpoiler.hh"
21#include "BDSMagnetStrength.hh"
22#include "BDSUtilities.hh"
25#include "G4ThreeVector.hh"
32 bField = (*strength)[
"field"];
35 G4cout << __METHOD_NAME__ <<
"B = " << bField << G4endl;
40 const G4double )
const
42 G4double x = position.x();
43 G4double y = position.y();
44 G4double r = std::hypot(x,y);
46 G4ThreeVector localField;
47 localField[0] = y/r * bField;
48 localField[1] = -x/r * bField;
virtual G4ThreeVector GetField(const G4ThreeVector &position, const G4double t=0) const
Access the field value.
G4bool finiteStrength
Flag to cache whether finite nor not.
Efficient storage of magnet strengths.
G4bool IsFinite(G4double value, G4double tolerance=std::numeric_limits< double >::epsilon())