59 itsField->T_Field::GetFieldValue(Point, Field);
66 G4double momentum_mag_square = y[3]*y[3] + y[4]*y[4] + y[5]*y[5];
67 G4double inv_momentum_magnitude = 1.0 / std::sqrt( momentum_mag_square );
70 dydx[0] = y[3]*inv_momentum_magnitude;
71 dydx[1] = y[4]*inv_momentum_magnitude;
72 dydx[2] = y[5]*inv_momentum_magnitude;
74 dydx[3] = cof*(y[4]*
B[2] - y[5]*
B[1]) ;
75 dydx[4] = cof*(y[5]*
B[0] - y[3]*
B[2]) ;
76 dydx[5] = cof*(y[3]*
B[1] - y[4]*
B[0]) ;
85 G4double Field[G4maximum_number_of_field_components];
96 enum { G4maximum_number_of_field_components = 24 };
double B(double temperature)
void RightHandSide(const G4double y[], G4double dydx[]) const
void TEvaluateRhsGivenB(const G4double y[], const G4double B[3], G4double dydx[]) const
G4double PositionAndTime[4]
virtual ~G4TMagFieldEquation()
__attribute__((always_inline)) void RightHandSide(const G4double y[]
TEvaluateRhsGivenB(y, Field, dydx)
G4TMagFieldEquation(T_Field *f)
void GetFieldValue(const G4double Point[4], G4double Field[]) const
GetFieldValue(PositionAndTime, Field)