85{
86
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 G4double pSquared = y[3]*y[3] + y[4]*y[4] + y[5]*y[5] ;
114
115 G4double Energy = std::sqrt( pSquared + fMassCof );
117
118 G4double pModuleInverse = 1.0/std::sqrt(pSquared) ;
119
120 G4double inverse_velocity = Energy * pModuleInverse / c_light;
121
122 G4double cof1 = fElectroMagCof*pModuleInverse ;
123
124 dydx[0] = y[3]*pModuleInverse ;
125 dydx[1] = y[4]*pModuleInverse ;
126 dydx[2] = y[5]*pModuleInverse ;
127
128 dydx[3] = cof1*(cof2*Field[3] + (y[4]*Field[2] - y[5]*Field[1])) ;
129
130 dydx[4] = cof1*(cof2*Field[4] + (y[5]*Field[0] - y[3]*Field[2])) ;
131
132 dydx[5] = cof1*(cof2*Field[5] + (y[3]*Field[1] - y[4]*Field[0])) ;
133
134 dydx[6] = dydx[8] = 0.;
135
136
137 dydx[7] = inverse_velocity;
138
141
142 EField /= c_light;
143
145 u *= pModuleInverse;
146
147 G4double udb = anomaly*beta*gamma/(1.+gamma) * (BField * u);
148 G4double ucb = (anomaly+1./gamma)/beta;
149 G4double uce = anomaly + 1./(gamma+1.);
150 G4double ude = beta*gamma/(1.+gamma)*(EField*u);
151
153
155 if (charge == 0.) pcharge = 1.;
156 else pcharge = charge;
157
159 if (
Spin.mag2() != 0.)
160 {
161 dSpin = pcharge*omegac*( ucb*(
Spin.cross(BField))-udb*(
Spin.cross(u))
162
163
164
165 - uce*(u*(Spin*EField) - EField*(
Spin*u))
166 + eta/2.*(
Spin.cross(EField) - ude*(
Spin.cross(u))
167
168 + (u*(Spin*BField) - BField*(
Spin*u)) ) );
169 }
170
171 dydx[ 9] = dSpin.x();
172 dydx[10] = dSpin.y();
173 dydx[11] = dSpin.z();
174
175 return;
176}