43 G4bool fieldChangesEnergy )
44 : fDetectorField(detectorField),
45 fChordFinder(pChordFinder),
46 fDelta_One_Step_Value( fDefault_Delta_One_Step_Value ),
47 fDelta_Intersection_Val( fDefault_Delta_Intersection_Val ),
48 fEpsilonMin( fEpsilonMinDefault ),
49 fEpsilonMax( fEpsilonMaxDefault)
51 if ( detectorField !=
nullptr )
66 : fDetectorField(detectorField), fAllocatedChordFinder(true),
67 fDelta_One_Step_Value( fDefault_Delta_One_Step_Value ),
68 fDelta_Intersection_Val( fDefault_Delta_Intersection_Val ),
69 fEpsilonMin( fEpsilonMinDefault ),
70 fEpsilonMax( fEpsilonMaxDefault )
157 if( detectorMagField !=
nullptr )
199 if( driver !=
nullptr )
206 if( equation !=
nullptr )
214 if( !ableToSet && (failMode > 0) )
219 msg <<
"Unable to set the field in the dependent objects of G4FieldManager"
221 msg <<
"All the dependent classes must be fully initialised,"
222 <<
"before it is possible to call this method." <<
G4endl;
223 msg <<
"The problem encountered was the following: " <<
G4endl;
224 if(
fChordFinder ==
nullptr ) { msg <<
" No ChordFinder. " ; }
225 else if( driver ==
nullptr ) { msg <<
" No Integration Driver set. ";}
226 else if( equation ==
nullptr ) { msg <<
" No Equation found. " ; }
228 else { msg <<
" Can NOT find reason for failure. ";}
232 G4Exception(
"G4FieldManager::SetDetectorField",
"Geometry001",
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
static constexpr double millimeter
G4VIntegrationDriver * GetIntegrationDriver()
void SetFieldObj(G4Field *pField)
static void DeRegister(G4FieldManager *pVolume)
static void Register(G4FieldManager *pVolume)
static G4double fDefault_Delta_One_Step_Value
static G4double fDefault_Delta_Intersection_Val
virtual G4FieldManager * Clone() const
G4double fDelta_One_Step_Value
virtual ~G4FieldManager()
G4bool SetDetectorField(G4Field *detectorField, G4int failMode=0)
void CreateChordFinder(G4MagneticField *detectorMagField)
void InitialiseFieldChangesEnergy()
virtual void ConfigureForTrack(const G4Track *)
G4FieldManager(G4Field *detectorField=nullptr, G4ChordFinder *pChordFinder=nullptr, G4bool b=true)
G4bool fAllocatedChordFinder
G4ChordFinder * fChordFinder
G4bool fFieldChangesEnergy
G4double fDelta_Intersection_Val
virtual G4bool DoesFieldChangeEnergy() const =0
virtual G4Field * Clone() const
virtual G4EquationOfMotion * GetEquationOfMotion()=0
T max(const T t1, const T t2)
brief Return the largest of the two arguments