20#include "BDSFieldMagQuadrupole.hh"
21#include "BDSMagnetStrength.hh"
22#include "BDSUtilities.hh"
25#include "G4ThreeVector.hh"
27#include "CLHEP/Units/SystemOfUnits.h"
33 bPrime = brho * (*strength)[
"k1"] / CLHEP::m2;
36 G4cout << __METHOD_NAME__ <<
"B' = " <<
bPrime << G4endl;
41 const G4double )
const
44 field[0] = position.y() *
bPrime;
45 field[1] = position.x() *
bPrime;
BDSFieldMagQuadrupole()
Private default constructor to force use of supplied constructor.
virtual G4ThreeVector GetField(const G4ThreeVector &position, const G4double t=0) const
Access the field value.
G4double bPrime
B' - the field gradient - a constant for a quadrupole.
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())