78 G4double cosphi=yParticleFrame*nInteractionFrame;
79 if (cosphi>(1.+1.
e-8) || cosphi<(-1.-1.
e-8)) {
80 G4cout<<
" warning G4StokesVector::RotateAz cosphi>1 or cosphi<-1\n"
81 <<
" cosphi="<<cosphi<<
"\n"
82 <<
" zAxis="<<particleDirection<<
" ("<<particleDirection.
mag()<<
")\n"
83 <<
" yAxis="<<yParticleFrame<<
" ("<<yParticleFrame.
mag()<<
")\n"
84 <<
" nAxis="<<nInteractionFrame<<
" ("
85 <<nInteractionFrame.mag()<<
")"<<
G4endl;
87 if (cosphi>1.) cosphi=1.;
88 else if (cosphi<-1.) cosphi=-1.;
99 G4double hel=(yParticleFrame.
cross(nInteractionFrame)*particleDirection)>0?1.:-1.;
101 G4double sinphi=hel*std::sqrt(1.-cosphi*cosphi);
118 G4double cosphi=yParticleFrame*nInteractionFrame;
120 if (cosphi>1.+1.
e-8 || cosphi<-1.-1.
e-8) {
121 G4cout<<
" warning G4StokesVector::RotateAz cosphi>1 or cosphi<-1\n";
123 if (cosphi>1.) cosphi=1.;
124 else if (cosphi<-1.)cosphi=-1.;
127 G4double hel=(yParticleFrame.
cross(nInteractionFrame)*particleDirection)>0?1.:-1.;
128 G4double sinphi=hel*std::sqrt(std::fabs(1.-cosphi*cosphi));
143 G4double cos2phi=cosphi*cosphi-sinphi*sinphi;
161 G4double sintheta=std::sqrt(1.-costheta*costheta);
163 setX(std::sin(aphi)*sintheta);
164 setY(std::cos(aphi)*sintheta);
206 b.
y()!=0. ?
y()/b.
y() : 11111.,
207 b.
z()!=0. ?
z()/b.
z() : 11111.);}