87{
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115 G4double pSquared = y[3]*y[3] + y[4]*y[4] + y[5]*y[5] ;
116
117 G4double Energy = std::sqrt( pSquared + fMassCof );
119
120 G4double pModuleInverse = 1.0/std::sqrt(pSquared) ;
121
122 G4double inverse_velocity = Energy * pModuleInverse / c_light;
123
124 G4double cof1 = fElectroMagCof*pModuleInverse ;
125
126 dydx[0] = y[3]*pModuleInverse ;
127 dydx[1] = y[4]*pModuleInverse ;
128 dydx[2] = y[5]*pModuleInverse ;
129
130 dydx[3] = cof1*(cof2*Field[3] + (y[4]*Field[2] - y[5]*Field[1])) ;
131
132 dydx[4] = cof1*(cof2*Field[4] + (y[5]*Field[0] - y[3]*Field[2])) ;
133
134 dydx[5] = cof1*(cof2*Field[5] + (y[3]*Field[1] - y[4]*Field[0])) ;
135
136 dydx[6] = dydx[8] = 0.;
137
138
139 dydx[7] = inverse_velocity;
140
143
144 EField /= c_light;
145
147 u *= pModuleInverse;
148
149 G4double udb = anomaly*beta*gamma/(1.+gamma) * (BField * u);
150 G4double ucb = (anomaly+1./gamma)/beta;
151 G4double uce = anomaly + 1./(gamma+1.);
152 G4double ude = beta*gamma/(1.+gamma)*(EField*u);
153
155
157 if (charge == 0.)
158 {
159 pcharge = 1.;
160 }
161 else
162 {
163 pcharge = charge;
164 }
165
167 if (
Spin.mag2() != 0.)
168 {
169 dSpin = pcharge*omegac*( ucb*(
Spin.cross(BField))-udb*(
Spin.cross(u))
170
171
172
173 - uce*(u*(Spin*EField) - EField*(Spin*u))
174 + eta/2.*(
Spin.cross(EField) - ude*(
Spin.cross(u))
175
176 + (u*(Spin*BField) - BField*(Spin*u)) ) );
177 }
178
179 dydx[ 9] = dSpin.x();
180 dydx[10] = dSpin.y();
181 dydx[11] = dSpin.z();
182
183 return;
184}