73   lowEnergyRecoilLimit = 100.*
keV;  
 
   74   lowEnergyLimitQ  = 0.0*
GeV;  
 
   75   lowEnergyLimitHE = 0.0*
GeV;  
 
   76   lowestEnergyLimit= 0.0*
keV;  
 
   77   plabLowLimit     = 20.0*
MeV;
 
  106   fCofAlphaCoulomb = 0.5;
 
  115   fNuclearRadius1 = fNuclearRadius2 = fNuclearRadiusSquare = fNuclearRadiusCof 
 
  116     = fRutherfordRatio = fCoulombPhase0 = fHalfRutThetaTg = fHalfRutThetaTg2 
 
  117     = fRutherfordTheta = fProfileLambda = fCofPhase = fCofFar = fCofAlphaMax 
 
  118     = fCofAlphaCoulomb = fSumSigma = fEtaRatio = fReZ = 0.0;
 
  129   if(fEnergyVector) 
delete fEnergyVector;
 
  155   for(jEl = 0 ; jEl < numOfEl; ++jEl) 
 
  157     fAtomicNumber = (*theElementTable)[jEl]->GetZ();     
 
  158     fAtomicWeight = (*theElementTable)[jEl]->GetN();     
 
  161     fNuclearRadius += R1;
 
  165       G4cout<<
"G4NuclNuclDiffuseElastic::Initialise() the element: " 
  166         <<(*theElementTable)[jEl]->GetName()<<
G4endl;
 
  168     fElementNumberVector.push_back(fAtomicNumber);
 
  169     fElementNameVector.push_back((*theElementTable)[jEl]->GetName());
 
  172     fAngleBank.push_back(fAngleTable);
 
  187   fParticle      = particle;
 
  188   fWaveVector    = momentum/
hbarc;
 
  215   if      (iZ == 1 && iA == 1) theDef = theProton;
 
  216   else if (iZ == 1 && iA == 2) theDef = theDeuteron;
 
  218   else if (iZ == 2 && iA == 3) theDef = 
G4He3::He3();
 
  219   else if (iZ == 2 && iA == 4) theDef = theAlpha;
 
  233   G4double cost = 1 - 0.5*std::fabs(tMand)/ptot2;
 
  235   if( cost >= 1.0 )      cost = 1.0;  
 
  236   else if( cost <= -1.0) cost = -1.0;
 
  238   G4double thetaCMS = std::acos(cost);
 
  258   fParticle      = particle;
 
  259   fWaveVector    = momentum/
hbarc;
 
  267   G4double kRt   = fWaveVector*fNuclearRadius*theta;
 
  270   if( z && (kRt > kRtC) )
 
  275     fAm         = 
CalculateAm( momentum, fZommerfeld, fAtomicNumber);
 
  302   if      (iZ == 1 && iA == 1) theDef = theProton;
 
  303   else if (iZ == 1 && iA == 2) theDef = theDeuteron;
 
  305   else if (iZ == 2 && iA == 3) theDef = 
G4He3::He3();
 
  306   else if (iZ == 2 && iA == 4) theDef = theAlpha;
 
  320   G4double cost    = 1 - 0.5*std::fabs(tMand)/ptot2;
 
  322   if( cost >= 1.0 )      cost = 1.0;  
 
  323   else if( cost <= -1.0) cost = -1.0;
 
  325   G4double thetaCMS = std::acos(cost);
 
  352   if      (iZ == 1 && iA == 1) theDef = theProton;
 
  353   else if (iZ == 1 && iA == 2) theDef = theDeuteron;
 
  355   else if (iZ == 2 && iA == 3) theDef = 
G4He3::He3();
 
  356   else if (iZ == 2 && iA == 4) theDef = theAlpha;
 
  370   G4double cost = 1 - 0.5*std::fabs(tMand)/ptot2;
 
  372   if( cost >= 1.0 )      cost = 1.0;  
 
  373   else if( cost <= -1.0) cost = -1.0;
 
  375   G4double thetaCMS = std::acos(cost);
 
  395   G4double sigma, bzero, bzero2, bonebyarg, bonebyarg2, damp, damp2;
 
  403   G4double kr    = fWaveVector*fNuclearRadius; 
 
  408   bzero2     = bzero*bzero;    
 
  412   bonebyarg2 = bonebyarg*bonebyarg;  
 
  414   if (fParticle == theProton)
 
  416     diffuse = 0.63*
fermi;
 
  424     diffuse = 0.63*
