85 G4cout <<
"MIE Old Momentum Direction: "
87 G4cout <<
"MIE Old Polarization: "
106 Theta = std::acos(2*r*(1+gg)*(1+gg)*(1-gg+gg*r)/((1-gg+2*gg*r)*(1-gg+2*gg*r)) -1);
108 Theta = std::acos(2*r-1.);
112 if (direction==-1) Theta =
pi - Theta;
117 NewMomentumDirection.
set
118 (std::sin(Theta)*std::cos(Phi), std::sin(Theta)*std::sin(Phi), std::cos(Theta));
120 NewMomentumDirection.
rotateUz(OldMomentumDirection);
121 NewMomentumDirection = NewMomentumDirection.
unit();
124 G4double constant = -1./NewMomentumDirection.
dot(OldPolarization);
126 NewPolarization = NewMomentumDirection + constant*OldPolarization;
127 NewPolarization = NewPolarization.
unit();
129 if (NewPolarization.
mag()==0) {
131 NewPolarization.
set(std::cos(r),std::sin(r),0.);
132 NewPolarization.
rotateUz(NewMomentumDirection);
136 if (
G4UniformRand() < 0.5) NewPolarization = -NewPolarization;
143 G4cout <<
"MIE New Polarization: "
144 << NewPolarization <<
G4endl;
145 G4cout <<
"MIE Polarization Change: "
147 G4cout <<
"MIE New Momentum Direction: "
148 << NewMomentumDirection <<
G4endl;
149 G4cout <<
"MIE Momentum Change: "
173 if (aMaterialPropertyTable) {
176 if (AttenuationLengthVector) {
177 AttenuationLength = AttenuationLengthVector ->
178 Value(thePhotonEnergy);
188 return AttenuationLength;