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

#include <G4LineCurrentMagField.hh>

Inheritance diagram for G4LineCurrentMagField:
G4MagneticField G4Field

Public Member Functions

G4FieldClone () const
 
G4bool DoesFieldChangeEnergy () const
 
 G4LineCurrentMagField (G4double pFieldConstant)
 
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)
 
 ~G4LineCurrentMagField ()
 

Static Public Attributes

static constexpr G4int MAX_NUMBER_OF_COMPONENTS = 24
 

Private Attributes

G4double fFieldConstant = 0.0
 
G4bool fGravityActive = false
 

Detailed Description

Definition at line 42 of file G4LineCurrentMagField.hh.

Constructor & Destructor Documentation

◆ G4LineCurrentMagField()

G4LineCurrentMagField::G4LineCurrentMagField ( G4double  pFieldConstant)

Definition at line 34 of file G4LineCurrentMagField.cc.

35{
36 fFieldConstant = pFieldConstant ;
37}

References fFieldConstant.

Referenced by Clone().

◆ ~G4LineCurrentMagField()

G4LineCurrentMagField::~G4LineCurrentMagField ( )

Definition at line 48 of file G4LineCurrentMagField.cc.

49{
50}

Member Function Documentation

◆ Clone()

G4Field * G4LineCurrentMagField::Clone ( ) const
virtual

Reimplemented from G4Field.

Definition at line 41 of file G4LineCurrentMagField.cc.

42{
44}
G4LineCurrentMagField(G4double pFieldConstant)

References fFieldConstant, and G4LineCurrentMagField().

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

Definition at line 54 of file G4LineCurrentMagField.cc.

56{
57 // G4double fFieldConstant = 100 ;
58 G4double a = 1.00 ; // mm
59 G4double x = a*yTrack[0], y = a*yTrack[1] ;
60 G4double x2 = x*x, y2 = y*y, r2 = x2 + y2 ;
61 G4double r = std::sqrt(r2+a*a) ;
63 B[0] = -Br*y/r ;
64 B[1] = Br*x/r ;
65 B[2] = 0.0 ;
66}
G4double B(G4double temperature)
double G4double
Definition: G4Types.hh:83

References B(), and fFieldConstant.

◆ 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

◆ fFieldConstant

G4double G4LineCurrentMagField::fFieldConstant = 0.0
private

Definition at line 55 of file G4LineCurrentMagField.hh.

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

◆ fGravityActive

G4bool G4Field::fGravityActive = false
privateinherited

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