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;
418 delta = 0.1*fermi*fermi;
424 diffuse = 0.63*fermi;
426 delta = 0.1*fermi*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;
496 delta = 0.1*fermi*fermi;
502 diffuse = 0.63*fermi;
504 delta = 0.1*fermi*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;
593 delta = 0.1*fermi*fermi;
599 diffuse = 0.63*fermi;
601 delta = 0.1*fermi*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 )
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);
1037 G4double x1, x2, y1, y2, randAngle;
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;
1059 if ( y1 == y2 ) randAngle = x1 + ( x2 - x1 )*
G4UniformRand();
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);
1363 G4cout<<alpha1<<
"\t"<<std::sqrt(alpha1)/degree<<
"\t"
1364 <<sumL10<<
"\t"<<sumL96<<
"\t"<<sumAG<<
G4endl;
1366 angleVector->
PutValue( j-1 , alpha1, sumL10 );
1368 fAngleTable->insertAt(i,angleVector);
1369 fAngleBank.push_back(fAngleTable);
std::vector< G4Element * > G4ElementTable
G4DLLIMPORT std::ostream G4cout
Hep3Vector boostVector() const
HepLorentzVector & boost(double, double, double)
static G4Deuteron * Deuteron()
G4ParticleDefinition * GetDefinition() const
G4LorentzVector Get4Momentum() const
G4double GetTotalMomentum() const
static size_t GetNumberOfElements()
static const G4ElementTable * GetElementTable()
G4double GetTotalMomentum() const
const G4ParticleDefinition * GetDefinition() const
const G4LorentzVector & Get4Momentum() const
void SetMinEnergy(G4double anEnergy)
void SetMaxEnergy(const G4double anEnergy)
static G4Neutron * Neutron()
G4double GetInvElasticXsc(const G4ParticleDefinition *particle, G4double theta, G4double momentum, G4double A, G4double Z)
G4double ThetaLabToThetaCMS(const G4DynamicParticle *aParticle, G4double tmass, G4double thetaLab)
G4double CalculateZommerfeld(G4double beta, G4double Z1, G4double Z2)
G4double SampleThetaLab(const G4HadProjectile *aParticle, G4double tmass, G4double A)
G4double CalculateParticleBeta(const G4ParticleDefinition *particle, G4double momentum)
void TestAngleTable(const G4ParticleDefinition *theParticle, G4double partMom, G4double Z, G4double A)
G4double GetDiffElasticSumProb(G4double theta)
G4double GetInvCoulombElasticXsc(const G4ParticleDefinition *particle, G4double tMand, G4double momentum, G4double A, G4double Z)
void InitialiseOnFly(G4double Z, G4double A)
G4NuclNuclDiffuseElastic()
G4double BesselJzero(G4double z)
G4double GetCoulombElasticXsc(const G4ParticleDefinition *particle, G4double theta, G4double momentum, G4double Z)
virtual ~G4NuclNuclDiffuseElastic()
G4double GetInvElasticSumXsc(const G4ParticleDefinition *particle, G4double tMand, G4double momentum, G4double A, G4double Z)
G4double GetIntegrandFunction(G4double theta)
G4double IntegralElasticProb(const G4ParticleDefinition *particle, G4double theta, G4double momentum, G4double A)
G4double SampleTableThetaCMS(const G4ParticleDefinition *aParticle, G4double p, G4double Z, G4double A)
G4double SampleT(const G4ParticleDefinition *aParticle, G4double p, G4double A)
G4double BesselOneByArg(G4double z)
G4double GetDiffuseElasticSumXsc(const G4ParticleDefinition *particle, G4double theta, G4double momentum, G4double A, G4double Z)
G4double GetScatteringAngle(G4int iMomentum, G4int iAngle, G4double position)
G4double GetDiffElasticSumProbA(G4double alpha)
G4double ThetaCMStoThetaLab(const G4DynamicParticle *aParticle, G4double tmass, G4double thetaCMS)
G4double SampleTableT(const G4ParticleDefinition *aParticle, G4double p, G4double Z, G4double A)
G4double SampleThetaCMS(const G4ParticleDefinition *aParticle, G4double p, G4double A)
G4double BesselJone(G4double z)
void InitDynParameters(const G4ParticleDefinition *theParticle, G4double partMom)
G4double CalculateNuclearRad(G4double A)
G4double GetDiffuseElasticXsc(const G4ParticleDefinition *particle, G4double theta, G4double momentum, G4double A)
virtual G4double SampleInvariantT(const G4ParticleDefinition *p, G4double plab, G4int Z, G4int A)
G4double GetFresnelIntegrandXsc(G4double alpha)
G4double DampFactor(G4double z)
G4double GetDiffElasticProb(G4double theta)
G4double CalculateAm(G4double momentum, G4double n, G4double Z)
static G4double GetNuclearMass(const G4double A, const G4double Z)
G4double GetPDGMass() const
G4double GetPDGCharge() const
G4int GetBaryonNumber() const
G4ParticleDefinition * FindIon(G4int atomicNumber, G4int atomicMass, G4double excitationEnergy)
static G4ParticleTable * GetParticleTable()
void PutValue(size_t binNumber, G4double binValue, G4double dataValue)
virtual G4double GetLowEdgeEnergy(size_t binNumber) const
static G4PionMinus * PionMinus()
static G4PionPlus * PionPlus()
static G4Proton * Proton()
static G4Triton * Triton()