Geant4-11
Public Member Functions | Static Public Attributes | Private Attributes
PyG4MagneticField Class Referenceabstract
Inheritance diagram for PyG4MagneticField:
G4MagneticField G4Field pyG4MagneticField::CB_PyG4MagneticField

Public Member Functions

virtual G4FieldClone () const
 
G4bool DoesFieldChangeEnergy () const
 
virtual void GetFieldValue (const G4double Point[4], G4double *Bfield) const
 
virtual G4ThreeVector GetFieldValue (const G4ThreeVector &pos, const G4double time) const =0
 
G4bool IsGravityActive () const
 
 PyG4MagneticField ()
 
void SetGravityActive (G4bool OnOffFlag)
 
 ~PyG4MagneticField ()
 

Static Public Attributes

static constexpr G4int MAX_NUMBER_OF_COMPONENTS = 24
 

Private Attributes

G4bool fGravityActive = false
 

Detailed Description

Definition at line 41 of file pyG4MagneticField.cc.

Constructor & Destructor Documentation

◆ PyG4MagneticField()

PyG4MagneticField::PyG4MagneticField ( )
inline

Definition at line 43 of file pyG4MagneticField.cc.

43{ }

◆ ~PyG4MagneticField()

PyG4MagneticField::~PyG4MagneticField ( )
inline

Definition at line 44 of file pyG4MagneticField.cc.

44{ }

Member Function Documentation

◆ Clone()

G4Field * G4Field::Clone ( ) const
virtualinherited

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:35
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:40

References FatalException, and G4Exception().

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

◆ DoesFieldChangeEnergy()

G4bool G4MagneticField::DoesFieldChangeEnergy ( ) const
inlinevirtualinherited

Implements G4Field.

Definition at line 52 of file G4MagneticField.hh.

52{ return false; }

Referenced by export_G4MagneticField().

◆ GetFieldValue() [1/2]

virtual void PyG4MagneticField::GetFieldValue ( const G4double  Point[4],
G4double Bfield 
) const
inlinevirtual

Implements G4MagneticField.

Reimplemented in pyG4MagneticField::CB_PyG4MagneticField.

Definition at line 49 of file pyG4MagneticField.cc.

50 {
51
52 const G4ThreeVector& bfield=
53 GetFieldValue(G4ThreeVector(Point[0], Point[1], Point[2]), Point[3]);
54
55 Bfield[0]= bfield.x();
56 Bfield[1]= bfield.y();
57 Bfield[2]= bfield.z();
58 }
CLHEP::Hep3Vector G4ThreeVector
double z() const
double x() const
double y() const
virtual G4ThreeVector GetFieldValue(const G4ThreeVector &pos, const G4double time) const =0

References GetFieldValue(), CLHEP::Hep3Vector::x(), CLHEP::Hep3Vector::y(), and CLHEP::Hep3Vector::z().

◆ GetFieldValue() [2/2]

virtual G4ThreeVector PyG4MagneticField::GetFieldValue ( const G4ThreeVector pos,
const G4double  time 
) const
pure virtual

◆ IsGravityActive()

G4bool G4Field::IsGravityActive ( ) const
inlineinherited

Definition at line 101 of file G4Field.hh.

102{
103 return fGravityActive;
104}
G4bool fGravityActive
Definition: G4Field.hh:96

References G4Field::fGravityActive.

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

◆ SetGravityActive()

void G4Field::SetGravityActive ( G4bool  OnOffFlag)
inlineinherited

Definition at line 106 of file G4Field.hh.

107{
108 fGravityActive = OnOffFlag;
109}

References G4Field::fGravityActive.

Field Documentation

◆ fGravityActive

G4bool G4Field::fGravityActive = false
privateinherited

◆ MAX_NUMBER_OF_COMPONENTS

constexpr G4int G4Field::MAX_NUMBER_OF_COMPONENTS = 24
staticconstexprinherited

Definition at line 92 of file G4Field.hh.

Referenced by G4BFieldIntegrationDriver::CurvatureRadius().


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