fermi;
 
  434   G4double kgamma    = lambda*(1.-std::exp(-fWaveVector*gamma/lambda));   
 
  441   G4double pikdt    = lambda*(1.-std::exp(-
pi*fWaveVector*diffuse*theta/lambda));   
 
  446   G4double mode2k2 = (e1*e1+e2*e2)*fWaveVector*fWaveVector;  
 
  447   G4double e2dk3t  = -2.*e2*delta*fWaveVector*fWaveVector*fWaveVector*theta;
 
  453   sigma += mode2k2*bone2 + e2dk3t*bzero*bone;
 
  454   sigma += kr2*bonebyarg2;
 
  472   G4double sigma, bzero, bzero2, bonebyarg, bonebyarg2, damp, damp2;
 
  480   G4double kr    = fWaveVector*fNuclearRadius; 
 
  485   bzero2     = bzero*bzero;    
 
  489   bonebyarg2 = bonebyarg*bonebyarg;  
 
  491   if (fParticle == theProton)
 
  493     diffuse = 0.63*
fermi;
 
  502     diffuse = 0.63*
fermi;
 
  510   G4double kgamma    = lambda*(1.-std::exp(-fWaveVector*gamma/lambda));   
 
  516     G4double sinHalfTheta  = std::sin(0.5*theta);
 
  517     G4double sinHalfTheta2 = sinHalfTheta*sinHalfTheta;
 
  519     kgamma += 0.5*fZommerfeld/kr/(sinHalfTheta2+fAm); 
 
  530   G4double pikdt    = lambda*(1.-std::exp(-
pi*fWaveVector*diffuse*theta/lambda));   
 
  537   G4double mode2k2 = (e1*e1+e2*e2)*fWaveVector*fWaveVector;  
 
  538   G4double e2dk3t  = -2.*e2*delta*fWaveVector*fWaveVector*fWaveVector*theta;
 
  543   sigma += mode2k2*bone2; 
 
  544   sigma += e2dk3t*bzero*bone;
 
  547   sigma += kr2*bonebyarg2;  
 
  565   theta = std::sqrt(alpha);
 
  569   G4double sigma, bzero, bzero2, bonebyarg, bonebyarg2, damp, damp2;
 
  577   G4double kr    = fWaveVector*fNuclearRadius; 
 
  582   bzero2     = bzero*bzero;    
 
  586   bonebyarg2 = bonebyarg*bonebyarg;  
 
  588   if (fParticle == theProton)
 
  590     diffuse = 0.63*
fermi;
 
  599     diffuse = 0.63*
fermi;
 
  607   G4double kgamma    = lambda*(1.-std::exp(-fWaveVector*gamma/lambda));   
 
  614     G4double sinHalfTheta2 = sinHalfTheta*sinHalfTheta;
 
  616     kgamma += 0.5*fZommerfeld/kr/(sinHalfTheta2+fAm); 
 
  627   G4double pikdt    = lambda*(1.-std::exp(-
pi*fWaveVector*diffuse*theta/lambda));   
 
  634   G4double mode2k2 = (e1*e1+e2*e2)*fWaveVector*fWaveVector;  
 
  635   G4double e2dk3t  = -2.*e2*delta*fWaveVector*fWaveVector*fWaveVector*theta;
 
  640   sigma += mode2k2*bone2; 
 
  641   sigma += e2dk3t*bzero*bone;
 
  644   sigma += kr2*bonebyarg2;  
 
  679   fParticle      = particle;
 
  680   fWaveVector    = momentum/
hbarc;
 
  702   G4double t     = 2*p*p*( 1 - std::cos(theta) ); 
 
  718   fParticle      = particle;
 
  719   fWaveVector    = momentum/
hbarc;
 
  724   thetaMax = 10.174/fWaveVector/fNuclearRadius;
 
  726   if (thetaMax > 
pi) thetaMax = 
pi;
 
  735   for(i = 1; i <= iMax; i++)
 
  737     theta1 = (i-1)*thetaMax/iMax; 
 
  738     theta2 = i*thetaMax/iMax;
 
  743       result = 0.5*(theta1 + theta2);
 
  747   if (i > iMax ) result = 0.5*(theta1 + theta2);
 
  753   if(result < 0.) result = 0.;
 
  754   if(result > thetaMax) result = thetaMax;
 
  769   fParticle = aParticle;
 
  771   G4double totElab = std::sqrt(m1*m1+p*p);
 
  810   G4int iMomentum, iAngle;  
 
  814   for(iElement = 0; iElement < fElementNumberVector.size(); iElement++)
 
  816     if( std::fabs(Z - fElementNumberVector[iElement]) < 0.5) 
break;
 
  818   if ( iElement == fElementNumberVector.size() ) 
 
  830   fAngleTable = fAngleBank[iElement];
 
  832   G4double kinE = std::sqrt(momentum*momentum + m1*m1) - m1;
 
  834   for( iMomentum = 0; iMomentum < fEnergyBin; iMomentum++)
 
  838     if( kinE < fEnergyVector->GetLowEdgeEnergy(iMomentum) ) 
