Geant4 11.1.1
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 p)

Definition at line 49 of file G4Field.cc.

50 : fGravityActive(p.fGravityActive)
51{
52}

◆ ~G4Field()

G4Field::~G4Field ( )
virtual

Definition at line 38 of file G4Field.cc.

39{
40}

Member Function Documentation

◆ Clone()

G4Field * G4Field::Clone ( ) const
virtual

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

Definition at line 54 of file G4Field.cc.

55{
57 msg << "Derived class does not implement cloning,\n"
58 << "but Clone method called.\n"
59 << "Cannot continue;";
60 G4Exception("G4Field::Clone", "GeomField004", FatalException,msg );
61 return nullptr;
62}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:59
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:40

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 42 of file G4Field.cc.

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

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

constexpr 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: