100{
105 {
106 sclambda *= -1;
107 scphi += CLHEP::pi;
108 }
109 G4double cosLambda = std::cos(sclambda);
110 G4double sinLambda = std::sin(sclambda);
113
114#ifdef G4EVERBOSE
118#endif
119
120 G4ThreeVector vTN(cosLambda * cosPhi, cosLambda * sinPhi, sinLambda);
122 G4ThreeVector vVN(-vTN.z() * vUN.y(), vTN.z() * vUN.x(), cosLambda);
123
124#ifdef G4EVERBOSE
126 G4cout <<
" SC2SD: vTN " << vTN <<
" vUN " << vUN <<
" vVN " << vVN
128#endif
133
134
136
140
142 G4double T1R = 1. / (vTN * vectorU);
143
144#ifdef G4EVERBOSE
148#endif
149
151 {
163 if(magH != 0.)
164 {
167#ifdef G4EVERBOSE
169 G4cout << GeV <<
" Q " << Q <<
" magHM " << magHM <<
" c_light/(km/ns) "
171#endif
172
175 G4double T3R = Q * std::pow(T1R, 3);
178#ifdef G4EVERBOSE
180 {
182 G4cout <<
" UI " << UI <<
" VI " << VI <<
" vectorU " << vectorU
186 }
187#endif
188
189 transfM[1][3] = -UI * (VK * cosz - UK * sinz) * T3R;
190 transfM[1][4] = -VI * (VK * cosz - UK * sinz) * T3R;
191 transfM[2][3] = UI * (VJ * cosz - UJ * sinz) * T3R;
192 transfM[2][4] = VI * (VJ * cosz - UJ * sinz) * T3R;
193 }
194 }
195
197 transfM[0][0] = 1.;
198 transfM[1][1] = -UK * T2R;
199 transfM[1][2] = VK * cosLambda * T2R;
200 transfM[2][1] = UJ * T2R;
201 transfM[2][2] = -VJ * cosLambda * T2R;
202 transfM[3][3] = VK * T1R;
203 transfM[3][4] = -UK * T1R;
204 transfM[4][3] = -VJ * T1R;
205 transfM[4][4] = UJ * T1R;
206
207#ifdef G4EVERBOSE
209 G4cout <<
" SC2SD transf matrix A= " << transfM <<
G4endl;
210#endif
212
213#ifdef G4EVERBOSE
217 G4cout <<
"G4ErrorSurfaceTrajState from SC " << *
this <<
G4endl;
218#endif
219
220 return transfM;
221}
@ G4ErrorMode_PropBackwards
G4ErrorSymMatrix G4ErrorTrajErr
CLHEP::Hep3Vector G4ThreeVector
G4GLOB_DLL std::ostream G4cout
G4double GetLambda() const
G4ErrorFreeTrajParam GetParameters() const
static G4ErrorPropagatorData * GetErrorPropagatorData()
G4ErrorSymMatrix similarity(const G4ErrorMatrix &m1) const
G4ErrorTrajErr GetError() const
const G4Field * GetDetectorField() const
virtual void GetFieldValue(const G4double Point[4], G4double *fieldArr) const =0
static G4TransportationManager * GetTransportationManager()
G4FieldManager * GetFieldManager() const
BasicVector3D< T > cross(const BasicVector3D< T > &v) const