#include <Doxymodules_field.h>
Definition at line 136 of file Doxymodules_field.h.
◆ F05Field()
◆ ~F05Field()
◆ DoesFieldChangeEnergy()
G4bool F05Field::DoesFieldChangeEnergy |
( |
| ) |
const |
|
inlineoverride |
◆ GetFieldValue()
void F05Field::GetFieldValue |
( |
const G4double |
Point[4], |
|
|
G4double * |
Bfield |
|
) |
| const |
|
override |
GetFieldValue() returns the field value at a given point[].
field is really field[6]: Bx,By,Bz,Ex,Ey,Ez. point[] is in global coordinates: x,y,z,t.
Definition at line 40 of file F05Field.cc.
41{
42
43
44 const G4double Bz = 0.24*tesla;
45 const G4double Er = 2.113987E+6*volt/m;
46
47 G4double Ex,Ey;
48
49 G4double posR = std::sqrt(std::pow(Point[0],2) + std::pow(Point[1],2));
50 G4double cos_theta, sin_theta;
51
52 if (posR>0){
53 cos_theta = Point[0]/(G4double)posR;
54 sin_theta = Point[1]/(G4double)posR;
55 Ex = -1*Er*cos_theta;
56 Ey = -1*Er*sin_theta;
57 }else{
58 Ex=0;
59 Ey=0;
60 }
61
62 Bfield[0]=0;
63 Bfield[1]=0;
64 Bfield[2]=Bz;
65
66 Bfield[3]=Ex;
67 Bfield[4]=Ey;
68 Bfield[5]=0;
69
70 return;
71}
The documentation for this class was generated from the following files: