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

#include <RE05Field.hh>

Inheritance diagram for RE05Field:
G4MagneticField G4ElectroMagneticField G4Field

Public Member Functions

 RE05Field ()
 
virtual ~RE05Field ()
 
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 RE05Field.hh.

Constructor & Destructor Documentation

RE05Field::RE05Field ( )

Definition at line 35 of file RE05Field.cc.

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

36 {
37  Bz = 3.0*tesla;
38  rmax_sq = sqr(50.*cm);
39  zmax = 100.*cm;
40 }
T sqr(const T &x)
Definition: templates.hh:145
RE05Field::~RE05Field ( )
virtual

Definition at line 42 of file RE05Field.cc.

43 {;}

Member Function Documentation

void RE05Field::GetFieldValue ( const double  Point[3],
double *  Bfield 
) const
virtual

Definition at line 45 of file RE05Field.cc.

References sqr().

46 {
47  Bfield[0] = 0.;
48  Bfield[1] = 0.;
49  if(std::abs(Point[2])<zmax && (sqr(Point[0])+sqr(Point[1]))<rmax_sq)
50  { Bfield[2] = Bz; }
51  else
52  { Bfield[2] = 0.; }
53 }
T sqr(const T &x)
Definition: templates.hh:145

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