19#include "BDSFieldEM.hh"
20#include "BDSFieldEMGlobalPlacement.hh"
22#include "G4ThreeVector.hh"
27BDSFieldEMGlobalPlacement::BDSFieldEMGlobalPlacement(
BDSFieldEM* fieldIn):
30 finiteStrength = field->FiniteStrength();
33BDSFieldEMGlobalPlacement::~BDSFieldEMGlobalPlacement()
39 const G4double t)
const
42 {
return std::make_pair(G4ThreeVector(),G4ThreeVector());}
48 const G4double t)
const
50 G4bool foundAPlacementVolume =
false;
51 G4ThreeVector localPosition =
ConvertToLocal(position, foundAPlacementVolume);
52 if (!foundAPlacementVolume)
53 {
return std::make_pair(G4ThreeVector(),G4ThreeVector());}
virtual std::pair< G4ThreeVector, G4ThreeVector > GetField(const G4ThreeVector &position, const G4double t) const
virtual std::pair< G4ThreeVector, G4ThreeVector > GetFieldTransformed(const G4ThreeVector &position, const G4double t) const
BDSFieldEM * field
The field on which this is based.
Interface for BDSIM electro-magnetic fields that may or may not be local.
virtual std::pair< G4ThreeVector, G4ThreeVector > GetFieldTransformed(const G4ThreeVector &position, const G4double t) const
Get the field value after applying transform for local offset.
G4bool finiteStrength
Flag to cache whether finite nor not.
G4ThreeVector ConvertToLocal(const G4ThreeVector &globalPosition, G4bool &foundAPlacementVolume) const
G4ThreeVector ConvertAxisToGlobal(const G4ThreeVector &localAxis) const