96 asymmetry *= (k0 + 1.)*
sqr(k1)*
G4Log(k1) - 2.*k0*(5.*
sqr(k0) + 4.*k0 + 1.);
97 asymmetry /= ((k0 - 2.)*k0 -2.)*
sqr(k1)*
G4Log(k1) + 2.*k0*(k0*(k0 + 1.)*(k0 + 8.) + 2.);
100 if (asymmetry>1.)
G4cout<<
"ERROR in G4PolarizedComptonModel::ComputeAsymmetryPerAtom"<<
G4endl;
120 xs *= (1.+polzz*asym);
128 std::vector<G4DynamicParticle*>* fvect,
141 G4cout<<
"G4PolarizedComptonModel::SampleSecondaries in "
164 if (targetIsPolarized) {
190 G4double alpha2 = alpha1 + 0.5*(1.- epsilon0sq);
206 PrintWarning(aDynamicGamma, nloop, greject, onecost, Phi,
207 "too many iterations");
214 if ( alpha1 > alpha2*rndm[0]) {
215 epsilon =
G4Exp(-alpha1*rndm[1]);
217 epsilon = std::sqrt(epsilon0sq + (1.- epsilon0sq)*rndm[1]);
220 onecost = (1.-
epsilon)/(epsilon*E0_m);
221 sint2 = onecost*(2.-onecost);
224 G4double gdist = 1./epsilon + epsilon - sint2
225 - polarization*(1./epsilon-
epsilon)*(1.-onecost);
227 greject = gdist/gdiced;
230 PrintWarning(aDynamicGamma, nloop, greject, onecost, Phi,
231 "theta majoranta wrong");
234 }
while (greject < rndm[2]);
242 cosTeta = 1. - onecost;
243 sinTeta = std::sqrt(sint2);
251 Phi =
twopi * rndm[0];
253 PrintWarning(aDynamicGamma, nloop, greject, onecost, Phi,
254 "too many iterations");
258 G4double gdiced = 1./epsilon + epsilon - sint2
266 G4double gdist = 1./epsilon + epsilon - sint2
273 greject = gdist/gdiced;
276 PrintWarning(aDynamicGamma, nloop, greject, onecost, Phi,
277 "phi majoranta wrong");
280 if(greject < 1.
e-3) {
281 PrintWarning(aDynamicGamma, nloop, greject, onecost, Phi,
282 "phi loop ineffective");
289 }
while (greject < rndm[1]);
291 G4double dirx = sinTeta*std::cos(Phi), diry = sinTeta*std::sin(Phi),
299 gamDirection1.
rotateUz(gamDirection0);
300 G4double gamEnergy1 = epsilon*gamEnergy0;
321 G4cout <<
"========================================\n";
322 G4cout <<
" nInteractionFrame = " <<nInteractionFrame<<
"\n";
323 G4cout <<
" GammaDirection0 = " <<gamDirection0<<
"\n";
332 G4cout <<
"----------------------------------------\n";
335 G4cout <<
"----------------------------------------\n";
356 G4cout<<
"ERROR in Polarizaed Compton Scattering !"<<
G4endl;
357 G4cout<<
"Polarization of final photon more than 100%"<<
G4endl;
365 G4cout <<
" GammaDirection1 = " <<gamDirection1<<
"\n";
372 G4double eKinEnergy = gamEnergy0 - gamEnergy1;
377 gamEnergy0*gamDirection0 - gamEnergy1*gamDirection1;
378 eDirection = eDirection.
unit();
382 G4cout <<
" electronPolarization1 = "
388 G4cout <<
" electronPolarization1 = "
390 G4cout <<
" ElecDirection = " <<eDirection<<
"\n";
398 G4cout<<
"ERROR in Polarizaed Compton Scattering !"<<
G4endl;
399 G4cout<<
"Polarization of final electron more than 100%"<<
G4endl;
406 fvect->push_back(aElectron);
424 ed <<
"Problem of scattering sampling: " << sss <<
"\n"
425 <<
"Niter= " << nloop <<
" grej= " << grej <<
" cos(theta)= "
426 << 1.0-onecos <<
" phi= " << phi <<
"\n"
430 G4Exception(
"G4PolarizedComptonModel::SampleSecondaries",
"em0044",