Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4QuadrupoleMagField Class Reference

#include <G4QuadrupoleMagField.hh>

+ Inheritance diagram for G4QuadrupoleMagField:

Public Member Functions

 G4QuadrupoleMagField (G4double pGradient)
 
 G4QuadrupoleMagField (G4double pGradient, G4ThreeVector pOrigin, G4RotationMatrix *pMatrix)
 
 ~G4QuadrupoleMagField ()
 
void GetFieldValue (const G4double yTrack[], G4double B[]) 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)
 
virtual void GetFieldValue (const G4double Point[4], G4double *Bfield) const =0
 
virtual G4bool DoesFieldChangeEnergy () const =0
 
- Public Member Functions inherited from G4Field
virtual void GetFieldValue (const double Point[4], double *fieldArr) const =0
 
 G4Field (G4bool gravityOn=false)
 
 G4Field (const G4Field &)
 
virtual ~G4Field ()
 
G4Fieldoperator= (const G4Field &p)
 
virtual G4bool DoesFieldChangeEnergy () const =0
 
G4bool IsGravityActive () const
 
void SetGravityActive (G4bool OnOffFlag)
 

Detailed Description

Definition at line 54 of file G4QuadrupoleMagField.hh.

Constructor & Destructor Documentation

◆ G4QuadrupoleMagField() [1/2]

G4QuadrupoleMagField::G4QuadrupoleMagField ( G4double  pGradient)

Definition at line 36 of file G4QuadrupoleMagField.cc.

37{
38
39 fGradient = pGradient ;
40 fOrigin = G4ThreeVector( 0.0, 0.0, 0.0) ;
41 fpMatrix = &IdentityMatrix;
42}
CLHEP::Hep3Vector G4ThreeVector

◆ G4QuadrupoleMagField() [2/2]

G4QuadrupoleMagField::G4QuadrupoleMagField ( G4double  pGradient,
G4ThreeVector  pOrigin,
G4RotationMatrix pMatrix 
)

Definition at line 46 of file G4QuadrupoleMagField.cc.

48{
49 fGradient = pGradient ;
50 fOrigin = pOrigin ;
51 fpMatrix = pMatrix ;
52}

◆ ~G4QuadrupoleMagField()

G4QuadrupoleMagField::~G4QuadrupoleMagField ( )

Definition at line 56 of file G4QuadrupoleMagField.cc.

57{
58}

Member Function Documentation

◆ GetFieldValue()

void G4QuadrupoleMagField::GetFieldValue ( const G4double  yTrack[],
G4double  B[] 
) const

Definition at line 64 of file G4QuadrupoleMagField.cc.

66{
67
69 y[0] - fOrigin.x(),
70 y[1] - fOrigin.y(),
71 y[2] - fOrigin.z());
72
74 fpMatrix->colX() * r_global,
75 fpMatrix->colY() * r_global,
76 fpMatrix->colZ() * r_global);
77
79 fGradient * r_local.y(),
80 fGradient * r_local.x(),
81 0);
82
84 fpMatrix->inverse().rowX() * B_local,
85 fpMatrix->inverse().rowY() * B_local,
86 fpMatrix->inverse().rowZ() * B_local);
87
88 B[0] = B_global.x() ;
89 B[1] = B_global.y() ;
90 B[2] = B_global.z() ;
91}
double z() const
double x() const
double y() const
Hep3Vector colX() const
HepRotation inverse() const
Hep3Vector rowY() const
Hep3Vector colY() const
Hep3Vector colZ() const
Hep3Vector rowX() const
Hep3Vector rowZ() const

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