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

#include <G4SextupoleMagField.hh>

Inheritance diagram for G4SextupoleMagField:
G4MagneticField G4Field

Public Member Functions

G4FieldClone () const
 
G4bool DoesFieldChangeEnergy () const
 
 G4SextupoleMagField (G4double pGradient)
 
 G4SextupoleMagField (G4double pGradient, G4ThreeVector pOrigin, G4RotationMatrix *pMatrix)
 
virtual void GetFieldValue (const G4double Point[4], G4double *Bfield) const =0
 
void GetFieldValue (const G4double yTrack[], G4double B[]) const
 
G4bool IsGravityActive () const
 
void SetGravityActive (G4bool OnOffFlag)
 
 ~G4SextupoleMagField ()
 

Static Public Attributes

static constexpr G4int MAX_NUMBER_OF_COMPONENTS = 24
 

Private Attributes

G4double fGradient = 0.0
 
G4bool fGravityActive = false
 
G4ThreeVector fOrigin = G4ThreeVector(0.0, 0.0, 0.0)
 
G4RotationMatrixfpMatrix = nullptr
 

Detailed Description

Definition at line 45 of file G4SextupoleMagField.hh.

Constructor & Destructor Documentation

◆ G4SextupoleMagField() [1/2]

G4SextupoleMagField::G4SextupoleMagField ( G4double  pGradient)

Definition at line 40 of file G4SextupoleMagField.cc.

41{
42 fGradient = pGradient;
44}
static G4RotationMatrix IdentityMatrix
G4RotationMatrix * fpMatrix

References fGradient, fpMatrix, and IdentityMatrix.

Referenced by Clone().

◆ G4SextupoleMagField() [2/2]

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

Definition at line 46 of file G4SextupoleMagField.cc.

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

References fGradient, fOrigin, and fpMatrix.

◆ ~G4SextupoleMagField()

G4SextupoleMagField::~G4SextupoleMagField ( )

Definition at line 62 of file G4SextupoleMagField.cc.

63{
64}

Member Function Documentation

◆ Clone()

G4Field * G4SextupoleMagField::Clone ( ) const
virtual

Reimplemented from G4Field.

Definition at line 55 of file G4SextupoleMagField.cc.

56{
58}
G4SextupoleMagField(G4double pGradient)

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

◆ 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 G4SextupoleMagField::GetFieldValue ( const G4double  yTrack[],
G4double  B[] 
) const

Definition at line 66 of file G4SextupoleMagField.cc.

69{
71 y[0] - fOrigin.x(),
72 y[1] - fOrigin.y(),
73 y[2] - fOrigin.z());
74
75 const G4ThreeVector r_local = (*fpMatrix) * r_global;
76 const G4ThreeVector B_local( fGradient * r_local.x() * r_local.y(),fGradient * ( std::pow(r_local.x(),2) - std::pow(r_local.y(),2) )/2 ,0);
77 const G4ThreeVector B_global = fpMatrix->inverse() * B_local;
78
79 B[0] = B_global.x() ;
80 B[1] = B_global.y() ;
81 B[2] = B_global.z() ;
82}
G4double B(G4double temperature)
CLHEP::Hep3Vector G4ThreeVector
double z() const
double x() const
double y() const
HepRotation inverse() const

References B(), 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 G4SextupoleMagField::fGradient = 0.0
private

Definition at line 61 of file G4SextupoleMagField.hh.

Referenced by Clone(), and G4SextupoleMagField().

◆ fGravityActive

G4bool G4Field::fGravityActive = false
privateinherited

◆ fOrigin

G4ThreeVector G4SextupoleMagField::fOrigin = G4ThreeVector(0.0, 0.0, 0.0)
private

Definition at line 62 of file G4SextupoleMagField.hh.

Referenced by Clone(), and G4SextupoleMagField().

◆ fpMatrix

G4RotationMatrix* G4SextupoleMagField::fpMatrix = nullptr
private

Definition at line 63 of file G4SextupoleMagField.hh.

Referenced by Clone(), and G4SextupoleMagField().

◆ 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 files: