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<<
" ("
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;
154 if (isPhoton) { bet *= 0.5; }
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.);}
CLHEP::Hep3Vector G4ThreeVector
G4DLLIMPORT std::ostream G4cout
Hep3Vector cross(const Hep3Vector &) const
static G4ThreeVector GetParticleFrameY(const G4ThreeVector &)
static const G4StokesVector P3
static const G4StokesVector M2
G4ThreeVector PolDiv(const G4StokesVector &)
virtual ~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)
G4ThreeVector PolSqr() const
static const G4StokesVector P1