Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
G4MonopoleEq Class Reference

#include <G4MonopoleEq.hh>

Inheritance diagram for G4MonopoleEq:
G4EquationOfMotion

Public Member Functions

 G4MonopoleEq (G4ElectroMagneticField *emField)
 
 ~G4MonopoleEq ()
 
void SetChargeMomentumMass (G4ChargeState particleCharge, G4double MomentumXc, G4double mass)
 
void EvaluateRhsGivenB (const G4double y[], const G4double Field[], G4double dydx[]) const
 
- 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
 
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 G4MonopoleEq.hh.

Constructor & Destructor Documentation

G4MonopoleEq::G4MonopoleEq ( G4ElectroMagneticField emField)
inline

Definition at line 53 of file G4MonopoleEq.hh.

54  : G4EquationOfMotion( emField ) {;}
G4EquationOfMotion(G4Field *Field)
G4MonopoleEq::~G4MonopoleEq ( )
inline

Definition at line 56 of file G4MonopoleEq.hh.

56 {;}

Member Function Documentation

void G4MonopoleEq::EvaluateRhsGivenB ( const G4double  y[],
const G4double  Field[],
G4double  dydx[] 
) const

Definition at line 59 of file G4MonopoleEq.cc.

References python.hepunit::c_light.

62 {
63 
64  // Components of y:
65  // 0-2 dr/ds,
66  // 3-5 d(pc)/ds - momentum derivatives
67 
68  G4double pSquared = y[3]*y[3] + y[4]*y[4] + y[5]*y[5] ;
69 
70  G4double Energy = std::sqrt( pSquared + fMassCof );
71  G4double cof2 = Energy*c_light ;
72 
73  G4double pModuleInverse = 1.0/std::sqrt(pSquared) ;
74 
75  // G4double inverse_velocity = Energy * c_light * pModuleInverse;
76  G4double inverse_velocity = Energy * pModuleInverse / c_light;
77 
78  G4double cof1 = fElectroMagCof*pModuleInverse ;
79 
80  // G4double vDotE = y[3]*Field[3] + y[4]*Field[4] + y[5]*Field[5] ;
81 
82  dydx[0] = y[3]*pModuleInverse ;
83  dydx[1] = y[4]*pModuleInverse ;
84  dydx[2] = y[5]*pModuleInverse ;
85 
86  dydx[3] = cof1*(cof2*Field[0] - (y[4]*Field[5] - y[5]*Field[4])) ;
87 
88  dydx[4] = cof1*(cof2*Field[1] - (y[5]*Field[3] - y[3]*Field[5])) ;
89 
90  dydx[5] = cof1*(cof2*Field[2] - (y[3]*Field[4] - y[4]*Field[3])) ;
91 
92  dydx[6] = 0.;//not used
93 
94  // Lab Time of flight
95  dydx[7] = inverse_velocity;
96  return ;
97 }
double G4double
Definition: G4Types.hh:76
float c_light
Definition: hepunit.py:257
void G4MonopoleEq::SetChargeMomentumMass ( G4ChargeState  particleCharge,
G4double  MomentumXc,
G4double  mass 
)
virtual

Implements G4EquationOfMotion.

Definition at line 45 of file G4MonopoleEq.cc.

References python.hepunit::eplus, python.hepunit::fine_structure_const, and G4ChargeState::GetCharge().

48 {
49  G4double pcharge = particleCharge.GetCharge();
50  fElectroMagCof = eplus*pcharge; // no *c_light as for ususal q
51  fElectroMagCof /= 2*fine_structure_const;
52 
53  fMassCof = particleMass*particleMass ;
54 }
G4double GetCharge() const
double G4double
Definition: G4Types.hh:76

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