break;
 
  843   if ( iMomentum >= fEnergyBin ) iMomentum = fEnergyBin-1;   
 
  844   if ( iMomentum < 0 )           iMomentum = 0; 
 
  847   if (iMomentum == fEnergyBin -1 || iMomentum == 0 )   
 
  849     position = (*(*fAngleTable)(iMomentum))(fAngleBin-2)*
G4UniformRand();
 
  853     for(iAngle = 0; iAngle < fAngleBin-1; iAngle++)
 
  855       if( position < (*(*fAngleTable)(iMomentum))(iAngle) ) 
break;
 
  857     if (iAngle >= fAngleBin-1) iAngle = fAngleBin-2;
 
  872     for(iAngle = 0; iAngle < fAngleBin-1; iAngle++)
 
  875       if( position > (*(*fAngleTable)(iMomentum))(iAngle) ) 
break;
 
  877     if (iAngle >= fAngleBin-1) iAngle = fAngleBin-2;
 
  895     for(iAngle = 0; iAngle < fAngleBin-1; iAngle++)
 
  898       if( position > (*(*fAngleTable)(iMomentum))(iAngle) ) 
break;
 
  900     if (iAngle >= fAngleBin-1) iAngle = fAngleBin-2;
 
  914     randAngle = W1*theta1 + W2*theta2;
 
  941     G4cout<<
"G4NuclNuclDiffuseElastic::Initialise() the element with Z = " 
  942       <<Z<<
"; and A = "<<A<<
G4endl;
 
  944   fElementNumberVector.push_back(fAtomicNumber);
 
  948   fAngleBank.push_back(fAngleTable);
 
  962   G4double alpha1, alpha2, alphaMax, alphaCoulomb, delta = 0., sum = 0.;
 
  970   for( i = 0; i < fEnergyBin; i++)
 
  977     partMom     = std::sqrt( kinE*(kinE + 2*m1) );
 
  981     alphaMax = fRutherfordTheta*fCofAlphaMax;
 
  983     if(alphaMax > 
pi) alphaMax = 
pi;
 
  986     alphaCoulomb = fRutherfordTheta*fCofAlphaCoulomb;
 
  994     G4double delth = (alphaMax-alphaCoulomb)/fAngleBin;
 
 1002     for(j = fAngleBin-1; j >= 1; j--)
 
 1010       alpha1 = alphaCoulomb + delth*(j-1);
 
 1012       alpha2 = alpha1 + delth;
 
 1019       angleVector->
PutValue( j-1 , alpha1, sum ); 
 
 1022     fAngleTable->
insertAt(i,angleVector);
 
 1041     randAngle = (*fAngleTable)(iMomentum)->GetLowEdgeEnergy(iAngle);
 
 1046     if ( iAngle >= 
G4int((*fAngleTable)(iMomentum)->GetVectorLength()) )
 
 1048       iAngle = (*fAngleTable)(iMomentum)->GetVectorLength() - 1;
 
 1050     y1 = (*(*fAngleTable)(iMomentum))(iAngle-1);
 
 1051     y2 = (*(*fAngleTable)(iMomentum))(iAngle);
 
 1053     x1 = (*fAngleTable)(iMomentum)->GetLowEdgeEnergy(iAngle-1);
 
 1054     x2 = (*fAngleTable)(iMomentum)->GetLowEdgeEnergy(iAngle);
 
 1056     if ( x1 == x2 )   randAngle = 
x2;
 
 1062         randAngle = x1 + ( position - 
y1 )*( x2 - x1 )/( y2 - 
y1 );
 
 1101   t = 
SampleT( theParticle, ptot, A);
 
 1104   if(!(t < 0.0 || t >= 0.0)) 
 
 1108       G4cout << 
"G4NuclNuclDiffuseElastic:WARNING: A = " << A 
 
 1109          << 
" mom(GeV)= " << plab/
GeV  
 1110              << 
" S-wave will be sampled"  
 1117     G4cout <<
" t= " << t << 
" tmax= " << tmax 
 
 1118        << 
" ptot= " << ptot << 
G4endl;
 
 1131   else if( cost <= -1.0) 
 
 1138     sint = std::sqrt((1.0-cost)*(1.0+cost));
 
 1142     G4cout << 
"cos(t)=" << cost << 
" std::sin(t)=" << sint << 
G4endl;
 
 1144   G4ThreeVector v1(sint*std::cos(phi),sint*std::sin(phi),cost);
 
 1185   G4double cost = std::cos(thetaCMS);
 
 1193   else if( cost <= -1.0) 
 
 1200     sint = std::sqrt((1.0-cost)*(1.0+cost));
 
 1204     G4cout << 
