73 G4double cosphi = yParticleFrame * nInteractionFrame;
74 if(cosphi > (1. + 1.e-8) || cosphi < (-1. - 1.e-8))
77 ed <<
" warning G4StokesVector::RotateAz cosphi>1 or cosphi<-1\n"
78 <<
" cosphi=" << cosphi <<
"\n"
79 <<
" zAxis=" << particleDirection <<
" (" << particleDirection.
mag()
81 <<
" yAxis=" << yParticleFrame <<
" (" << yParticleFrame.
mag() <<
")\n"
82 <<
" nAxis=" << nInteractionFrame <<
" (" << nInteractionFrame.
mag()
92 (yParticleFrame.
cross(nInteractionFrame) * particleDirection) > 0. ? 1.
95 G4double sinphi = hel * std::sqrt(1. - cosphi * cosphi);
110 G4double cosphi = yParticleFrame * nInteractionFrame;
112 if(cosphi > 1. + 1.e-8 || cosphi < -1. - 1.e-8)
115 ed <<
" warning G4StokesVector::RotateAz cosphi>1 or cosphi<-1\n";
120 else if(cosphi < -1.)
125 (yParticleFrame.
cross(nInteractionFrame) * particleDirection) > 0. ? 1.
127 G4double sinphi = hel * std::sqrt(std::fabs(1. - cosphi * cosphi));
142 G4double sin2phi = 2. * cosphi * sinphi;
143 G4double cos2phi = cosphi * cosphi - sinphi * sinphi;
164 G4double sintheta = std::sqrt(1. - costheta * costheta);
166 setX(std::sin(aphi) * sintheta);
167 setY(std::cos(aphi) * sintheta);
209 G4StokesVector((1. / (n - 1.) * ((1. / n) * sum2 - polsqr))).PolSqrt();
216 b.
y() != 0. ?
y() / b.
y() : 11111.,
217 b.
z() != 0. ?
z() / b.
z() : 11111.);
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
CLHEP::Hep3Vector G4ThreeVector
Hep3Vector cross(const Hep3Vector &) const
static G4ThreeVector GetParticleFrameY(const G4ThreeVector &)
static const G4StokesVector P3
static const G4StokesVector M2
G4ThreeVector PolDiv(const G4StokesVector &)
static const G4StokesVector ZERO
void InvRotateAz(G4ThreeVector nInteractionFrame, G4ThreeVector particleDirection)
static const G4StokesVector P2
static const G4StokesVector M3
void RotateAz(G4ThreeVector nInteractionFrame, G4ThreeVector particleDirection)
static const G4StokesVector M1
G4ThreeVector PolError(const G4StokesVector &sum2, long n)
static const G4StokesVector P1