67 G4cout <<
"Livermore Polarized GammaConversion is constructed "
94 G4cout <<
"Calling1 G4LivermorePolarizedGammaConversionModel::Initialise()"
112 char* path = std::getenv(
"G4LEDATA");
119 for(
G4int i=0; i<numOfCouples; ++i)
126 for (
G4int j=0; j<nelm; ++j)
164 G4cout <<
"Calling ReadData() of G4LivermorePolarizedGammaConversionModel"
168 if(
data[Z]) {
return; }
170 const char* datadir = path;
174 datadir = std::getenv(
"G4LEDATA");
177 G4Exception(
"G4LivermorePolarizedGammaConversionModel::ReadData()",
179 "Environment variable G4LEDATA not defined");
190 std::ostringstream ost;
191 ost << datadir <<
"/livermore/pair/pp-cs-" << Z <<
".dat";
192 std::ifstream
fin(ost.str().c_str());
197 ed <<
"G4LivermorePolarizedGammaConversionModel data file <" << ost.str().c_str()
198 <<
"> is not opened!" <<
G4endl;
199 G4Exception(
"G4LivermorePolarizedGammaConversionModel::ReadData()",
201 ed,
"G4LEDATA version should be G4EMLOW6.27 or later.");
208 <<
" is opened by G4LivermorePolarizedGammaConversionModel" <<
G4endl;}
214 data[
Z] ->SetSpline(
true);
227 G4cout <<
"G4LivermorePolarizedGammaConversionModel::ComputeCrossSectionPerAtom()"
236 if(intZ < 1 || intZ >
maxZ) {
return xs; }
246 if(!pv) {
return xs; }
249 xs = pv->
Value(GammaEnergy);
254 G4cout <<
"****** DEBUG: tcs value for Z=" << Z <<
" at energy (MeV)="
256 G4cout <<
" cs (Geant4 internal unit)=" << xs <<
G4endl;
257 G4cout <<
" -> first cs value in EADL data file (iu) =" << (*pv)[0] <<
G4endl;
258 G4cout <<
" -> last cs value in EADL data file (iu) =" << (*pv)[
n] <<
G4endl;
259 G4cout <<
"*********************************************************" <<
G4endl;
281 G4cout <<
"Calling SampleSecondaries() of G4LivermorePolarizedGammaConversionModel" <<
G4endl;
300 if(!(gammaPolarization0.
isOrthogonal(gammaDirection0, 1
e-6))||(gammaPolarization0.
mag()==0))
322 epsilon = epsilon0Local + (0.5 - epsilon0Local) *
G4UniformRand();
335 G4cout <<
"G4LivermorePolarizedGammaConversionModel::SampleSecondaries - element = 0" <<
G4endl;
344 G4cout <<
"G4LivermorePolarizedGammaConversionModel::SampleSecondaries - ionisation = 0" <<
G4endl;
351 if (photonEnergy > 50. *
MeV) fZ += 8. * (element->
GetfCoulomb());
359 G4double epsilon1 = 0.5 - 0.5 * sqrt(1. - screenMin / screenMax) ;
361 G4double epsilonRange = 0.5 - epsilonMin ;
375 epsilon = 0.5 - epsilonRange * pow(
G4UniformRand(), 0.3333) ;
376 screen = screenFactor / (epsilon * (1. -
epsilon));
382 screen = screenFactor / (epsilon * (1 -
epsilon));
400 electronTotEnergy = (1. -
epsilon) * photonEnergy;
401 positronTotEnergy = epsilon * photonEnergy;
405 positronTotEnergy = (1. -
epsilon) * photonEnergy;
406 electronTotEnergy = epsilon * photonEnergy;
444 phi =
SetPhi(photonEnergy);
445 psi =
SetPsi(photonEnergy,phi);
520 dirX = sinTheta*cos(phip);
521 dirY = sinTheta*sin(phip);
531 positronDirection, positronKineEnergy);
534 fvect->push_back(particle1);
535 fvect->push_back(particle2);
551 if (screenVariable > 1.)
552 value = 42.24 - 8.368 * log(screenVariable + 0.952);
554 value = 42.392 - screenVariable * (7.796 - 1.961 * screenVariable);
567 if (screenVariable > 1.)
568 value = 42.24 - 8.368 * log(screenVariable + 0.952);
570 value = 41.405 - screenVariable * (5.828 - 0.8945 * screenVariable);
582 G4double Momentum = sqrt(Energy*Energy -1);
585 *p_cosTheta = (Energy*((2*Rand)- 1) + Momentum)/((Momentum*(2*Rand-1))+Energy);
586 *p_sinTheta = (2*sqrt(Rand*(1-Rand)))/(Momentum*(2*Rand-1)+Energy);
610 const G4double ay0=5.6, by0=18.6, aa0=2.9, ba0 = 8.16E-3;
611 const G4double aw = 0.0151, bw = 10.7, cw = -410.;
613 const G4double axc = 3.1455, bxc = -1.11, cxc = 310.;
615 pl[0] =
Fln(ay0,by0,Ene);
616 pl[1] = aa0 + ba0*(Ene);
617 pl[2] =
Poli(aw,bw,cw,Ene);
618 pl[3] =
Poli(axc,bxc,cxc,Ene);
620 const G4double abf = 3.1216, bbf = 2.68;
622 pt[1] = abf + bbf/Ene;
638 const G4double aw = 0.21, bw = 10.8, cw = -58.;
639 const G4double axc = 3.17, bxc = -0.87, cxc = -6.;
641 pl[0] =
Fln(ay0, by0, Ene);
642 pl[1] =
Fln(aa0, ba0, Ene);
643 pl[2] =
Poli(aw,bw,cw,Ene);
644 pl[3] =
Poli(axc,bxc,cxc,Ene);
716 const G4double ay00 = 3.4, by00 = 9.8, aa00 = 1.34, ba00 = 5.3;
717 const G4double aw0 = 0.014, bw0 = 9.7, cw0 = -2.E4;
718 const G4double axc0 = 3.1423, bxc0 = -2.35, cxc0 = 0.;
719 const G4double ay0p = 1.53, by0p = 3.2, aap = 0.67, bap = 8.5E-3;
720 const G4double awp = 6.9E-3, bwp = 12.6, cwp = -3.8E4;
721 const G4double axcp = 2.8E-3,bxcp = -3.133;
722 const G4double abf0 = 3.1213, bbf0 = 2.61;
723 const G4double abfpm = 3.1231, bbfpm = 2.84;
725 p0l[0] =
Fln(ay00, by00, Ene);
726 p0l[1] =
Fln(aa00, ba00, Ene);
727 p0l[2] =
Poli(aw0, bw0, cw0, Ene);
728 p0l[3] =
Poli(axc0, bxc0, cxc0, Ene);
730 ppml[0] =
Fln(ay0p, by0p, Ene);
731 ppml[1] = aap + bap*(Ene);
732 ppml[2] =
Poli(awp, bwp, cwp, Ene);
733 ppml[3] =
Fln(axcp,bxcp,Ene);
736 p0t[1] = abf0 + bbf0/Ene;
738 ppmt[1] = abfpm + bbfpm/Ene;
744 xe0 =
Encu(p0l, p0t, xi);
746 xepm =
Encu(ppml, ppmt, xi);
751 const G4double ay00 = 2.82, by00 = 6.35;
752 const G4double aa00 = -1.75, ba00 = 0.25;
754 const G4double aw0 = 0.028, bw0 = 5., cw0 = -50.;
755 const G4double axc0 = 3.14213, bxc0 = -2.3, cxc0 = 5.7;
756 const G4double ay0p = 1.56, by0p = 3.6;
757 const G4double aap = 0.86, bap = 8.3E-3;
758 const G4double awp = 0.022, bwp = 7.4, cwp = -51.;
761 p0l[0] =
Fln(ay00, by00, Ene);
762 p0l[1] = aa00+pow(Ene, ba00);
763 p0l[2] =
Poli(aw0, bw0, cw0, Ene);
764 p0l[3] =
Poli(axc0, bxc0, cxc0, Ene);
765 ppml[0] =
Fln(ay0p, by0p, Ene);
766 ppml[1] = aap + bap*(Ene);
767 ppml[2] =
Poli(awp, bwp, cwp, Ene);
778 b = (ppml[0]+2*ppml[1]*ppml[2]*
Flor(ppml,PhiLocal));
782 b =
Ftan(ppmt,PhiLocal);
786 a = (p0l[0]+2*p0l[1]*p0l[2]*
Flor(p0l,PhiLocal));
790 a =
Ftan(p0t,PhiLocal);
795 b = (ppml[0]+2*ppml[1]*ppml[2]*
Flor(ppml,PhiLocal));
796 a = (p0l[0]+2*p0l[1]*p0l[2]*
Flor(p0l,PhiLocal));
817 r3 = nr*(a*cos(value)*cos(value) + b*sin(value)*sin(value));
830 value =(a + b/x + c/(x*x*
x));
864 fx = (Flor(p_p1,x)*Glor(p_p1,x) - Ftan(p_p2, x))/
865 (Fdlor(p_p1,x) - Fdtan(p_p2,x));
867 if(x > xmax) {
return xmax; }
872 if(std::fabs(fx) <= x*1.0e-6) {
break; }
875 if(x < 0.0) { x = 0.0; }
888 value = 1./(
pi*(w*w + 4.*(x-xc)*(x-xc)));
901 value = (y0 *
pi*(w*w + 4.*(x-xc)*(x-xc)) + 2.*A*w);
914 value = (-16.*A*w*(x-xc))/
915 (
pi*(w*w+4.*(x-xc)*(x-xc))*(w*w+4.*(x-xc)*(x-xc)));
928 value = y0*x + A*atan( 2*(x-xc)/w) /
pi;
942 nor = atan(2.*(
pi-xc)/w)/(2.*
pi*
w) - atan(2.*(x-xc)/
w)/(2.*
pi*w);
943 value = xc - (w/2.)*tan(-2.*r*nor*
pi*w+atan(2*(xc-x)/w));
966 value = -1.*a / ((x-
b)*(x-b));
989 value = b*(1-
G4Exp(r*cnor/a));
1029 c.
setX(std::cos(angle)*(a0.
x())+std::sin(angle)*b0.
x());
1030 c.
setY(std::cos(angle)*(a0.
y())+std::sin(angle)*b0.
y());
1031 c.
setZ(std::cos(angle)*(a0.
z())+std::sin(angle)*b0.
z());
1055 return gammaPolarization - gammaPolarization.
dot(gammaDirection)/gammaDirection.
dot(gammaDirection) * gammaDirection;
1076 direction1 = (direction_x*Axis_X0 + direction_y*Axis_Y0 + direction_z*Axis_Z0).unit();
1090 G4AutoLock l(&LivermorePolarizedGammaConversionModelMutex);