"cos(tcms)=" << cost << 
" std::sin(tcms)=" << sint << 
G4endl;
 
 1206   G4ThreeVector v1(sint*std::cos(phi),sint*std::sin(phi),cost);
 
 1246   G4double cost = std::cos(thetaLab);
 
 1254   else if( cost <= -1.0) 
 
 1261     sint = std::sqrt((1.0-cost)*(1.0+cost));
 
 1265     G4cout << 
"cos(tlab)=" << cost << 
" std::sin(tlab)=" << sint << 
G4endl;
 
 1267   G4ThreeVector v1(sint*std::cos(phi),sint*std::sin(phi),cost);
 
 1295   G4cout<<
"G4NuclNuclDiffuseElastic::TestAngleTable() init the element with Z = " 
 1296       <<Z<<
"; and A = "<<A<<
G4endl;
 
 1298   fElementNumberVector.push_back(fAtomicNumber);
 
 1305   G4double alpha1=0., alpha2=0., alphaMax=0., alphaCoulomb=0.;
 
 1306   G4double deltaL10 = 0., deltaL96 = 0., deltaAG = 0.;
 
 1307   G4double sumL10 = 0.,sumL96 = 0.,sumAG = 0.;
 
 1314   fWaveVector = partMom/
hbarc;
 
 1316   G4double kR     = fWaveVector*fNuclearRadius;
 
 1321   alphaMax = kRmax*kRmax/kR2;
 
 1323   if (alphaMax > 4.) alphaMax = 4.;  
 
 1325   alphaCoulomb = kRcoul*kRcoul/kR2;
 
 1330       fBeta       = a/std::sqrt(1+a*a);
 
 1332       fAm         = 
CalculateAm( partMom, fZommerfeld, fAtomicNumber);
 
 1339   fAddCoulomb = 
false;
 
 1341   for(j = 1; j < fAngleBin; j++)
 
 1346     alpha1 = alphaMax*(j-1)/fAngleBin;
 
 1347     alpha2 = alphaMax*( j )/fAngleBin;
 
 1349     if( ( alpha2 > alphaCoulomb ) && 
z ) fAddCoulomb = 
true;
 
 1354                                        alpha1, alpha2,epsilon);
 
 1364             <<sumL10<<
"\t"<<sumL96<<
"\t"<<sumAG<<
G4endl;
 
 1366     angleVector->
PutValue( j-1 , alpha1, sumL10 ); 
 
 1368   fAngleTable->
insertAt(i,angleVector);
 
 1369   fAngleBank.push_back(fAngleTable);
 
 1394   if     ( n  < 0 ) legPol = 0.;
 
 1395   else if( n == 0 ) legPol = 1.;
 
 1396   else if( n == 1 ) legPol = 
x;
 
 1397   else if( n == 2 ) legPol = (3.*x*x-1.)/2.;
 
 1398   else if( n == 3 ) legPol = (5.*x*x*x-3.*
x)/2.;
 
 1399   else if( n == 4 ) legPol = (35.*x*x*x*x-30.*x*x+3.)/8.;
 
 1400   else if( n == 5 ) legPol = (63.*x*x*x*x*x-70.*x*x*x+15.*
x)/8.;
 
 1401   else if( n == 6 ) legPol = (231.*x*x*x*x*x*x-315.*x*x*x*x+105.*x*x-5.)/16.;
 
 1406     legPol = std::sqrt( 2./(n*CLHEP::pi*std::sin(theta+epsilon)) )*std::sin( (n+0.5)*theta+0.25*CLHEP::pi );
 
 1418   G4double n2, cofn, shny, chny, fn, gn;
 
 1429   G4double cof1 = std::exp(-x*x)/CLHEP::pi;
 
 1437   for( n = 1; n <= nMax; n++)
 
 1441     cofn = std::exp(-0.5*n2)/(n2+twox2);  
 
 1443     chny = std::cosh(n*y);
 
 1444     shny = std::sinh(n*y);
 
 1446     fn  = twox - twoxcos2xy*chny + n*sin2xy*shny;
 
 1447     gn  =        twoxsin2xy*chny + n*cos2xy*shny;
 
 1458   if(std::abs(x) < 0.0001)
 
 1465     outRe += 
