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

#include <G4UniformGravityField.hh>

+ Inheritance diagram for G4UniformGravityField:

Public Member Functions

 G4UniformGravityField (const G4ThreeVector FieldVector)
 
 G4UniformGravityField (const G4double gy=-9.81 *CLHEP::m/CLHEP::s/CLHEP::s/CLHEP::c_light)
 
virtual ~G4UniformGravityField ()
 
 G4UniformGravityField (const G4UniformGravityField &p)
 
G4UniformGravityFieldoperator= (const G4UniformGravityField &p)
 
G4bool DoesFieldChangeEnergy () const
 
virtual void GetFieldValue (const G4double Point[4], G4double *field) const
 
- Public Member Functions inherited from G4Field
virtual void GetFieldValue (const double Point[4], double *fieldArr) const =0
 
 G4Field (G4bool gravityOn=false)
 
 G4Field (const G4Field &)
 
virtual ~G4Field ()
 
G4Fieldoperator= (const G4Field &p)
 
virtual G4bool DoesFieldChangeEnergy () const =0
 
G4bool IsGravityActive () const
 
void SetGravityActive (G4bool OnOffFlag)
 

Detailed Description

Definition at line 52 of file G4UniformGravityField.hh.

Constructor & Destructor Documentation

◆ G4UniformGravityField() [1/3]

G4UniformGravityField::G4UniformGravityField ( const G4ThreeVector  FieldVector)

Definition at line 44 of file G4UniformGravityField.cc.

45 : G4Field ( true ) // Gravity flag *on*
46{
47 fFieldComponents[0] = FieldVector.x();
48 fFieldComponents[1] = FieldVector.y();
49 fFieldComponents[2] = FieldVector.z();
50}
double z() const
double x() const
double y() const

◆ G4UniformGravityField() [2/3]

G4UniformGravityField::G4UniformGravityField ( const G4double  gy = -9.81*CLHEP::m/CLHEP::s/CLHEP::s/CLHEP::c_light)

Definition at line 53 of file G4UniformGravityField.cc.

54 : G4Field ( true )
55{
56 fFieldComponents[0] = 0.0;
57 fFieldComponents[1] = gy;
58 fFieldComponents[2] = 0.0;
59}

◆ ~G4UniformGravityField()

G4UniformGravityField::~G4UniformGravityField ( )
virtual

Definition at line 61 of file G4UniformGravityField.cc.

62{
63}

◆ G4UniformGravityField() [3/3]

G4UniformGravityField::G4UniformGravityField ( const G4UniformGravityField p)

Definition at line 65 of file G4UniformGravityField.cc.

66 : G4Field(p)
67{
68 for (G4int i=0; i<3; i++)
69 fFieldComponents[i] = p.fFieldComponents[i];
70}
int G4int
Definition: G4Types.hh:66

Member Function Documentation

◆ DoesFieldChangeEnergy()

G4bool G4UniformGravityField::DoesFieldChangeEnergy ( ) const
inlinevirtual

Implements G4Field.

Definition at line 68 of file G4UniformGravityField.hh.

68{ return true; }

◆ GetFieldValue()

void G4UniformGravityField::GetFieldValue ( const G4double  Point[4],
G4double field 
) const
virtual

Implements G4Field.

Definition at line 84 of file G4UniformGravityField.cc.

86{
87 G[0]= fFieldComponents[0] ;
88 G[1]= fFieldComponents[1] ;
89 G[2]= fFieldComponents[2] ;
90}

◆ operator=()

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

Definition at line 73 of file G4UniformGravityField.cc.

74{
75 // G4Field::SetGravityActive( p.IsGravityActive );
76
77 for (G4int i=0; i<3; i++)
78 fFieldComponents[i] = p.fFieldComponents[i];
79 return *this;
80}

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