Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4FieldManager Class Reference

#include <G4FieldManager.hh>

Public Member Functions

 G4FieldManager (G4Field *detectorField=0, G4ChordFinder *pChordFinder=0, G4bool b=true)
 
 G4FieldManager (G4MagneticField *detectorMagneticField)
 
virtual ~G4FieldManager ()
 
G4bool SetDetectorField (G4Field *detectorField)
 
const G4FieldGetDetectorField () const
 
G4bool DoesFieldExist () const
 
void CreateChordFinder (G4MagneticField *detectorMagField)
 
void SetChordFinder (G4ChordFinder *aChordFinder)
 
G4ChordFinderGetChordFinder ()
 
const G4ChordFinderGetChordFinder () const
 
virtual void ConfigureForTrack (const G4Track *)
 
G4double GetDeltaIntersection () const
 
G4double GetDeltaOneStep () const
 
void SetAccuraciesWithDeltaOneStep (G4double valDeltaOneStep)
 
void SetDeltaOneStep (G4double valueD1step)
 
void SetDeltaIntersection (G4double valueDintersection)
 
G4double GetMinimumEpsilonStep () const
 
void SetMinimumEpsilonStep (G4double newEpsMin)
 
G4double GetMaximumEpsilonStep () const
 
void SetMaximumEpsilonStep (G4double newEpsMax)
 
G4bool DoesFieldChangeEnergy () const
 
void SetFieldChangesEnergy (G4bool value)
 

Detailed Description

Definition at line 83 of file G4FieldManager.hh.

Constructor & Destructor Documentation

◆ G4FieldManager() [1/2]

G4FieldManager::G4FieldManager ( G4Field detectorField = 0,
G4ChordFinder pChordFinder = 0,
G4bool  b = true 
)

Definition at line 37 of file G4FieldManager.cc.

41 : fDetectorField(detectorField),
42 fChordFinder(pChordFinder),
43 fAllocatedChordFinder(false),
44 fEpsilonMinDefault(5.0e-5),
45 fEpsilonMaxDefault(0.001),
46 fDefault_Delta_One_Step_Value(0.01), // mm
47 fDefault_Delta_Intersection_Val(0.001), // mm
48 fEpsilonMin( fEpsilonMinDefault ),
49 fEpsilonMax( fEpsilonMaxDefault)
50{
51 fDelta_One_Step_Value= fDefault_Delta_One_Step_Value;
52 fDelta_Intersection_Val= fDefault_Delta_Intersection_Val;
53 if ( detectorField )
54 fFieldChangesEnergy= detectorField->DoesFieldChangeEnergy();
55 else
56 fFieldChangesEnergy= fieldChangesEnergy;
57
58 // Add to store
60}
static void Register(G4FieldManager *pVolume)
virtual G4bool DoesFieldChangeEnergy() const =0

◆ G4FieldManager() [2/2]

G4FieldManager::G4FieldManager ( G4MagneticField detectorMagneticField)

Definition at line 62 of file G4FieldManager.cc.

63 : fDetectorField(detectorField), fAllocatedChordFinder(true),
64 fEpsilonMinDefault(5.0e-5),
65 fEpsilonMaxDefault(0.001),
66 fFieldChangesEnergy(false),
67 fDefault_Delta_One_Step_Value(0.01), // mm
68 fDefault_Delta_Intersection_Val(0.001), // mm
69 fEpsilonMin( fEpsilonMinDefault ),
70 fEpsilonMax( fEpsilonMaxDefault)
71{
72 fChordFinder= new G4ChordFinder( detectorField );
73 fDelta_One_Step_Value= fDefault_Delta_One_Step_Value;
74 fDelta_Intersection_Val= fDefault_Delta_Intersection_Val;
75 // Add to store
77}

◆ ~G4FieldManager()

G4FieldManager::~G4FieldManager ( )
virtual

Definition at line 85 of file G4FieldManager.cc.

86{
87 if( fAllocatedChordFinder ){
88 delete fChordFinder;
89 }
91}
static void DeRegister(G4FieldManager *pVolume)

Member Function Documentation

◆ ConfigureForTrack()

void G4FieldManager::ConfigureForTrack ( const G4Track )
virtual

◆ CreateChordFinder()

void G4FieldManager::CreateChordFinder ( G4MagneticField detectorMagField)

Definition at line 94 of file G4FieldManager.cc.

95{
96 if ( fAllocatedChordFinder )
97 delete fChordFinder;
98 fChordFinder= new G4ChordFinder( detectorMagField );
99 fAllocatedChordFinder= true;
100}

◆ DoesFieldChangeEnergy()

◆ DoesFieldExist()

G4bool G4FieldManager::DoesFieldExist ( ) const
inline

◆ GetChordFinder() [1/2]

G4ChordFinder * G4FieldManager::GetChordFinder ( )
inline

◆ GetChordFinder() [2/2]

const G4ChordFinder * G4FieldManager::GetChordFinder ( ) const
inline

◆ GetDeltaIntersection()

G4double G4FieldManager::GetDeltaIntersection ( ) const
inline

◆ GetDeltaOneStep()

G4double G4FieldManager::GetDeltaOneStep ( ) const
inline

◆ GetDetectorField()

◆ GetMaximumEpsilonStep()

G4double G4FieldManager::GetMaximumEpsilonStep ( ) const
inline

◆ GetMinimumEpsilonStep()

G4double G4FieldManager::GetMinimumEpsilonStep ( ) const
inline

◆ SetAccuraciesWithDeltaOneStep()

void G4FieldManager::SetAccuraciesWithDeltaOneStep ( G4double  valDeltaOneStep)
inline

◆ SetChordFinder()

void G4FieldManager::SetChordFinder ( G4ChordFinder aChordFinder)
inline

◆ SetDeltaIntersection()

void G4FieldManager::SetDeltaIntersection ( G4double  valueDintersection)
inline

◆ SetDeltaOneStep()

void G4FieldManager::SetDeltaOneStep ( G4double  valueD1step)
inline

◆ SetDetectorField()

G4bool G4FieldManager::SetDetectorField ( G4Field detectorField)

Definition at line 102 of file G4FieldManager.cc.

103{
104 fDetectorField= pDetectorField;
105
106 if ( pDetectorField )
107 fFieldChangesEnergy= pDetectorField->DoesFieldChangeEnergy();
108 else
109 fFieldChangesEnergy= false; // No field
110
111 return false;
112}

◆ SetFieldChangesEnergy()

void G4FieldManager::SetFieldChangesEnergy ( G4bool  value)
inline

◆ SetMaximumEpsilonStep()

void G4FieldManager::SetMaximumEpsilonStep ( G4double  newEpsMax)
inline

◆ SetMinimumEpsilonStep()

void G4FieldManager::SetMinimumEpsilonStep ( G4double  newEpsMin)
inline

The documentation for this class was generated from the following files: