20#include "BDSFieldMagOctupole.hh"
21#include "BDSMagnetStrength.hh"
22#include "BDSUtilities.hh"
24#include "G4ThreeVector.hh"
26#include "CLHEP/Units/SystemOfUnits.h"
34 bTriplePrime = brho * (*strength)[
"k3"] / (CLHEP::m3*CLHEP::m);
38 G4cout << __METHOD_NAME__ <<
"B''' = " <<
bTriplePrime << G4endl;
43 const G4double )
const
50 G4double x = position.x();
51 G4double y = position.y();
53 G4ThreeVector localField;
54 localField[0] = (3 * std::pow(x,2) * y - std::pow(y,3)) *
bTPNormed;
55 localField[1] = (std::pow(x,3) - 3* x * std::pow(y,2)) *
bTPNormed;
BDSFieldMagOctupole()
Private default constructor to force use of supplied constructor.
G4double bTPNormed
bTriplePrime / 3! cached for simplicity
G4double bTriplePrime
3rd derivative of the magnetic field
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())