Geant4 VMC Version 6.6
Loading...
Searching...
No Matches
TG4Field Class Reference

The class for constructing magnetic, electromagnetic and gravity fields which strength is defined via TVirtualMagField. More...

#include <TG4Field.h>

Public Member Functions

 TG4Field (const TG4FieldParameters &parameters, TVirtualMagField *magField, G4LogicalVolume *lv=0)
 
 ~TG4Field ()
 
void Update (const TG4FieldParameters &parameters)
 
G4Field * GetG4Field () const
 
G4EquationOfMotionGetEquation () const
 
G4MagIntegratorStepper * GetStepper () const
 
G4VIntegrationDriver * GetIntegrationDriver () const
 

Private Member Functions

G4Field * CreateG4Field (const TG4FieldParameters &parameters, TVirtualMagField *magField)
 
G4EquationOfMotionCreateEquation (EquationType equation)
 
G4MagIntegratorStepper * CreateStepper (G4EquationOfMotion *equation, StepperType stepper)
 
G4VIntegrationDriver * CreateFSALStepperAndDriver (G4EquationOfMotion *equation, StepperType stepper, G4double minStep)
 

Private Attributes

G4Field * fG4Field
 Geant4 field.
 
TVirtualMagField * fVirtualMagField
 The associated TGeo magnetic field.
 
G4LogicalVolume * fLogicalVolume
 The associated volume (if local field)
 
G4EquationOfMotionfEquation
 The equation of motion.
 
G4MagIntegratorStepper * fStepper
 The magnetic integrator stepper.
 
G4VIntegrationDriver * fDriver
 The magnetic integrator driver.
 
G4ChordFinder * fChordFinder
 Chord finder.
 

Detailed Description

The class for constructing magnetic, electromagnetic and gravity fields which strength is defined via TVirtualMagField.

The equation of motion motion of a particle in a field and the integration method is set according to the selection in TG4FieldParameters, as well as other accuracy parameters. The default values in TG4FieldParameters correspond to defaults set in Geant4 (taken from Geant4 9.3 release.) As Geant4 classes to not provide access methods for these defaults, the defaults have to be checked with each new Geant4 release.

Author
I. Hrivnacova; IPN, Orsay

Definition at line 47 of file TG4Field.h.

Constructor & Destructor Documentation

◆ TG4Field()

TG4Field::TG4Field ( const TG4FieldParameters & parameters,
TVirtualMagField * magField,
G4LogicalVolume * lv = 0 )

Default constructor

Definition at line 68 of file TG4Field.cxx.

◆ ~TG4Field()

TG4Field::~TG4Field ( )

Destructor

Definition at line 89 of file TG4Field.cxx.

Member Function Documentation

◆ Update()

void TG4Field::Update ( const TG4FieldParameters & parameters)

Update field with new field parameters

Definition at line 322 of file TG4Field.cxx.

Referenced by TG4Field().

◆ GetG4Field()

G4Field * TG4Field::GetG4Field ( ) const
inline

Return the instantiated field

Definition at line 91 of file TG4Field.h.

Referenced by TG4GeometryManager::ConstructGlobalField().

◆ GetEquation()

G4EquationOfMotion * TG4Field::GetEquation ( ) const
inline

Return the equation of motion

Definition at line 97 of file TG4Field.h.

Referenced by TG4GeometryManager::ConstructGlobalField().

◆ GetStepper()

G4MagIntegratorStepper * TG4Field::GetStepper ( ) const
inline

Return the magnetic integrator stepper

Definition at line 103 of file TG4Field.h.

Referenced by TG4GeometryManager::ConstructGlobalField().

◆ GetIntegrationDriver()

G4VIntegrationDriver * TG4Field::GetIntegrationDriver ( ) const

◆ CreateG4Field()

G4Field * TG4Field::CreateG4Field ( const TG4FieldParameters & parameters,
TVirtualMagField * magField )
private

Create magnetic, electromagnetic or garvity field according to the provided field type

Definition at line 101 of file TG4Field.cxx.

Referenced by Update().

◆ CreateEquation()

G4EquationOfMotion * TG4Field::CreateEquation ( EquationType equation)
private

Set the equation of motion of a particle in a field

Definition at line 126 of file TG4Field.cxx.

Referenced by Update().

◆ CreateStepper()

G4MagIntegratorStepper * TG4Field::CreateStepper ( G4EquationOfMotion * equation,
StepperType stepper )
private

Set the integrator of particle's equation of motion

Definition at line 183 of file TG4Field.cxx.

Referenced by Update().

◆ CreateFSALStepperAndDriver()

G4VIntegrationDriver * TG4Field::CreateFSALStepperAndDriver ( G4EquationOfMotion * equation,
StepperType stepper,
G4double minStep )
private

Set the FSAL integrator of particle's equation of motion

Definition at line 292 of file TG4Field.cxx.

Referenced by Update().

Member Data Documentation

◆ fG4Field

G4Field* TG4Field::fG4Field
private

Geant4 field.

Definition at line 74 of file TG4Field.h.

Referenced by CreateEquation(), CreateG4Field(), GetG4Field(), and Update().

◆ fVirtualMagField

TVirtualMagField* TG4Field::fVirtualMagField
private

The associated TGeo magnetic field.

Definition at line 76 of file TG4Field.h.

Referenced by Update().

◆ fLogicalVolume

G4LogicalVolume* TG4Field::fLogicalVolume
private

The associated volume (if local field)

Definition at line 78 of file TG4Field.h.

Referenced by Update().

◆ fEquation

G4EquationOfMotion* TG4Field::fEquation
private

The equation of motion.

Definition at line 80 of file TG4Field.h.

Referenced by GetEquation(), and Update().

◆ fStepper

G4MagIntegratorStepper* TG4Field::fStepper
private

The magnetic integrator stepper.

Definition at line 82 of file TG4Field.h.

Referenced by GetStepper(), Update(), and ~TG4Field().

◆ fDriver

G4VIntegrationDriver* TG4Field::fDriver
private

The magnetic integrator driver.

Definition at line 84 of file TG4Field.h.

Referenced by Update().

◆ fChordFinder

G4ChordFinder* TG4Field::fChordFinder
private

Chord finder.

Definition at line 86 of file TG4Field.h.

Referenced by Update(), and ~TG4Field().


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