89 if( (std::fabs(R_1) < 1e-10)||(Bmag<1e-12) )
101 Bnorm = (1.0/Bmag)*Bfld;
105 B_x_P = Bnorm.
cross(initTangent);
109 B_d_P = Bnorm.
dot(initTangent);
111 vpar = B_d_P * Bnorm;
112 vperp= initTangent - vpar;
114 B_v_P = std::sqrt( 1 - B_d_P * B_d_P);
122 if( std::fabs(Theta) > approc_limit )
124 SinT = std::sin(Theta);
125 CosT = std::cos(Theta);
132 SinT = Theta - 1.0/6.0 * Theta3;
133 CosT = 1 - 0.5 * Theta2 + 1.0/24.0 * Theta4;
140 positionMove = R * ( SinT * vperp + (1-CosT) * B_x_P) + h * vpar;
141 endTangent = CosT * vperp + SinT * B_x_P + vpar;
145 yHelix[0] = yIn[0] + positionMove.
x();
146 yHelix[1] = yIn[1] + positionMove.
y();
147 yHelix[2] = yIn[2] + positionMove.
z();
148 yHelix[3] = velocityVal * endTangent.x();
149 yHelix[4] = velocityVal * endTangent.y();
150 yHelix[5] = velocityVal * endTangent.z();
154 if(yHelix2 !=
nullptr)
156 SinT2 = 2.0 * SinT * CosT;
157 CosT2 = 1.0 - 2.0 * SinT * SinT;
158 endTangent = (CosT2 * vperp + SinT2 * B_x_P + vpar);
159 positionMove = R * ( SinT2 * vperp + (1-CosT2) * B_x_P) + h*2 * vpar;
161 yHelix2[0] = yIn[0] + positionMove.
x();
162 yHelix2[1] = yIn[1] + positionMove.
y();
163 yHelix2[2] = yIn[2] + positionMove.
z();
164 yHelix2[3] = velocityVal * endTangent.x();
165 yHelix2[4] = velocityVal * endTangent.y();
166 yHelix2[5] = velocityVal * endTangent.z();
173 G4double particleCharge = fPtrMagEqOfMot->
FCof() / (eplus*c_light);
174 R_Helix =std::abs( ptan/(fUnitConstant * particleCharge*Bmag));
192 const G4int nvar = 6;
202 for(
G4int i=0; i<nvar; ++i)
224 for(
G4int i=0; i<nvar; ++i)
226 yErr[i] = yOut[i] - yTemp[i] ;