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

Magnetic field. More...

#include <B5MagneticField.hh>

Inheritance diagram for B5MagneticField:
Collaboration diagram for B5MagneticField:

Public Member Functions

 B5MagneticField ()
 
virtual ~B5MagneticField ()
 
virtual void GetFieldValue (const G4double point[4], double *bField) const
 
void SetField (G4double val)
 
G4double GetField () const
 
- Public Member Functions inherited from G4MagneticField
 G4MagneticField ()
 
virtual ~G4MagneticField ()
 
 G4MagneticField (const G4MagneticField &r)
 
G4MagneticFieldoperator= (const G4MagneticField &p)
 
G4bool DoesFieldChangeEnergy () const
 
- Public Member Functions inherited from G4ElectroMagneticField
 G4ElectroMagneticField ()
 
virtual ~G4ElectroMagneticField ()
 
 G4ElectroMagneticField (const G4ElectroMagneticField &r)
 
G4ElectroMagneticFieldoperator= (const G4ElectroMagneticField &p)
 
- 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)
 
virtual G4FieldClone () const
 

Detailed Description

Magnetic field.

Definition at line 41 of file B5MagneticField.hh.

Constructor & Destructor Documentation

B5MagneticField::B5MagneticField ( )

Definition at line 39 of file B5MagneticField.cc.

40 : G4MagneticField(),
41  fMessenger(nullptr), fBy(1.0*tesla)
42 {
43  // define commands for this class
44  DefineCommands();
45 }
static constexpr double tesla
Definition: G4SIunits.hh:268
B5MagneticField::~B5MagneticField ( )
virtual

Definition at line 49 of file B5MagneticField.cc.

50 {
51  delete fMessenger;
52 }

Member Function Documentation

G4double B5MagneticField::GetField ( ) const
inline

Definition at line 50 of file B5MagneticField.hh.

50 { return fBy; }
void B5MagneticField::GetFieldValue ( const G4double  point[4],
double *  bField 
) const
virtual

Implements G4MagneticField.

Definition at line 54 of file B5MagneticField.cc.

55 {
56  bField[0] = 0.;
57  bField[1] = fBy;
58  bField[2] = 0.;
59 }
void B5MagneticField::SetField ( G4double  val)
inline

Definition at line 49 of file B5MagneticField.hh.

49 { fBy = val; }

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