GetErf(x) + cof1*(1-cos2xy)/twox;
 
 1466     outIm += cof1*sin2xy/twox;
 
 1489   outRe *= 2./std::sqrt(CLHEP::pi);
 
 1490   outIm *= 2./std::sqrt(CLHEP::pi);
 
 1504   G4double sinThetaR      = 2.*fHalfRutThetaTg/(1. + fHalfRutThetaTg2);
 
 1505   G4double cosHalfThetaR2 = 1./(1. + fHalfRutThetaTg2);
 
 1507   G4double u              = std::sqrt(0.5*fProfileLambda/sinThetaR);
 
 1508   G4double kappa          = u/std::sqrt(CLHEP::pi);
 
 1509   G4double dTheta         = theta - fRutherfordTheta;
 
 1516   order                  /= std::sqrt(2.);
 
 1519   G4complex a0            = 0.5*(1. + 4.*(1.+im*u2)*cosHalfThetaR2/3.)/sinThetaR;
 
 1520   G4complex a1            = 0.5*(1. + 2.*(1.+im*u2m2p3)*cosHalfThetaR2)/sinThetaR;
 
 1521   G4complex out           = gamma*(1. - a1*dTheta) - a0;
 
 1532   G4double sinThetaR      = 2.*fHalfRutThetaTg/(1. + fHalfRutThetaTg2);
 
 1533   G4double cosHalfThetaR2 = 1./(1. + fHalfRutThetaTg2);
 
 1535   G4double u              = std::sqrt(0.5*fProfileLambda/sinThetaR);
 
 1536   G4double kappa          = u/std::sqrt(CLHEP::pi);
 
 1537   G4double dTheta         = theta - fRutherfordTheta;
 
 1544   order                  /= std::sqrt(2.);
 
 1546   G4complex a0            = 0.5*(1. + 4.*(1.+im*u2)*cosHalfThetaR2/3.)/sinThetaR;
 
 1547   G4complex a1            = 0.5*(1. + 2.*(1.+im*u2m2p3)*cosHalfThetaR2)/sinThetaR;
 
 1548   G4complex out           = -gamma*(1. - a1*dTheta) - a0;
 
 1559   G4double kappa = std::sqrt(0.5*fProfileLambda/std::sin(theta)/CLHEP::pi);
 
 1564   if( theta <= fRutherfordTheta )
 
 1584   G4double sinThetaR  = 2.*fHalfRutThetaTg/(1. + fHalfRutThetaTg2);
 
 1585   G4double dTheta     = 0.5*(theta - fRutherfordTheta);
 
 1586   G4double sindTheta  = std::sin(dTheta);
 
 1587   G4double persqrt2   = std::sqrt(0.5);
 
 1590   order              *= std::sqrt(0.5*fProfileLambda/sinThetaR)*2.*sindTheta;
 
 1595   if ( theta <= fRutherfordTheta )
 
 1620   for( n = 0; n < fMaxL; n++)
 
 1624     b = ( std::sqrt( 
G4double(n*(n+1)) ) )/fWaveVector;
 
 1626     T12b = fSumSigma*std::exp(-b2/fNuclearRadiusSquare)/CLHEP::pi/fNuclearRadiusSquare;         
 
 1627     shiftN = std::exp( -0.5*(1.-im*fEtaRatio)*T12b ) - 1.;
 
 1630   out /= 2.*im*fWaveVector;
 
 1643   G4double T12b, 
a, aTemp, b2, sinThetaH = std::sin(0.5*theta);
 
 1644   G4double sinThetaH2 = sinThetaH*sinThetaH;
 
 1648   a  = -fSumSigma/CLHEP::twopi/fNuclearRadiusSquare;
 
 1649   b2 = fWaveVector*fWaveVector*fNuclearRadiusSquare*sinThetaH2;
 
 1653   for( n = 1; n < fMaxL; n++)
 
 1655     T12b   = aTemp*std::exp(-b2/n)/
n;         
 
 1660   out *= -4.*im*fWaveVector/CLHEP::pi;
 
 1681   fNuclearRadius = fNuclearRadius1 + fNuclearRadius2;
 
 1687   fWaveVector = partMom/CLHEP::hbarc;
 
 1695     fBeta       = a/std::sqrt(1+a*a);
 
 1697     fRutherfordRatio = fZommerfeld/fWaveVector; 
 
 1698     fAm         = 
CalculateAm( partMom, fZommerfeld, fAtomicNumber);
 
 1703   fProfileDelta  = fCofDelta*fProfileLambda;
 
 1704   fProfileAlpha  = fCofAlpha*fProfileLambda;
 
 1723   fWaveVector = partMom/CLHEP::hbarc;
 
 1730     fBeta       = a/std::sqrt(1+a*a);
 
 1732     fRutherfordRatio = fZommerfeld/fWaveVector; 
 
 1733     fAm         = 
CalculateAm( partMom, fZommerfeld, fAtomicNumber);
 
 1736   fProfileDelta  = fCofDelta*fProfileLambda;
 
 1737   fProfileAlpha  = fCofAlpha*fProfileLambda;
 
 1760   fNuclearRadiusSquare = fNuclearRadius1*fNuclearRadius1+fNuclearRadius2*fNuclearRadius2;
 
 1767   fWaveVector = partMom/CLHEP::hbarc;
 
 1770   if( pN < 0. ) pN = 0.;
 
 1773   if( tN < 0. ) tN = 0.;
 
 1782   G4cout<<
"fSumSigma = "<<fSumSigma/CLHEP::millibarn<<
" mb"<<
G4endl;
 
 1783   G4cout<<
