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

#include <G4TQuadrupoleMagField.hh>

+ Inheritance diagram for G4TQuadrupoleMagField:

Public Member Functions

 G4TQuadrupoleMagField (G4double pGradient)
 
 G4TQuadrupoleMagField (G4double pGradient, G4ThreeVector pOrigin, G4RotationMatrix *pMatrix)
 
virtual ~G4TQuadrupoleMagField ()
 
void GetFieldValue (const G4double y[7], G4double B[3]) const
 
G4TQuadrupoleMagFieldClone () const
 
- Public Member Functions inherited from G4MagneticField
 G4MagneticField ()
 
 ~G4MagneticField () override
 
 G4MagneticField (const G4MagneticField &r)
 
G4MagneticFieldoperator= (const G4MagneticField &p)
 
G4bool DoesFieldChangeEnergy () const override
 
void GetFieldValue (const G4double Point[4], G4double *Bfield) const override=0
 
- 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)
 

Additional Inherited Members

- Static Public Attributes inherited from G4Field
static constexpr G4int MAX_NUMBER_OF_COMPONENTS = 24
 

Detailed Description

Definition at line 48 of file G4TQuadrupoleMagField.hh.

Constructor & Destructor Documentation

◆ G4TQuadrupoleMagField() [1/2]

G4TQuadrupoleMagField::G4TQuadrupoleMagField ( G4double pGradient)
inline

Definition at line 52 of file G4TQuadrupoleMagField.hh.

53 {
54 fGradient = pGradient ;
55 fOrigin = G4ThreeVector( 0.0, 0.0, 0.0) ;
56 fpMatrix = &IdentityMatrix;
57 }
CLHEP::Hep3Vector G4ThreeVector

Referenced by Clone().

◆ G4TQuadrupoleMagField() [2/2]

G4TQuadrupoleMagField::G4TQuadrupoleMagField ( G4double pGradient,
G4ThreeVector pOrigin,
G4RotationMatrix * pMatrix )
inline

Definition at line 59 of file G4TQuadrupoleMagField.hh.

62 {
63 fGradient = pGradient ;
64 fOrigin = pOrigin ;
65 fpMatrix = pMatrix ;
66 }

◆ ~G4TQuadrupoleMagField()

virtual G4TQuadrupoleMagField::~G4TQuadrupoleMagField ( )
inlinevirtual

Definition at line 68 of file G4TQuadrupoleMagField.hh.

68{;}

Member Function Documentation

◆ Clone()

G4TQuadrupoleMagField * G4TQuadrupoleMagField::Clone ( ) const
inlinevirtual

Reimplemented from G4Field.

Definition at line 98 of file G4TQuadrupoleMagField.hh.

99 {
100 //TODO: Can the fpMatrix be shared??
101 return new G4TQuadrupoleMagField(this->fGradient,
102 this->fOrigin,
103 this->fpMatrix);
104 }
G4TQuadrupoleMagField(G4double pGradient)

◆ GetFieldValue()

void G4TQuadrupoleMagField::GetFieldValue ( const G4double y[7],
G4double B[3] ) const
inline

Definition at line 70 of file G4TQuadrupoleMagField.hh.

72 {
74 y[0] - fOrigin.x(),
75 y[1] - fOrigin.y(),
76 y[2] - fOrigin.z());
77
79 fpMatrix->colX() * r_global,
80 fpMatrix->colY() * r_global,
81 fpMatrix->colZ() * r_global);
82
84 fGradient * r_local.y(),
85 fGradient * r_local.x(),
86 0);
87
89 fpMatrix->inverse().rowX() * B_local,
90 fpMatrix->inverse().rowY() * B_local,
91 fpMatrix->inverse().rowZ() * B_local);
92
93 B[0] = B_global.x() ;
94 B[1] = B_global.y() ;
95 B[2] = B_global.z() ;
96 }
G4double B(G4double temperature)
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 file: