#include <G4MonopoleEq.hh>
Inheritance diagram for G4MonopoleEq:
Public Member Functions | |
G4MonopoleEq (G4ElectroMagneticField *emField) | |
~G4MonopoleEq () | |
void | SetChargeMomentumMass (G4double particleCharge, G4double MomentumXc, G4double mass) |
void | EvaluateRhsGivenB (const G4double y[], const G4double Field[], G4double dydx[]) const |
Definition at line 48 of file G4MonopoleEq.hh.
G4MonopoleEq::G4MonopoleEq | ( | G4ElectroMagneticField * | emField | ) | [inline] |
G4MonopoleEq::~G4MonopoleEq | ( | ) | [inline] |
void G4MonopoleEq::EvaluateRhsGivenB | ( | const G4double | y[], | |
const G4double | Field[], | |||
G4double | dydx[] | |||
) | const |
Definition at line 58 of file G4MonopoleEq.cc.
00061 { 00062 00063 // Components of y: 00064 // 0-2 dr/ds, 00065 // 3-5 d(pc)/ds - momentum derivatives 00066 00067 G4double pSquared = y[3]*y[3] + y[4]*y[4] + y[5]*y[5] ; 00068 00069 G4double Energy = std::sqrt( pSquared + fMassCof ); 00070 G4double cof2 = Energy*c_light ; 00071 00072 G4double pModuleInverse = 1.0/std::sqrt(pSquared) ; 00073 00074 // G4double inverse_velocity = Energy * c_light * pModuleInverse; 00075 G4double inverse_velocity = Energy * pModuleInverse / c_light; 00076 00077 G4double cof1 = fElectroMagCof*pModuleInverse ; 00078 00079 // G4double vDotE = y[3]*Field[3] + y[4]*Field[4] + y[5]*Field[5] ; 00080 00081 dydx[0] = y[3]*pModuleInverse ; 00082 dydx[1] = y[4]*pModuleInverse ; 00083 dydx[2] = y[5]*pModuleInverse ; 00084 00085 dydx[3] = cof1*(cof2*Field[0] - (y[4]*Field[5] - y[5]*Field[4])) ; 00086 00087 dydx[4] = cof1*(cof2*Field[1] - (y[5]*Field[3] - y[3]*Field[5])) ; 00088 00089 dydx[5] = cof1*(cof2*Field[2] - (y[3]*Field[4] - y[4]*Field[3])) ; 00090 00091 dydx[6] = 0.;//not used 00092 00093 // Lab Time of flight 00094 dydx[7] = inverse_velocity; 00095 return ; 00096 }
void G4MonopoleEq::SetChargeMomentumMass | ( | G4double | particleCharge, | |
G4double | MomentumXc, | |||
G4double | mass | |||
) | [virtual] |
Implements G4EquationOfMotion.
Definition at line 45 of file G4MonopoleEq.cc.
00048 { 00049 fElectroMagCof = eplus*particleCharge; // no *c_light as for ususal q 00050 fElectroMagCof /= 2*fine_structure_const; 00051 00052 fMassCof = particleMass*particleMass ; 00053 }