"pi*R2 = "<<CLHEP::pi*fNuclearRadiusSquare/CLHEP::millibarn<<
" mb"<<
G4endl;
 
 1784   kR12 = fWaveVector*std::sqrt(fNuclearRadiusSquare);
 
 1786   fMaxL = (
G4int(kR12)+1)*4;
 
 1792       fBeta       = a/std::sqrt(1+a*a);
 
 1794       fAm         = 
CalculateAm( partMom, fZommerfeld, fAtomicNumber);
 
 1823   G4double proj_energy   = proj_mass + pTkin; 
 
 1824   G4double proj_momentum = std::sqrt(pTkin*(pTkin+2*proj_mass));
 
 1828   sMand         /= CLHEP::GeV*CLHEP::GeV;  
 
 1829   proj_momentum /= CLHEP::GeV;
 
 1830   proj_energy   /= CLHEP::GeV;
 
 1831   proj_mass     /= CLHEP::GeV;
 
 1839   if( proj_momentum >= 1.2 )
 
 1841     fEtaRatio  = 0.13*(logS - 5.8579332)*std::pow(sMand,-0.18);
 
 1843   else if( proj_momentum >= 0.6 )
 
 1845     fEtaRatio = -75.5*(std::pow(proj_momentum,0.25)-0.95)/
 
 1846       (std::pow(3*proj_momentum,2.2)+1);     
 
 1850     fEtaRatio = 15.5*proj_momentum/(27*proj_momentum*proj_momentum*proj_momentum+2);
 
 1856   if( proj_momentum >= 10. ) 
 
 1863     if( proj_momentum >= 10.)
 
 1866         A0 = 100. - B0*std::log(3.0e7);
 
 1868         xsection = A0 + B0*std::log(proj_energy) - 11
 
 1869                   + 103*std::pow(2*0.93827*proj_energy + proj_mass*proj_mass+
 
 1870                      0.93827*0.93827,-0.165);        
 
 1875       if(pParticle == tParticle) 
 
 1877         if( proj_momentum < 0.73 )
 
 1879           hnXsc = 23 + 50*( std::pow( std::log(0.73/proj_momentum), 3.5 ) );
 
 1881         else if( proj_momentum < 1.05  )
 
 1883           hnXsc = 23 + 40*(std::log(proj_momentum/0.73))*
 
 1884                          (std::log(proj_momentum/0.73));
 
 1889               75*(proj_momentum - 1.2)/(std::pow(proj_momentum,3.0) + 0.15);
 
 1895         if( proj_momentum < 0.8 )
 
 1897           hpXsc = 33+30*std::pow(std::log(proj_momentum/1.3),4.0);
 
 1899         else if( proj_momentum < 1.4 )
 
 1901           hpXsc = 33+30*std::pow(std::log(proj_momentum/0.95),2.0);
 
 1906               20.8*(std::pow(proj_momentum,2.0)-1.35)/
 
 1907                  (std::pow(proj_momentum,2.50)+0.95);
 
 1912   xsection *= CLHEP::millibarn; 
 
 1913   G4cout<<
"xsection = "<<xsection/CLHEP::millibarn<<
" mb"<<
G4endl;
 
 1923   G4double sinThetaR  = 2.*fHalfRutThetaTg/(1. + fHalfRutThetaTg2);
 
 1924   G4double dTheta     = 0.5*(theta - fRutherfordTheta);
 
 1925   G4double sindTheta  = std::sin(dTheta);
 
 1930   G4double order      = std::sqrt(fProfileLambda/sinThetaR/CLHEP::pi)*2.*sindTheta;
 
 1932   order = std::abs(order); 
 
 1940   if ( theta <= fRutherfordTheta )
 
 1942     out  = 1. + 0.5*( (0.5-cosFresnel)*(0.5-cosFresnel)+(0.5-sinFresnel)*(0.5-sinFresnel) )*prof2; 
 
 1943     out += ( cosFresnel + sinFresnel - 1. )*prof;
 
 1947     out = 0.5*( (0.5-cosFresnel)*(0.5-cosFresnel)+(0.5-sinFresnel)*(0.5-sinFresnel) )*prof2;
 
 1960   const G4double cof[6] = { 76.18009172947146,     -86.50532032941677,
 
 1961                              24.01409824083091,      -1.231739572450155,
 
 1962                               0.1208650973866179e-2, -0.5395239384953e-5  } ;
 
 1966   tmp -= (z + 0.5) * std::log(tmp);
 
 1969   for ( j = 0; j <= 5; j++ )
 
 1974   return -tmp + std::log(2.5066282746310005*ser);
 
 1984   G4double modvalue, value2, fact1, fact2, arg, shift, bessel;
 
 1986   modvalue = std::fabs(value);
 
 1990     value2 = value*
