Geant4-11
Public Member Functions | Static Public Attributes | Private Attributes
G4TQuadrupoleMagField Class Referenceabstract

#include <G4TQuadrupoleMagField.hh>

Inheritance diagram for G4TQuadrupoleMagField:
G4MagneticField G4Field

Public Member Functions

G4TQuadrupoleMagFieldClone () const
 
G4bool DoesFieldChangeEnergy () const
 
 G4TQuadrupoleMagField (G4double pGradient)
 
 G4TQuadrupoleMagField (G4double pGradient, G4ThreeVector pOrigin, G4RotationMatrix *pMatrix)
 
virtual void GetFieldValue (const G4double Point[4], G4double *Bfield) const =0
 
void GetFieldValue (const G4double y[7], G4double B[3]) const
 
G4bool IsGravityActive () const
 
void SetGravityActive (G4bool OnOffFlag)
 
virtual ~G4TQuadrupoleMagField ()
 

Static Public Attributes

static constexpr G4int MAX_NUMBER_OF_COMPONENTS = 24
 

Private Attributes

G4double fGradient
 
G4bool fGravityActive = false
 
G4ThreeVector fOrigin
 
G4RotationMatrixfpMatrix
 

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) ;
57 }
static G4RotationMatrix IdentityMatrix
CLHEP::Hep3Vector G4ThreeVector

References fGradient, fOrigin, fpMatrix, and IdentityMatrix.

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 }

References fGradient, fOrigin, and fpMatrix.

◆ ~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)

References fGradient, fOrigin, fpMatrix, and G4TQuadrupoleMagField().

◆ DoesFieldChangeEnergy()

G4bool G4MagneticField::DoesFieldChangeEnergy ( ) const
inlinevirtualinherited

Implements G4Field.

Definition at line 52 of file G4MagneticField.hh.

52{ return false; }

Referenced by export_G4MagneticField().

◆ GetFieldValue() [1/2]

virtual void G4MagneticField::GetFieldValue ( const G4double  Point[4],
G4double Bfield 
) const
pure virtualinherited

◆ GetFieldValue() [2/2]

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

References B(), CLHEP::HepRotation::colX(), CLHEP::HepRotation::colY(), CLHEP::HepRotation::colZ(), fGradient, fOrigin, fpMatrix, CLHEP::HepRotation::inverse(), CLHEP::HepRotation::rowX(), CLHEP::HepRotation::rowY(), CLHEP::HepRotation::rowZ(), CLHEP::Hep3Vector::x(), CLHEP::Hep3Vector::y(), and CLHEP::Hep3Vector::z().

◆ IsGravityActive()

G4bool G4Field::IsGravityActive ( ) const
inlineinherited

Definition at line 101 of file G4Field.hh.

102{
103 return fGravityActive;
104}
G4bool fGravityActive
Definition: G4Field.hh:96

References G4Field::fGravityActive.

Referenced by G4CoupledTransportation::AlongStepGetPhysicalInteractionLength(), and G4RepleteEofM::G4RepleteEofM().

◆ SetGravityActive()

void G4Field::SetGravityActive ( G4bool  OnOffFlag)
inlineinherited

Definition at line 106 of file G4Field.hh.

107{
108 fGravityActive = OnOffFlag;
109}

References G4Field::fGravityActive.

Field Documentation

◆ fGradient

G4double G4TQuadrupoleMagField::fGradient
private

Definition at line 108 of file G4TQuadrupoleMagField.hh.

Referenced by Clone(), G4TQuadrupoleMagField(), and GetFieldValue().

◆ fGravityActive

G4bool G4Field::fGravityActive = false
privateinherited

◆ fOrigin

G4ThreeVector G4TQuadrupoleMagField::fOrigin
private

Definition at line 109 of file G4TQuadrupoleMagField.hh.

Referenced by Clone(), G4TQuadrupoleMagField(), and GetFieldValue().

◆ fpMatrix

G4RotationMatrix* G4TQuadrupoleMagField::fpMatrix
private

Definition at line 110 of file G4TQuadrupoleMagField.hh.

Referenced by Clone(), G4TQuadrupoleMagField(), and GetFieldValue().

◆ MAX_NUMBER_OF_COMPONENTS

constexpr G4int G4Field::MAX_NUMBER_OF_COMPONENTS = 24
staticconstexprinherited

Definition at line 92 of file G4Field.hh.

Referenced by G4BFieldIntegrationDriver::CurvatureRadius().


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