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

#include <G4ErrorMag_UsualEqRhs.hh>

+ Inheritance diagram for G4ErrorMag_UsualEqRhs:

Public Member Functions

 G4ErrorMag_UsualEqRhs (G4MagneticField *MagField)
 
 ~G4ErrorMag_UsualEqRhs ()
 
void EvaluateRhsGivenB (const G4double y[], const G4double B[3], G4double dydx[]) const
 
- Public Member Functions inherited from G4Mag_UsualEqRhs
 G4Mag_UsualEqRhs (G4MagneticField *MagField)
 
 ~G4Mag_UsualEqRhs ()
 
void EvaluateRhsGivenB (const G4double y[], const G4double B[3], G4double dydx[]) const
 
virtual void SetChargeMomentumMass (G4double particleCharge, G4double MomentumXc, G4double mass)
 
- Public Member Functions inherited from G4Mag_EqRhs
 G4Mag_EqRhs (G4MagneticField *magField)
 
virtual ~G4Mag_EqRhs ()
 
virtual void EvaluateRhsGivenB (const G4double y[], const G4double B[3], G4double dydx[]) const =0
 
G4double FCof () const
 
virtual void SetChargeMomentumMass (G4double particleCharge, G4double MomentumXc, G4double mass)
 
- Public Member Functions inherited from G4EquationOfMotion
 G4EquationOfMotion (G4Field *Field)
 
virtual ~G4EquationOfMotion ()
 
virtual void EvaluateRhsGivenB (const G4double y[], const G4double B[3], G4double dydx[]) const =0
 
virtual void SetChargeMomentumMass (G4double particleCharge, G4double MomentumXc, G4double MassXc2)=0
 
void RightHandSide (const G4double y[], G4double dydx[]) const
 
void EvaluateRhsReturnB (const G4double y[], G4double dydx[], G4double Field[]) const
 
void GetFieldValue (const G4double Point[4], G4double Field[]) const
 
const G4FieldGetFieldObj () const
 
void SetFieldObj (G4Field *pField)
 

Detailed Description

Definition at line 49 of file G4ErrorMag_UsualEqRhs.hh.

Constructor & Destructor Documentation

◆ G4ErrorMag_UsualEqRhs()

G4ErrorMag_UsualEqRhs::G4ErrorMag_UsualEqRhs ( G4MagneticField MagField)

Definition at line 39 of file G4ErrorMag_UsualEqRhs.cc.

40 : G4Mag_UsualEqRhs( MagField )
41{
42}

◆ ~G4ErrorMag_UsualEqRhs()

G4ErrorMag_UsualEqRhs::~G4ErrorMag_UsualEqRhs ( )

Definition at line 44 of file G4ErrorMag_UsualEqRhs.cc.

45{
46}

Member Function Documentation

◆ EvaluateRhsGivenB()

void G4ErrorMag_UsualEqRhs::EvaluateRhsGivenB ( const G4double  y[],
const G4double  B[3],
G4double  dydx[] 
) const
virtual

Implements G4Mag_EqRhs.

Definition at line 50 of file G4ErrorMag_UsualEqRhs.cc.

53{
54
56
59 {
60 G4double momentum_mag_square = sqr(y[3]) + sqr(y[4]) + sqr(y[5]);
61 G4double inv_momentum_magnitude = 1.0 / std::sqrt( momentum_mag_square );
62
63 G4double cof = FCof()*inv_momentum_magnitude;
64
65 dydx[3] = cof*(y[4]*(-B[2]) - y[5]*(-B[1])) ;
66 dydx[4] = cof*(y[5]*(-B[0]) - y[3]*(-B[2])) ;
67 dydx[5] = cof*(y[3]*(-B[1]) - y[4]*(-B[0])) ;
68 }
69 return;
70}
@ G4ErrorMode_PropBackwards
double G4double
Definition: G4Types.hh:64
static G4ErrorPropagatorData * GetErrorPropagatorData()
G4double FCof() const
Definition: G4Mag_EqRhs.hh:83
void EvaluateRhsGivenB(const G4double y[], const G4double B[3], G4double dydx[]) const
T sqr(const T &x)
Definition: templates.hh:145

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