Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4Field Class Referenceabstract

#include <G4Field.hh>

+ Inheritance diagram for G4Field:

Public Member Functions

 G4Field (G4bool gravityOn=false)
 
 G4Field (const G4Field &)
 
virtual ~G4Field ()
 
G4Fieldoperator= (const G4Field &p)
 
virtual void GetFieldValue (const G4double Point[4], G4double *fieldArr) const =0
 
virtual G4bool DoesFieldChangeEnergy () const =0
 
G4bool IsGravityActive () const
 
void SetGravityActive (G4bool OnOffFlag)
 
virtual G4FieldClone () const
 

Static Public Attributes

static constexpr G4int MAX_NUMBER_OF_COMPONENTS = 24
 

Detailed Description

Definition at line 55 of file G4Field.hh.

Constructor & Destructor Documentation

◆ G4Field() [1/2]

G4Field::G4Field ( G4bool gravityOn = false)

Definition at line 33 of file G4Field.cc.

34 : fGravityActive( gravityOn )
35{
36}

◆ G4Field() [2/2]

G4Field::G4Field ( const G4Field & )
default

◆ ~G4Field()

G4Field::~G4Field ( )
virtualdefault

Member Function Documentation

◆ Clone()

G4Field * G4Field::Clone ( ) const
virtual

Reimplemented in G4CachedMagneticField, G4DELPHIMagField, G4HarmonicPolMagField, G4KM_DummyField, G4LineCurrentMagField, G4QuadrupoleMagField, G4SextupoleMagField, G4TCachedMagneticField< T_Field >, G4TQuadrupoleMagField, G4TUniformMagneticField, G4UniformElectricField, G4UniformGravityField, and G4UniformMagField.

Definition at line 49 of file G4Field.cc.

50{
52 msg << "Derived class does not implement cloning,\n"
53 << "but Clone method called.\n"
54 << "Cannot continue;";
55 G4Exception("G4Field::Clone", "GeomField004", FatalException,msg );
56 return nullptr;
57}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription

Referenced by G4CachedMagneticField::Clone(), and G4FieldManager::Clone().

◆ DoesFieldChangeEnergy()

virtual G4bool G4Field::DoesFieldChangeEnergy ( ) const
pure virtual

◆ GetFieldValue()

◆ IsGravityActive()

G4bool G4Field::IsGravityActive ( ) const
inline

Definition at line 101 of file G4Field.hh.

102{
103 return fGravityActive;
104}

Referenced by G4CoupledTransportation::AlongStepGetPhysicalInteractionLength(), and G4RepleteEofM::G4RepleteEofM().

◆ operator=()

G4Field & G4Field::operator= ( const G4Field & p)

Definition at line 40 of file G4Field.cc.

41{
42 if (&p == this) { return *this; }
43 fGravityActive= p.fGravityActive;
44 return *this;
45}

Referenced by G4ElectroMagneticField::operator=(), G4MagneticField::operator=(), and G4UniformGravityField::operator=().

◆ SetGravityActive()

void G4Field::SetGravityActive ( G4bool OnOffFlag)
inline

Definition at line 106 of file G4Field.hh.

107{
108 fGravityActive = OnOffFlag;
109}

Member Data Documentation

◆ MAX_NUMBER_OF_COMPONENTS

G4int G4Field::MAX_NUMBER_OF_COMPONENTS = 24
staticconstexpr

Definition at line 92 of file G4Field.hh.


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