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) );
716 G4double norm, result, theta1, theta2, thetaMax, sum = 0.;
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);
751 result += G4RandGauss::shoot(0.,sigma);
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);