value;
 
 1992     fact1  = 57568490574.0 + value2*(-13362590354.0 
 
 1993                            + value2*( 651619640.7 
 
 1994                            + value2*(-11214424.18 
 
 1995                            + value2*( 77392.33017 
 
 1996                            + value2*(-184.9052456   ) ) ) ) );
 
 1998     fact2  = 57568490411.0 + value2*( 1029532985.0 
 
 1999                            + value2*( 9494680.718
 
 2000                            + value2*(59272.64853
 
 2001                            + value2*(267.8532712 
 
 2002                            + value2*1.0               ) ) ) );
 
 2004     bessel = fact1/fact2;
 
 2012     shift  = modvalue-0.785398164;
 
 2014     fact1  = 1.0 + value2*(-0.1098628627e-2 
 
 2015                  + value2*(0.2734510407e-4
 
 2016                  + value2*(-0.2073370639e-5 
 
 2017                  + value2*0.2093887211e-6    ) ) );
 
 2019     fact2  = -0.1562499995e-1 + value2*(0.1430488765e-3
 
 2020                               + value2*(-0.6911147651e-5 
 
 2021                               + value2*(0.7621095161e-6
 
 2022                               - value2*0.934945152e-7    ) ) );
 
 2024     bessel = std::sqrt(0.636619772/modvalue)*(std::cos(shift)*fact1 - arg*std::sin(shift)*fact2 );
 
 2036   G4double modvalue, value2, fact1, fact2, arg, shift, bessel;
 
 2038   modvalue = std::fabs(value);
 
 2040   if ( modvalue < 8.0 ) 
 
 2042     value2 = value*
value;
 
 2044     fact1  = value*(72362614232.0 + value2*(-7895059235.0 
 
 2045                                   + value2*( 242396853.1
 
 2046                                   + value2*(-2972611.439 
 
 2047                                   + value2*( 15704.48260 
 
 2048                                   + value2*(-30.16036606  ) ) ) ) ) );
 
 2050     fact2  = 144725228442.0 + value2*(2300535178.0 
 
 2051                             + value2*(18583304.74
 
 2052                             + value2*(99447.43394 
 
 2053                             + value2*(376.9991397 
 
 2054                             + value2*1.0             ) ) ) );
 
 2055     bessel = fact1/fact2;
 
 2063     shift  = modvalue - 2.356194491;
 
 2065     fact1  = 1.0 + value2*( 0.183105e-2 
 
 2066                  + value2*(-0.3516396496e-4
 
 2067                  + value2*(0.2457520174e-5 
 
 2068                  + value2*(-0.240337019e-6          ) ) ) );
 
 2070     fact2 = 0.04687499995 + value2*(-0.2002690873e-3
 
 2071                           + value2*( 0.8449199096e-5
 
 2072                           + value2*(-0.88228987e-6
 
 2073                           + value2*0.105787412e-6       ) ) );
 
 2075     bessel = std::sqrt( 0.636619772/modvalue)*(std::cos(shift)*fact1 - arg*std::sin(shift)*fact2);
 
 2077     if (value < 0.0) bessel = -bessel;
 
