G4UniformGravityField Class Reference

#include <G4UniformGravityField.hh>

Inheritance diagram for G4UniformGravityField:

G4Field

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

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.

00045   : G4Field ( true ) //  Gravity flag *on*
00046 {
00047       fFieldComponents[0] = FieldVector.x();
00048       fFieldComponents[1] = FieldVector.y();
00049       fFieldComponents[2] = FieldVector.z();
00050 }

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

Definition at line 53 of file G4UniformGravityField.cc.

00054   : G4Field ( true ) 
00055 {
00056       fFieldComponents[0] = 0.0;
00057       fFieldComponents[1] = gy;
00058       fFieldComponents[2] = 0.0;
00059 }

G4UniformGravityField::~G4UniformGravityField (  )  [virtual]

Definition at line 61 of file G4UniformGravityField.cc.

00062 {
00063 }

G4UniformGravityField::G4UniformGravityField ( const G4UniformGravityField p  ) 

Definition at line 65 of file G4UniformGravityField.cc.

References fFieldComponents.

00066    : G4Field(p)
00067 {
00068    for (G4int i=0; i<3; i++)
00069       fFieldComponents[i] = p.fFieldComponents[i];
00070 }


Member Function Documentation

G4bool G4UniformGravityField::DoesFieldChangeEnergy (  )  const [inline, virtual]

Implements G4Field.

Definition at line 68 of file G4UniformGravityField.hh.

00068 { return true; }

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

Implements G4Field.

Definition at line 84 of file G4UniformGravityField.cc.

00086 {
00087    G[0]= fFieldComponents[0] ;
00088    G[1]= fFieldComponents[1] ;
00089    G[2]= fFieldComponents[2] ;
00090 }

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

Definition at line 73 of file G4UniformGravityField.cc.

References fFieldComponents.

00074 {
00075    // G4Field::SetGravityActive( p.IsGravityActive ); 
00076 
00077    for (G4int i=0; i<3; i++)
00078       fFieldComponents[i] = p.fFieldComponents[i];
00079    return *this;
00080 }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:53:37 2013 for Geant4 by  doxygen 1.4.7