ATLAS Offline Software
Functions
G4FieldManagerHelper Namespace Reference

Functions

G4bool SetMinAndMaxEpsilonStep (G4FieldManager *fieldMgr, double eps_min, double eps_max)
 Set epsilon step range for a G4FieldManager instance accounting for Geant4 sanity checks. More...
 

Function Documentation

◆ SetMinAndMaxEpsilonStep()

G4bool G4FieldManagerHelper::SetMinAndMaxEpsilonStep ( G4FieldManager *  fieldMgr,
double  eps_min,
double  eps_max 
)
inline

Set epsilon step range for a G4FieldManager instance accounting for Geant4 sanity checks.

Definition at line 23 of file G4FieldManagerHelper.h.

24  {
25  if( fieldMgr == nullptr ) { return false; }
26 
27  if( eps_min > fieldMgr->GetMaximumEpsilonStep() )
28  {
29  fieldMgr->SetMaximumEpsilonStep( eps_max );
30  fieldMgr->SetMinimumEpsilonStep( eps_min );
31  }
32  else
33  {
34  fieldMgr->SetMinimumEpsilonStep( eps_min );
35  fieldMgr->SetMaximumEpsilonStep( eps_max );
36  }
37  return eps_min <= eps_max;
38  }