Public Member Functions | Private Attributes | List of all members
EDepSim::UniformField Class Reference

#include <EDepSimUniformField.hh>

Inheritance diagram for EDepSim::UniformField:

Public Member Functions

 UniformField ()
 
 UniformField (const G4ThreeVector bField)
 
 UniformField (const G4ThreeVector bField, const G4ThreeVector eField)
 Define a uniform magnetic and electric field. More...
 
virtual ~UniformField ()
 
 UniformField (const UniformField &p)
 
UniformFieldoperator= (const UniformField &p)
 
virtual void GetFieldValue (const G4double pos[4], G4double *field) const
 
virtual void SetBField (const G4ThreeVector bField)
 
virtual void SetEField (const G4ThreeVector eField)
 

Private Attributes

G4double fFieldComponents [6]
 

Detailed Description

Definition at line 52 of file EDepSimUniformField.hh.

Constructor & Destructor Documentation

EDepSim::UniformField::UniformField ( )

Definition at line 40 of file EDepSimUniformField.cc.

41 {
42  fFieldComponents[0] = 0.0;
43  fFieldComponents[1] = 0.0;
44  fFieldComponents[2] = 0.0;
45  fFieldComponents[3] = 0.0;
46  fFieldComponents[4] = 0.0;
47  fFieldComponents[5] = 0.0;
48 }
EDepSim::UniformField::UniformField ( const G4ThreeVector  bField)

Define a uniform magnetic field. The electric field will be set to zero. This is equivalent to G4UniformMagneticField().

Definition at line 62 of file EDepSimUniformField.cc.

64 {
65  fFieldComponents[0] = bField.x();
66  fFieldComponents[1] = bField.y();
67  fFieldComponents[2] = bField.z();
68  fFieldComponents[3] = 0.0;
69  fFieldComponents[4] = 0.0;
70  fFieldComponents[5] = 0.0;
71 }
EDepSim::UniformField::UniformField ( const G4ThreeVector  bField,
const G4ThreeVector  eField 
)

Define a uniform magnetic and electric field.

Definition at line 50 of file EDepSimUniformField.cc.

53 {
54  fFieldComponents[0] = bField.x();
55  fFieldComponents[1] = bField.y();
56  fFieldComponents[2] = bField.z();
57  fFieldComponents[3] = eField.x();
58  fFieldComponents[4] = eField.y();
59  fFieldComponents[5] = eField.z();
60 }
EDepSim::UniformField::~UniformField ( )
virtual

Definition at line 73 of file EDepSimUniformField.cc.

74 {
75 }
EDepSim::UniformField::UniformField ( const UniformField p)

Definition at line 77 of file EDepSimUniformField.cc.

78  : G4ElectricField(p)
79 {
80  for (G4int i=0; i<6; i++) {
81  fFieldComponents[i] = p.fFieldComponents[i];
82  }
83 }
p
Definition: test.py:223

Member Function Documentation

void EDepSim::UniformField::GetFieldValue ( const G4double  pos[4],
G4double *  field 
) const
virtual

Provide the field value at a point [x,y,z,t]. The field follows the G4 standard so that the magnetic field is in field[0], field[1], and field[2] while the electric field is in field[3], field[3], and field[5].

Definition at line 96 of file EDepSimUniformField.cc.

98 {
99  for (G4int i=0; i<6; ++i) {
100  fieldBandE[i] = fFieldComponents[i];
101  }
102 }
EDepSim::UniformField & EDepSim::UniformField::operator= ( const UniformField p)

Definition at line 86 of file EDepSimUniformField.cc.

87 {
88  for (G4int i=0; i<6; i++) {
89  fFieldComponents[i] = p.fFieldComponents[i];
90  }
91  return *this;
92 }
p
Definition: test.py:223
void EDepSim::UniformField::SetBField ( const G4ThreeVector  bField)
virtual

Definition at line 104 of file EDepSimUniformField.cc.

105 {
106  fFieldComponents[0] = bField.x();
107  fFieldComponents[1] = bField.y();
108  fFieldComponents[2] = bField.z();
109 }
void EDepSim::UniformField::SetEField ( const G4ThreeVector  eField)
virtual

Definition at line 111 of file EDepSimUniformField.cc.

112 {
113  fFieldComponents[3] = eField.x();
114  fFieldComponents[4] = eField.y();
115  fFieldComponents[5] = eField.z();
116 }

Member Data Documentation

G4double EDepSim::UniformField::fFieldComponents[6]
private

The field components follows the G4 standard so that the magnetic field is in [0], [1], and [2] while the electric field is in [3], [4], and [5].

Definition at line 85 of file EDepSimUniformField.hh.


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