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

#include <ExN04Field.hh>

Inheritance diagram for ExN04Field:
Collaboration diagram for ExN04Field:

Public Member Functions

 ExN04Field ()
 
 ~ExN04Field ()
 
void GetFieldValue (const double Point[3], double *Bfield) const
 
 ExN04Field ()
 
 ~ExN04Field ()
 
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 ExN04Field.hh.

Constructor & Destructor Documentation

ExN04Field::ExN04Field ( )

Definition at line 36 of file ExN04Field.cc.

37 {
38  fBz = 3.0*tesla;
39  frmax_sq = sqr(50.*cm);
40  fzmax = 100.*cm;
41 }
static constexpr double tesla
Definition: G4SIunits.hh:268
static constexpr double cm
Definition: G4SIunits.hh:119
T sqr(const T &x)
Definition: templates.hh:145

Here is the call graph for this function:

ExN04Field::~ExN04Field ( )

Definition at line 44 of file ExN04Field.cc.

45 {
46 }
ExN04Field::ExN04Field ( )
ExN04Field::~ExN04Field ( )

Member Function Documentation

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

Definition at line 49 of file ExN04Field.cc.

50 {
51  Bfield[0] = 0.;
52  Bfield[1] = 0.;
53  if ( std::abs(Point[2]) < fzmax &&
54  (sqr(Point[0])+sqr(Point[1])) < frmax_sq ) {
55  Bfield[2] = fBz;
56  } else {
57  Bfield[2] = 0.;
58  }
59 }
T sqr(const T &x)
Definition: templates.hh:145

Here is the call graph for this function:

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

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