Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
RE01Field Class Reference

#include <RE01Field.hh>

Inheritance diagram for RE01Field:
G4MagneticField G4ElectroMagneticField G4Field

Public Member Functions

 RE01Field ()
 
virtual ~RE01Field ()
 
virtual void GetFieldValue (const double point[3], double *bfield) const
 
- Public Member Functions inherited from G4MagneticField
 G4MagneticField ()
 
virtual ~G4MagneticField ()
 
 G4MagneticField (const G4MagneticField &r)
 
G4MagneticFieldoperator= (const G4MagneticField &p)
 
G4bool DoesFieldChangeEnergy () const
 
virtual void GetFieldValue (const G4double Point[4], G4double *Bfield) const =0
 
- 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

Definition at line 38 of file RE01Field.hh.

Constructor & Destructor Documentation

RE01Field::RE01Field ( )

Definition at line 36 of file RE01Field.cc.

References python.hepunit::cm, sqr(), and python.hepunit::tesla.

38 {
39  fBz = 3.0*tesla;
40  fRmax_sq = sqr(50.*cm);
41  fZmax = 100.*cm;
42 }
T sqr(const T &x)
Definition: templates.hh:145
RE01Field::~RE01Field ( )
virtual

Definition at line 45 of file RE01Field.cc.

46 {;}

Member Function Documentation

void RE01Field::GetFieldValue ( const double  point[3],
double *  bfield 
) const
virtual

Definition at line 49 of file RE01Field.cc.

References sqr().

50 {
51  bfield[0] = 0.;
52  bfield[1] = 0.;
53  if(std::abs(point[2])<fZmax && (sqr(point[0])+sqr(point[1]))<fRmax_sq)
54  { bfield[2] = fBz; }
55  else
56  { bfield[2] = 0.; }
57 }
T sqr(const T &x)
Definition: templates.hh:145

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