G4double Legendre10(T &typeT, F f, G4double a, G4double b)
ThreeVector shoot(const G4int Ap, const G4int Af)
Hep3Vector boostVector() const 
static G4double GetNuclearMass(const G4double A, const G4double Z)
G4double CalculateNuclearRad(G4double A)
G4double Legendre96(T &typeT, F f, G4double a, G4double b)
void PutValue(size_t binNumber, G4double binValue, G4double dataValue)
G4double GetKineticEnergy() const 
G4NuclNuclDiffuseElastic()
G4double GetExpSin(G4double x)
G4double CalculateAm(G4double momentum, G4double n, G4double Z)
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
G4double SampleTableThetaCMS(const G4ParticleDefinition *aParticle, G4double p, G4double Z, G4double A)
G4double GetScatteringAngle(G4int iMomentum, G4int iAngle, G4double position)
G4double DampFactor(G4double z)
G4double GetExpCos(G4double x)
G4double GetDiffElasticProb(G4double theta)
G4double G4NeutronHPJENDLHEData::G4double result
G4complex AmplitudeNear(G4double theta)
G4double GetInvCoulombElasticXsc(const G4ParticleDefinition *particle, G4double tMand, G4double momentum, G4double A, G4double Z)
G4complex PhaseNear(G4double theta)
G4complex CoulombAmplitude(G4double theta)
G4double GetErf(G4double x)
G4ParticleDefinition * GetDefinition() const 
G4complex AmplitudeGla(G4double theta)
G4double GetDiffuseElasticSumXsc(const G4ParticleDefinition *particle, G4double theta, G4double momentum, G4double A, G4double Z)
G4double GetCoulombElasticXsc(const G4ParticleDefinition *particle, G4double theta, G4double momentum, G4double Z)
void CalculateCoulombPhaseZero()
G4double GetLowEdgeEnergy(size_t binNumber) const 
G4double GetDiffuseElasticXsc(const G4ParticleDefinition *particle, G4double theta, G4double momentum, G4double A)
G4double CalculateParticleBeta(const G4ParticleDefinition *particle, G4double momentum)
G4double SampleThetaCMS(const G4ParticleDefinition *aParticle, G4double p, G4double A)
G4double AdaptiveGauss(T &typeT, F f, G4double a, G4double b, G4double e)
G4double Profile(G4double theta)
G4complex AmplitudeGG(G4double theta)
G4double GetTotalMomentum() const 
void SetMinEnergy(G4double anEnergy)
G4double CalculateCoulombPhase(G4int n)
std::complex< G4double > G4complex
G4IonTable * GetIonTable() const 
G4GLOB_DLL std::ostream G4cout
G4double GetHadronNucleonXscNS(G4ParticleDefinition *pParticle, G4double pTkin, G4ParticleDefinition *tParticle)
static size_t GetNumberOfElements()
const G4ParticleDefinition * GetDefinition() const 
void CalculateRutherfordAnglePar()
void TestAngleTable(const G4ParticleDefinition *theParticle, G4double partMom, G4double Z, G4double A)
void InitParametersGla(const G4DynamicParticle *aParticle, G4double partMom, G4double Z, G4double A)
HepLorentzVector & boost(double, double, double)
G4double GetIntegrandFunction(G4double theta)
static G4Triton * Triton()
static G4Proton * Proton()
G4double BesselJone(G4double z)
static G4PionPlus * PionPlus()
G4double GetInvElasticXsc(const G4ParticleDefinition *particle, G4double theta, G4double momentum, G4double A, G4double Z)
G4double SampleT(const G4ParticleDefinition *aParticle, G4double p, G4double A)
G4double GetDiffElasticSumProb(G4double theta)
static G4Neutron * Neutron()
virtual G4double SampleInvariantT(const G4ParticleDefinition *p, G4double plab, G4int Z, G4int A)
G4complex GammaMore(G4double theta)
const G4LorentzVector & Get4Momentum() const 
static G4Deuteron * Deuteron()
G4LorentzVector Get4Momentum() const 
G4double ThetaCMStoThetaLab(const G4DynamicParticle *aParticle, G4double tmass, G4double thetaCMS)
void InitialiseOnFly(G4double Z, G4double A)
G4double BesselJzero(G4double z)
G4double CalculateZommerfeld(G4double beta, G4double Z1, G4double Z2)
G4double GetPDGMass() const 
static G4ParticleTable * GetParticleTable()
void InitDynParameters(const G4ParticleDefinition *theParticle, G4double partMom)
G4double GetRatioGen(G4double theta)
G4complex GammaLess(G4double theta)
static G4PionMinus * PionMinus()
G4double ProfileNear(G4double theta)
G4double GetFresnelIntegrandXsc(G4double alpha)
G4double SampleTableT(const G4ParticleDefinition *aParticle, G4double p, G4double Z, G4double A)
G4complex GetErfcInt(G4complex z)
void insertAt(size_t, G4PhysicsVector *)
G4complex GetErfInt(G4complex z)
void SetMaxEnergy(const G4double anEnergy)
const XML_Char int const XML_Char * value
G4double CalcMandelstamS(const G4double mp, const G4double mt, const G4double Plab)
virtual ~G4NuclNuclDiffuseElastic()
G4double GetLegendrePol(G4int n, G4double x)
std::vector< G4Element * > G4ElementTable
static G4ElementTable * GetElementTable()
G4double GetPDGCharge() const 
G4double GetSint(G4double x)
G4complex AmplitudeSim(G4double theta)
G4double GetInvElasticSumXsc(const G4ParticleDefinition *particle, G4double tMand, G4double momentum, G4double A, G4double Z)
G4complex GetErfComp(G4complex z, G4int nMax)
G4double ThetaLabToThetaCMS(const G4DynamicParticle *aParticle, G4double tmass, G4double thetaLab)
G4double GetDiffElasticSumProbA(G4double alpha)
G4double IntegralElasticProb(const G4ParticleDefinition *particle, G4double theta, G4double momentum, G4double A)
G4double SampleThetaLab(const G4HadProjectile *aParticle, G4double tmass, G4double A)
G4int GetBaryonNumber() const 
G4double GetTotalMomentum() const 
G4double GetCint(G4double x)
G4complex GammaLogarithm(G4complex xx)
G4double BesselOneByArg(G4double z)
void InitParameters(const G4ParticleDefinition *theParticle, G4double partMom, G4double Z, G4double A)