Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4UniformGravityField Class Reference

#include <G4UniformGravityField.hh>

Inheritance diagram for G4UniformGravityField:
Collaboration diagram for G4UniformGravityField:

Public Member Functions

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

Detailed Description

Definition at line 52 of file G4UniformGravityField.hh.

Constructor & Destructor Documentation

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 x() const
double z() const
double y() const
G4Field(G4bool gravityOn=false)
Definition: G4Field.cc:33

Here is the call graph for this function:

Here is the caller graph for this function:

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

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 }
G4Field(G4bool gravityOn=false)
Definition: G4Field.cc:33
G4UniformGravityField::~G4UniformGravityField ( )
virtual

Definition at line 68 of file G4UniformGravityField.cc.

69 {
70 }
G4UniformGravityField::G4UniformGravityField ( const G4UniformGravityField p)

Definition at line 72 of file G4UniformGravityField.cc.

73  : G4Field(p)
74 {
75  for (G4int i=0; i<3; i++)
76  {
77  fFieldComponents[i] = p.fFieldComponents[i];
78  }
79 }
int G4int
Definition: G4Types.hh:78
G4Field(G4bool gravityOn=false)
Definition: G4Field.cc:33

Member Function Documentation

G4Field * G4UniformGravityField::Clone ( ) const
virtual

Reimplemented from G4Field.

Definition at line 61 of file G4UniformGravityField.cc.

62 {
63  return new G4UniformGravityField( G4ThreeVector(fFieldComponents[0],
64  fFieldComponents[1],
65  fFieldComponents[2]) );
66 }
CLHEP::Hep3Vector G4ThreeVector
G4UniformGravityField(const G4ThreeVector FieldVector)

Here is the call graph for this function:

G4bool G4UniformGravityField::DoesFieldChangeEnergy ( ) const
inlinevirtual

Implements G4Field.

Definition at line 68 of file G4UniformGravityField.hh.

68 { return true; }
void G4UniformGravityField::GetFieldValue ( const G4double  Point[4],
G4double field 
) const
virtual

Implements G4Field.

Definition at line 95 of file G4UniformGravityField.cc.

97 {
98  G[0]= fFieldComponents[0] ;
99  G[1]= fFieldComponents[1] ;
100  G[2]= fFieldComponents[2] ;
101 }
G4UniformGravityField & G4UniformGravityField::operator= ( const G4UniformGravityField p)

Definition at line 82 of file G4UniformGravityField.cc.

83 {
84  if (&p == this) return *this;
86  for (G4int i=0; i<3; i++)
87  {
88  fFieldComponents[i] = p.fFieldComponents[i];
89  }
90  return *this;
91 }
int G4int
Definition: G4Types.hh:78
G4Field & operator=(const G4Field &p)
Definition: G4Field.cc:42

Here is the call graph for this function:


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