79 G4double cosphi=yParticleFrame*nInteractionFrame;
80 if (cosphi>(1.+1.
e-8) || cosphi<(-1.-1.
e-8)) {
81 G4cout<<
" warning G4StokesVector::RotateAz cosphi>1 or cosphi<-1\n"
82 <<
" cosphi="<<cosphi<<
"\n"
83 <<
" zAxis="<<particleDirection<<
" ("<<particleDirection.
mag()<<
")\n"
84 <<
" yAxis="<<yParticleFrame<<
" ("<<yParticleFrame.
mag()<<
")\n"
85 <<
" nAxis="<<nInteractionFrame<<
" ("
86 <<nInteractionFrame.mag()<<
")"<<
G4endl;
88 if (cosphi>1.) cosphi=1.;
89 else if (cosphi<-1.) cosphi=-1.;
100 G4double hel=(yParticleFrame.
cross(nInteractionFrame)*particleDirection)>0?1.:-1.;
102 G4double sinphi=hel*std::sqrt(1.-cosphi*cosphi);
119 G4double cosphi=yParticleFrame*nInteractionFrame;
121 if (cosphi>1.+1.
e-8 || cosphi<-1.-1.
e-8) {
122 G4cout<<
" warning G4StokesVector::RotateAz cosphi>1 or cosphi<-1\n";
124 if (cosphi>1.) cosphi=1.;
125 else if (cosphi<-1.)cosphi=-1.;
128 G4double hel=(yParticleFrame.
cross(nInteractionFrame)*particleDirection)>0?1.:-1.;
129 G4double sinphi=hel*std::sqrt(std::fabs(1.-cosphi*cosphi));
144 G4double cos2phi=cosphi*cosphi-sinphi*sinphi;
162 G4double sintheta=std::sqrt(1.-costheta*costheta);
164 setX(std::sin(aphi)*sintheta);
165 setY(std::cos(aphi)*sintheta);
207 b.
y()!=0. ?
y()/b.
y() : 11111.,
208 b.
z()!=0. ?
z()/b.
z() : 11111.);}
static const G4StokesVector M1
CLHEP::Hep3Vector G4ThreeVector
static const G4StokesVector P2
static const G4StokesVector M2
static G4ThreeVector GetParticleFrameY(const G4ThreeVector &)
G4ThreeVector PolSqr() const
G4ThreeVector PolError(const G4StokesVector &sum2, long n)
static const G4StokesVector P3
void InvRotateAz(G4ThreeVector nInteractionFrame, G4ThreeVector particleDirection)
void RotateAz(G4ThreeVector nInteractionFrame, G4ThreeVector particleDirection)
G4ThreeVector PolDiv(const G4StokesVector &)
static const G4StokesVector M3
G4bool isPhoton(G4int ityp)
Hep3Vector cross(const Hep3Vector &) const
static const G4StokesVector ZERO
G4ThreeVector PolSqrt() const
G4GLOB_DLL std::ostream G4cout
static const G4StokesVector P1
static constexpr double pi