Import Geant4 9.1.0 source tree
This commit is contained in:
@@ -14,6 +14,51 @@ code and to keep track of all tags.
|
||||
* Please list in reverse chronological order (last date on top)
|
||||
---------------------------------------------------------------
|
||||
|
||||
10 Dec 2007 - V.Ivanchenko (hadr-cohe-V09-00-07)
|
||||
G4HadronElastic - set threshold to G4ElasticHadrNucleusHE model
|
||||
DBL_MAX
|
||||
|
||||
15 Nov 2007 - V.Ivanchenko (hadr-cohe-V09-00-06)
|
||||
------------------------------------------------
|
||||
G4UHadronElasticProcess - introduced "ifdef VERBOSE" for verbosity
|
||||
checks inside methods called at each step
|
||||
|
||||
14 Nov 2007 - V.Ivanchenko (hadr-cohe-V09-00-04)
|
||||
------------------------------------------------
|
||||
G4DiffuseElastic - add control on verbosity at initialisation
|
||||
|
||||
13 Nov 2007 - V.Ivanchenko (hadr-cohe-V09-00-03)
|
||||
------------------------------------------------
|
||||
G4ElasticHadrNucleusHE - (N.Starkov) updated:
|
||||
- the difference in scattering off protons and
|
||||
neutrons is included;
|
||||
- optized computation of the distribution function
|
||||
(important for heavy targets);
|
||||
- fixed model for scattering off hydrogen;
|
||||
- tunned model parameters for better description
|
||||
of total and elastic cross sections
|
||||
|
||||
06 Nov 2007 - V.Ivanchenko (hadr-cohe-V09-00-02)
|
||||
------------------------------------------------
|
||||
G4DiffuseElastic - (V.Grichine) initialisation of the model for
|
||||
each new target nucleus on-fly
|
||||
|
||||
05 Nov 2007 - V.Ivanchenko (hadr-cohe-V09-00-01)
|
||||
------------------------------------------------
|
||||
|
||||
G4DiffuseElastic - (V.Grichine) initialisation of the model in
|
||||
constructor with particle definition for the
|
||||
vector of available elements; tuning
|
||||
at high energies.
|
||||
|
||||
17 Oct 2007 - V.Ivanchenko (hadr-cohe-V09-00-00)
|
||||
------------------------------------------------
|
||||
G4LEnp - removed erroneous code for identity
|
||||
exchange of particles ( F.W. Jones)
|
||||
|
||||
G4DiffuseElastic - added Coulomb elastic scattering amplitude
|
||||
using Wentzel model (V. Grichine)
|
||||
|
||||
14 June 2007 - V.Ivanchenko (hadr-cohe-V08-03-07)
|
||||
------------------------------------------------
|
||||
G4UHadronElasticProcess - use "true" flag colling CHIPS to compute cross
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ChargeExchange.hh,v 1.3 2006/08/02 10:55:54 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// G4 Model: Charge and strangness exchange based on G4LightMedia model
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ChargeExchangeProcess.hh,v 1.2 2006/06/29 20:08:57 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Geant4 Hadron Elastic Charge Exchange Process -- header file
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4DiffuseElastic.hh,v 1.7 2007/06/12 14:46:26 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: G4DiffuseElastic.hh,v 1.13 2007/11/06 17:01:20 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// G4 Model: optical elastic scattering with 4-momentum balance
|
||||
@@ -35,7 +35,8 @@
|
||||
// Class Description - End
|
||||
//
|
||||
//
|
||||
// 24.05.07 V. Grichine first implementation for proton elastic scattering
|
||||
// 24.05.07 V. Grichine first implementation for hadron (no Coulomb) elastic scattering
|
||||
// 04.09.07 V. Grichine implementation for Coulomb elastic scattering
|
||||
|
||||
|
||||
#ifndef G4DiffuseElastic_h
|
||||
@@ -49,6 +50,8 @@
|
||||
using namespace std;
|
||||
|
||||
class G4ParticleDefinition;
|
||||
class G4PhysicsTable;
|
||||
class G4PhysicsLogVector;
|
||||
|
||||
class G4DiffuseElastic : public G4HadronicInteraction
|
||||
{
|
||||
@@ -56,7 +59,20 @@ public:
|
||||
|
||||
G4DiffuseElastic();
|
||||
|
||||
G4DiffuseElastic(const G4ParticleDefinition* aParticle);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
virtual ~G4DiffuseElastic();
|
||||
|
||||
void Initialise();
|
||||
|
||||
void InitialiseOnFly(G4double Z, G4double A);
|
||||
|
||||
void BuildAngleTable();
|
||||
|
||||
|
||||
G4HadFinalState * ApplyYourself(const G4HadProjectile & aTrack,
|
||||
G4Nucleus & targetNucleus);
|
||||
@@ -75,8 +91,16 @@ public:
|
||||
G4double SampleT(const G4ParticleDefinition* aParticle,
|
||||
G4double p, G4double A);
|
||||
|
||||
G4double SampleTableT(const G4ParticleDefinition* aParticle,
|
||||
G4double p, G4double Z, G4double A);
|
||||
|
||||
G4double SampleThetaCMS(const G4ParticleDefinition* aParticle, G4double p, G4double A);
|
||||
|
||||
G4double SampleTableThetaCMS(const G4ParticleDefinition* aParticle, G4double p,
|
||||
G4double Z, G4double A);
|
||||
|
||||
G4double GetScatteringAngle(G4int iMomentum, G4int iAngle, G4double position);
|
||||
|
||||
G4double SampleThetaLab(const G4HadProjectile* aParticle,
|
||||
G4double tmass, G4double A);
|
||||
|
||||
@@ -84,17 +108,72 @@ public:
|
||||
G4double theta,
|
||||
G4double momentum,
|
||||
G4double A );
|
||||
|
||||
G4double GetInvElasticXsc( const G4ParticleDefinition* particle,
|
||||
G4double theta,
|
||||
G4double momentum,
|
||||
G4double A, G4double Z );
|
||||
|
||||
G4double GetDiffuseElasticSumXsc( const G4ParticleDefinition* particle,
|
||||
G4double theta,
|
||||
G4double momentum,
|
||||
G4double A, G4double Z );
|
||||
|
||||
G4double GetInvElasticSumXsc( const G4ParticleDefinition* particle,
|
||||
G4double tMand,
|
||||
G4double momentum,
|
||||
G4double A, G4double Z );
|
||||
|
||||
G4double IntegralElasticProb( const G4ParticleDefinition* particle,
|
||||
G4double theta,
|
||||
G4double momentum,
|
||||
G4double A );
|
||||
|
||||
|
||||
G4double GetCoulombElasticXsc( const G4ParticleDefinition* particle,
|
||||
G4double theta,
|
||||
G4double momentum,
|
||||
G4double Z );
|
||||
|
||||
G4double GetInvCoulombElasticXsc( const G4ParticleDefinition* particle,
|
||||
G4double tMand,
|
||||
G4double momentum,
|
||||
G4double A, G4double Z );
|
||||
|
||||
G4double GetCoulombTotalXsc( const G4ParticleDefinition* particle,
|
||||
G4double momentum, G4double Z );
|
||||
|
||||
G4double GetCoulombIntegralXsc( const G4ParticleDefinition* particle,
|
||||
G4double momentum, G4double Z,
|
||||
G4double theta1, G4double theta2 );
|
||||
|
||||
|
||||
G4double CalculateParticleBeta( const G4ParticleDefinition* particle,
|
||||
G4double momentum );
|
||||
|
||||
G4double CalculateZommerfeld( G4double beta, G4double Z1, G4double Z2 );
|
||||
|
||||
G4double CalculateAm( G4double momentum, G4double n, G4double Z);
|
||||
|
||||
G4double CalculateNuclearRad( G4double A);
|
||||
|
||||
G4double ThetaCMStoThetaLab(const G4DynamicParticle* aParticle,
|
||||
G4double tmass, G4double thetaCMS);
|
||||
|
||||
G4double ThetaLabToThetaCMS(const G4DynamicParticle* aParticle,
|
||||
G4double tmass, G4double thetaLab);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
G4double BesselJzero(G4double z);
|
||||
G4double BesselJone(G4double z);
|
||||
G4double DampFactor(G4double z);
|
||||
G4double BesselOneByArg(G4double z);
|
||||
|
||||
G4double GetDiffElasticProb(G4double theta);
|
||||
G4double GetDiffElasticSumProb(G4double theta);
|
||||
G4double GetIntegrandFunction(G4double theta);
|
||||
|
||||
|
||||
@@ -117,13 +196,29 @@ private:
|
||||
G4double lowestEnergyLimit;
|
||||
G4double plabLowLimit;
|
||||
|
||||
G4int fEnergyBin;
|
||||
G4int fAngleBin;
|
||||
|
||||
G4PhysicsLogVector* fEnergyVector;
|
||||
G4PhysicsTable* fAngleTable;
|
||||
std::vector<G4PhysicsTable*> fAngleBank;
|
||||
|
||||
std::vector<G4double> fElementNumberVector;
|
||||
std::vector<G4String> fElementNameVector;
|
||||
|
||||
const G4ParticleDefinition* fParticle;
|
||||
G4double fWaveVector;
|
||||
G4double fAtomicWeight;
|
||||
G4double fAtomicNumber;
|
||||
G4double fNuclearRadius;
|
||||
G4double fBeta;
|
||||
G4double fZommerfeld;
|
||||
G4double fAm;
|
||||
G4bool fAddCoulomb;
|
||||
|
||||
};
|
||||
|
||||
|
||||
inline void G4DiffuseElastic::SetRecoilKinEnergyLimit(G4double value)
|
||||
{
|
||||
lowEnergyRecoilLimit = value;
|
||||
@@ -257,7 +352,7 @@ inline G4double G4DiffuseElastic::BesselJone(G4double value)
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// damp factor in diffraction x*pi/sh(x*pi)
|
||||
// damp factor in diffraction x/sh(x), x was already *pi
|
||||
|
||||
inline G4double G4DiffuseElastic::DampFactor(G4double x)
|
||||
{
|
||||
@@ -299,4 +394,148 @@ inline G4double G4DiffuseElastic::BesselOneByArg(G4double x)
|
||||
return result;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// return particle beta
|
||||
|
||||
inline G4double G4DiffuseElastic::CalculateParticleBeta( const G4ParticleDefinition* particle,
|
||||
G4double momentum )
|
||||
{
|
||||
G4double mass = particle->GetPDGMass();
|
||||
G4double a = momentum/mass;
|
||||
fBeta = a/std::sqrt(1+a*a);
|
||||
|
||||
return fBeta;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// return Zommerfeld parameter for Coulomb scattering
|
||||
|
||||
inline G4double G4DiffuseElastic::CalculateZommerfeld( G4double beta, G4double Z1, G4double Z2 )
|
||||
{
|
||||
fZommerfeld = fine_structure_const*Z1*Z2/beta;
|
||||
|
||||
return fZommerfeld;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// return Wentzel correction for Coulomb scattering
|
||||
|
||||
inline G4double G4DiffuseElastic::CalculateAm( G4double momentum, G4double n, G4double Z)
|
||||
{
|
||||
G4double k = momentum/hbarc;
|
||||
G4double ch = 1.13 + 3.76*n*n;
|
||||
G4double zn = 1.77*k*std::pow(Z,-1./3.)*Bohr_radius;
|
||||
G4double zn2 = zn*zn;
|
||||
fAm = ch/zn2;
|
||||
|
||||
return fAm;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// calculate nuclear radius for different atomic weights using different approximations
|
||||
|
||||
inline G4double G4DiffuseElastic::CalculateNuclearRad( G4double A)
|
||||
{
|
||||
G4double r0;
|
||||
|
||||
if(A < 50.)
|
||||
{
|
||||
if(A > 10.) r0 = 1.16*( 1 - std::pow(A, -2./3.) )*fermi; // 1.08*fermi;
|
||||
else r0 = 1.1*fermi;
|
||||
|
||||
fNuclearRadius = r0*std::pow(A, 1./3.);
|
||||
}
|
||||
else
|
||||
{
|
||||
r0 = 1.7*fermi;
|
||||
|
||||
fNuclearRadius = r0*std::pow(A, 0.27);
|
||||
}
|
||||
return fNuclearRadius;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// return Coulomb scattering differential xsc with Wentzel correction
|
||||
|
||||
inline G4double G4DiffuseElastic::GetCoulombElasticXsc( const G4ParticleDefinition* particle,
|
||||
G4double theta,
|
||||
G4double momentum,
|
||||
G4double Z )
|
||||
{
|
||||
G4double sinHalfTheta = std::sin(0.5*theta);
|
||||
G4double sinHalfTheta2 = sinHalfTheta*sinHalfTheta;
|
||||
G4double beta = CalculateParticleBeta( particle, momentum);
|
||||
G4double z = particle->GetPDGCharge();
|
||||
G4double n = CalculateZommerfeld( beta, z, Z );
|
||||
G4double am = CalculateAm( momentum, n, Z);
|
||||
G4double k = momentum/hbarc;
|
||||
G4double ch = 0.5*n/k;
|
||||
G4double ch2 = ch*ch;
|
||||
G4double xsc = ch2/(sinHalfTheta2+am)/(sinHalfTheta2+am);
|
||||
|
||||
return xsc;
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// return Coulomb scattering total xsc with Wentzel correction
|
||||
|
||||
inline G4double G4DiffuseElastic::GetCoulombTotalXsc( const G4ParticleDefinition* particle,
|
||||
G4double momentum, G4double Z )
|
||||
{
|
||||
G4double beta = CalculateParticleBeta( particle, momentum);
|
||||
G4cout<<"beta = "<<beta<<G4endl;
|
||||
G4double z = particle->GetPDGCharge();
|
||||
G4double n = CalculateZommerfeld( beta, z, Z );
|
||||
G4cout<<"fZomerfeld = "<<n<<G4endl;
|
||||
G4double am = CalculateAm( momentum, n, Z);
|
||||
G4cout<<"cof Am = "<<am<<G4endl;
|
||||
G4double k = momentum/hbarc;
|
||||
G4cout<<"k = "<<k*fermi<<" 1/fermi"<<G4endl;
|
||||
G4cout<<"k*Bohr_radius = "<<k*Bohr_radius<<G4endl;
|
||||
G4double ch = n/k;
|
||||
G4double ch2 = ch*ch;
|
||||
G4double xsc = ch2*pi/(am +am*am);
|
||||
|
||||
return xsc;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// return Coulomb scattering xsc with Wentzel correction integrated between
|
||||
// theta1 and < theta2
|
||||
|
||||
inline G4double G4DiffuseElastic::GetCoulombIntegralXsc( const G4ParticleDefinition* particle,
|
||||
G4double momentum, G4double Z,
|
||||
G4double theta1, G4double theta2 )
|
||||
{
|
||||
G4double c1 = std::cos(theta1);
|
||||
G4cout<<"c1 = "<<c1<<G4endl;
|
||||
G4double c2 = std::cos(theta2);
|
||||
G4cout<<"c2 = "<<c2<<G4endl;
|
||||
G4double beta = CalculateParticleBeta( particle, momentum);
|
||||
// G4cout<<"beta = "<<beta<<G4endl;
|
||||
G4double z = particle->GetPDGCharge();
|
||||
G4double n = CalculateZommerfeld( beta, z, Z );
|
||||
// G4cout<<"fZomerfeld = "<<n<<G4endl;
|
||||
G4double am = CalculateAm( momentum, n, Z);
|
||||
// G4cout<<"cof Am = "<<am<<G4endl;
|
||||
G4double k = momentum/hbarc;
|
||||
// G4cout<<"k = "<<k*fermi<<" 1/fermi"<<G4endl;
|
||||
// G4cout<<"k*Bohr_radius = "<<k*Bohr_radius<<G4endl;
|
||||
G4double ch = n/k;
|
||||
G4double ch2 = ch*ch;
|
||||
am *= 2.;
|
||||
G4double xsc = ch2*twopi*(c1-c2);
|
||||
xsc /= (1 - c1 + am)*(1 - c2 + am);
|
||||
|
||||
return xsc;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
+41
-10
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ElasticHadrNucleusHE.hh,v 1.41 2007/05/31 17:03:01 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: G4ElasticHadrNucleusHE.hh,v 1.43 2007/11/13 17:22:51 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
// G4ElasticHadrNucleusHe.hh
|
||||
|
||||
@@ -96,6 +96,7 @@ public:
|
||||
G4int dnkE[NENERGY];
|
||||
G4double maxQ2[NENERGY];
|
||||
G4double CrossSecMaxQ2[NENERGY];
|
||||
|
||||
G4double TableQ2[ONQ2];
|
||||
G4double TableCrossSec[NQTABLE];
|
||||
};
|
||||
@@ -123,6 +124,8 @@ public:
|
||||
void DefineHadronValues(G4int Z);
|
||||
|
||||
G4double GetLightFq2(G4int Z, G4int A, G4double Q);
|
||||
G4double GetHeavyFq2(G4int Nucleus, G4double *LineFq2);
|
||||
|
||||
G4double GetQ2_2(G4int N, G4double * Q,
|
||||
G4double * F, G4double R);
|
||||
|
||||
@@ -130,6 +133,8 @@ public:
|
||||
G4double c1, G4double c2,
|
||||
G4double p);
|
||||
|
||||
G4double HadrNucDifferCrSec(G4int Nucleus, G4double Q2);
|
||||
|
||||
void InterpolateHN(G4int n, const G4double EnP[],
|
||||
const G4double C0P[], const G4double C1P[],
|
||||
const G4double B0P[], const G4double B1P[]);
|
||||
@@ -140,6 +145,19 @@ public:
|
||||
|
||||
G4double GetBinomCof( G4int n, G4int m );
|
||||
|
||||
G4double GetFt(G4double Q2);
|
||||
|
||||
G4double GetDistrFun(G4double Q2);
|
||||
|
||||
G4double GetQ2(G4double Ran);
|
||||
|
||||
G4double HadronProtonQ2(const G4ParticleDefinition * aHadron,
|
||||
G4double inLabMom);
|
||||
|
||||
void GetKinematics(const G4ParticleDefinition * aHadron,
|
||||
G4double MomentumH);
|
||||
public:
|
||||
// G4double R1, R2, Pnucl, Aeff, HadrTot1, HadrSlope1, HadrReIm1, Tott1;
|
||||
|
||||
private:
|
||||
|
||||
@@ -153,11 +171,13 @@ private:
|
||||
G4int iHadron;
|
||||
G4int HadronCode[NHADRONS];
|
||||
G4int HadronType[NHADRONS];
|
||||
G4int HadronType1[NHADRONS];
|
||||
|
||||
// protection energy and momemtum
|
||||
|
||||
G4double lowestEnergyLimit;
|
||||
G4double plabLowLimit;
|
||||
G4double plabLowLimit;
|
||||
G4double dQ2;
|
||||
|
||||
// transition between internal and CLHEP units
|
||||
|
||||
@@ -180,19 +200,23 @@ private:
|
||||
// nucleaus parameters
|
||||
|
||||
G4double R1, R2, Pnucl, Aeff;
|
||||
G4int NumbN;
|
||||
|
||||
// elastic parameters
|
||||
|
||||
G4double HadrTot, HadrSlope, HadrReIm, DDSect2, DDSect3;
|
||||
G4double HadrTot, HadrSlope, HadrReIm, TotP,
|
||||
DDSect2, DDSect3, ConstU, FmaxT;
|
||||
|
||||
// momentum limits for different models of hadron/nucleon scatetring
|
||||
// G4double BoundaryP[7], BoundaryTL[7], BoundaryTG[7];
|
||||
G4double BoundaryP[7], BoundaryTL[7], BoundaryTG[7];
|
||||
|
||||
// parameterisation of scattering
|
||||
|
||||
G4double Slope1, Slope2, Coeff1, Coeff2, MaxTR;
|
||||
G4double Slope0, Coeff0;
|
||||
|
||||
G4double aAIm, aDIm, Dtot11;
|
||||
|
||||
G4double Energy[NENERGY];
|
||||
G4double LowEdgeEnergy[NENERGY];
|
||||
|
||||
@@ -210,6 +234,10 @@ G4double G4ElasticHadrNucleusHE::LineInterpol(G4double p1, G4double p2,
|
||||
G4double c1, G4double c2,
|
||||
G4double p)
|
||||
{
|
||||
// G4cout<<" LineInterpol: p1 p2 c1 c2 "<<p1<<" "<<p2<<" "
|
||||
// <<c1<<" "<<c2<<" c "<<c1+(p-p1)*(c2-c1)/(p2-p1)<<G4endl;
|
||||
|
||||
|
||||
return c1+(p-p1)*(c2-c1)/(p2-p1);
|
||||
}
|
||||
|
||||
@@ -217,19 +245,22 @@ G4double G4ElasticHadrNucleusHE::LineInterpol(G4double p1, G4double p2,
|
||||
|
||||
inline
|
||||
void G4ElasticHadrNucleusHE::InterpolateHN(G4int n, const G4double EnP[],
|
||||
const G4double C0P[], const G4double C1P[],
|
||||
const G4double B0P[], const G4double B1P[])
|
||||
const G4double C0P[], const G4double C1P[],
|
||||
const G4double B0P[], const G4double B1P[])
|
||||
{
|
||||
G4int i;
|
||||
G4int i;
|
||||
|
||||
for( i = 1; i < n; i++) if( hLabMomentum <= EnP[i] ) break;
|
||||
|
||||
for(i=1; i<n; i++) if(hLabMomentum <= EnP[i]) break;
|
||||
|
||||
if(i == n) i = n - 1;
|
||||
|
||||
Coeff0 = LineInterpol(EnP[i], EnP[i-1], C0P[i], C0P[i-1], hLabMomentum);
|
||||
Coeff1 = LineInterpol(EnP[i], EnP[i-1], C1P[i], C1P[i-1], hLabMomentum);
|
||||
Slope0 = LineInterpol(EnP[i], EnP[i-1], B0P[i], B0P[i-1], hLabMomentum);
|
||||
Slope1 = LineInterpol(EnP[i], EnP[i-1], B1P[i], B1P[i-1], hLabMomentum);
|
||||
|
||||
// G4cout<<" InterpolHN: n i "<<n<<" "<<i<<" Mom "
|
||||
// <<hLabMomentum<<G4endl;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4HadronElastic.hh,v 1.26 2007/05/15 16:06:47 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// G4 Model: Low energy elastic scattering with 4-momentum balance
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4UHadronElasticProcess.hh,v 1.10 2006/11/16 20:09:13 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
// Geant4 Hadron Elastic Scattering Process -- header file
|
||||
//
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ChargeExchange.cc,v 1.11 2007/05/25 17:46:52 dennis Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// G4 Model: Charge and strangness exchange based on G4LightMedia model
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ChargeExchangeProcess.cc,v 1.9 2007/01/30 10:23:26 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Geant4 Hadron Elastic Scattering Process -- header file
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4DiffuseElastic.cc,v 1.7 2007/06/12 14:46:26 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: G4DiffuseElastic.cc,v 1.18 2007/11/14 18:42:29 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Physics model class G4DiffuseElastic
|
||||
@@ -42,9 +42,11 @@
|
||||
#include "G4QElasticCrossSection.hh"
|
||||
#include "G4VQCrossSection.hh"
|
||||
#include "G4ElasticHadrNucleusHE.hh"
|
||||
|
||||
#include "Randomize.hh"
|
||||
#include "G4Integrator.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4Proton.hh"
|
||||
#include "G4Neutron.hh"
|
||||
#include "G4Deuteron.hh"
|
||||
@@ -52,10 +54,21 @@
|
||||
#include "G4PionPlus.hh"
|
||||
#include "G4PionMinus.hh"
|
||||
|
||||
#include "G4Element.hh"
|
||||
#include "G4ElementTable.hh"
|
||||
#include "G4PhysicsTable.hh"
|
||||
#include "G4PhysicsLogVector.hh"
|
||||
#include "G4PhysicsFreeVector.hh"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Test Constructor. Just to check xsc
|
||||
|
||||
|
||||
G4DiffuseElastic::G4DiffuseElastic()
|
||||
: G4HadronicInteraction(), fParticle(0)
|
||||
{
|
||||
SetMinEnergy( 0.0*GeV );
|
||||
SetMinEnergy( 0.01*GeV );
|
||||
SetMaxEnergy( 100.*TeV );
|
||||
verboseLevel = 0;
|
||||
lowEnergyRecoilLimit = 100.*keV;
|
||||
@@ -70,14 +83,193 @@ G4DiffuseElastic::G4DiffuseElastic()
|
||||
theAlpha = G4Alpha::Alpha();
|
||||
thePionPlus = G4PionPlus::PionPlus();
|
||||
thePionMinus= G4PionMinus::PionMinus();
|
||||
|
||||
fEnergyBin = 200;
|
||||
fAngleBin = 100;
|
||||
|
||||
fEnergyVector = 0;
|
||||
fAngleTable = 0;
|
||||
|
||||
fParticle = 0;
|
||||
fWaveVector = 0.;
|
||||
fAtomicWeight = 0.;
|
||||
fAtomicNumber = 0.;
|
||||
fNuclearRadius = 0.;
|
||||
fBeta = 0.;
|
||||
fZommerfeld = 0.;
|
||||
fAm = 0.;
|
||||
fAddCoulomb = false;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Constructor with initialisation
|
||||
|
||||
G4DiffuseElastic::G4DiffuseElastic(const G4ParticleDefinition* aParticle)
|
||||
: G4HadronicInteraction(), fParticle(aParticle)
|
||||
{
|
||||
SetMinEnergy( 0.01*GeV );
|
||||
SetMaxEnergy( 100.*TeV );
|
||||
verboseLevel = 0;
|
||||
lowEnergyRecoilLimit = 100.*keV;
|
||||
lowEnergyLimitQ = 0.0*GeV;
|
||||
lowEnergyLimitHE = 0.0*GeV;
|
||||
lowestEnergyLimit= 0.0*keV;
|
||||
plabLowLimit = 20.0*MeV;
|
||||
|
||||
theProton = G4Proton::Proton();
|
||||
theNeutron = G4Neutron::Neutron();
|
||||
theDeuteron = G4Deuteron::Deuteron();
|
||||
theAlpha = G4Alpha::Alpha();
|
||||
thePionPlus = G4PionPlus::PionPlus();
|
||||
thePionMinus= G4PionMinus::PionMinus();
|
||||
|
||||
fEnergyBin = 200;
|
||||
fAngleBin = 100;
|
||||
|
||||
// fEnergyVector = 0;
|
||||
fEnergyVector = new G4PhysicsLogVector( theMinEnergy, theMaxEnergy, fEnergyBin );
|
||||
fAngleTable = 0;
|
||||
|
||||
fParticle = aParticle;
|
||||
fWaveVector = 0.;
|
||||
fAtomicWeight = 0.;
|
||||
fAtomicNumber = 0.;
|
||||
fNuclearRadius = 0.;
|
||||
fBeta = 0.;
|
||||
fZommerfeld = 0.;
|
||||
fAm = 0.;
|
||||
fAddCoulomb = false;
|
||||
// Initialise();
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Destructor
|
||||
|
||||
G4DiffuseElastic::~G4DiffuseElastic()
|
||||
{
|
||||
if(fEnergyVector) delete fEnergyVector;
|
||||
|
||||
if( fAngleTable )
|
||||
{
|
||||
fAngleTable->clearAndDestroy();
|
||||
delete fAngleTable ;
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Initialisation for given particle using element table of application
|
||||
|
||||
void G4DiffuseElastic::Initialise()
|
||||
{
|
||||
|
||||
// fEnergyVector = new G4PhysicsLogVector( theMinEnergy, theMaxEnergy, fEnergyBin );
|
||||
|
||||
const G4ElementTable* theElementTable = G4Element::GetElementTable();
|
||||
|
||||
size_t jEl, numOfEl = G4Element::GetNumberOfElements();
|
||||
|
||||
for(jEl = 0 ; jEl < numOfEl; ++jEl) // application element loop
|
||||
{
|
||||
fAtomicNumber = (*theElementTable)[jEl]->GetZ(); // atomic number
|
||||
fAtomicWeight = (*theElementTable)[jEl]->GetN(); // number of nucleons
|
||||
fNuclearRadius = CalculateNuclearRad(fAtomicWeight);
|
||||
if(verboseLevel > 0)
|
||||
G4cout<<"G4DiffuseElastic::Initialise() the element: "
|
||||
<<(*theElementTable)[jEl]->GetName()<<G4endl;
|
||||
fElementNumberVector.push_back(fAtomicNumber);
|
||||
fElementNameVector.push_back((*theElementTable)[jEl]->GetName());
|
||||
|
||||
BuildAngleTable();
|
||||
fAngleBank.push_back(fAngleTable);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Initialisation for given particle on fly using new element number
|
||||
|
||||
void G4DiffuseElastic::InitialiseOnFly(G4double Z, G4double A)
|
||||
{
|
||||
fAtomicNumber = Z; // atomic number
|
||||
fAtomicWeight = A; // number of nucleons
|
||||
fNuclearRadius = CalculateNuclearRad(fAtomicWeight);
|
||||
if(verboseLevel > 0)
|
||||
G4cout<<"G4DiffuseElastic::Initialise() the element with Z = "
|
||||
<<Z<<"; and A = "<<A<<G4endl;
|
||||
fElementNumberVector.push_back(fAtomicNumber);
|
||||
|
||||
BuildAngleTable();
|
||||
fAngleBank.push_back(fAngleTable);
|
||||
return;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Build for given particle and element table of momentum, angle probability.
|
||||
// For the moment in lab system.
|
||||
|
||||
void G4DiffuseElastic::BuildAngleTable()
|
||||
{
|
||||
G4int i, j;
|
||||
G4double partMom, kinE, a=0., z = fParticle->GetPDGCharge(), m1 = fParticle->GetPDGMass();
|
||||
G4double theta1, theta2, thetaMax, thetaCoulomb, sum = 0.;
|
||||
|
||||
G4Integrator<G4DiffuseElastic,G4double(G4DiffuseElastic::*)(G4double)> integral;
|
||||
|
||||
fAngleTable = new G4PhysicsTable(fEnergyBin);
|
||||
|
||||
for(i = 0; i < fEnergyBin; i++)
|
||||
{
|
||||
kinE = fEnergyVector->GetLowEdgeEnergy(i);
|
||||
partMom = std::sqrt( kinE*(kinE + 2*m1) );
|
||||
fWaveVector = partMom/hbarc;
|
||||
|
||||
thetaMax = 10.174/fWaveVector/fNuclearRadius;
|
||||
|
||||
if (thetaMax > pi) thetaMax = pi;
|
||||
|
||||
thetaCoulomb = 0.2*thetaMax;
|
||||
|
||||
if(z)
|
||||
{
|
||||
a = partMom/m1;
|
||||
fBeta = a/std::sqrt(1+a*a);
|
||||
fZommerfeld = CalculateZommerfeld( fBeta, z, fAtomicNumber);
|
||||
fAm = CalculateAm( partMom, fZommerfeld, fAtomicNumber);
|
||||
}
|
||||
G4PhysicsFreeVector* angleVector = new G4PhysicsFreeVector(fAngleBin);
|
||||
|
||||
G4PhysicsLogVector* angleBins = new G4PhysicsLogVector( 0.01*thetaMax, thetaMax, fAngleBin );
|
||||
|
||||
for(j = 1; j < fAngleBin; j++)
|
||||
{
|
||||
theta1 = angleBins->GetLowEdgeEnergy(j-1);
|
||||
theta2 = angleBins->GetLowEdgeEnergy(j);
|
||||
|
||||
if(theta2 > thetaCoulomb && z) fAddCoulomb = true;
|
||||
|
||||
sum += integral.Legendre10(this,&G4DiffuseElastic::GetIntegrandFunction, theta1,theta2);
|
||||
|
||||
angleVector->PutValue( j-1 , theta2, sum );
|
||||
// G4cout<<"j-1 = "<<j-1<<"; theta2 = "<<theta2<<"; sum = "<<sum<<G4endl;
|
||||
}
|
||||
fAddCoulomb = false;
|
||||
|
||||
fAngleTable->insertAt(i,angleVector);
|
||||
|
||||
// delete[] angleVector;
|
||||
// delete[] angleBins;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Model analog of DoIt function
|
||||
|
||||
G4HadFinalState*
|
||||
G4DiffuseElastic::ApplyYourself( const G4HadProjectile& aTrack,
|
||||
@@ -153,7 +345,9 @@ G4DiffuseElastic::ApplyYourself( const G4HadProjectile& aTrack,
|
||||
// Sample t
|
||||
//
|
||||
|
||||
t = SampleT( theParticle, ptot, A);
|
||||
// t = SampleT( theParticle, ptot, A);
|
||||
|
||||
t = SampleTableT( theParticle, ptot, Z, A); // use initialised table
|
||||
|
||||
// NaN finder
|
||||
if(!(t < 0.0 || t >= 0.0))
|
||||
@@ -261,17 +455,193 @@ G4DiffuseElastic::GetDiffuseElasticXsc( const G4ParticleDefinition* particle,
|
||||
fParticle = particle;
|
||||
fWaveVector = momentum/hbarc;
|
||||
fAtomicWeight = A;
|
||||
|
||||
G4double r0;
|
||||
if(A > 10.) r0 = 1.16*( 1 - std::pow(A, -2./3.) )*fermi; // 1.08*fermi;
|
||||
else r0 = 1.1*fermi;
|
||||
fNuclearRadius = r0*std::pow(A, 1./3.);
|
||||
fAddCoulomb = false;
|
||||
fNuclearRadius = CalculateNuclearRad(A);
|
||||
|
||||
G4double sigma = fNuclearRadius*fNuclearRadius*GetDiffElasticProb(theta);
|
||||
|
||||
return sigma;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// return invariant differential elastic cross section d(sigma)/d(tMand)
|
||||
|
||||
G4double
|
||||
G4DiffuseElastic::GetInvElasticXsc( const G4ParticleDefinition* particle,
|
||||
G4double tMand,
|
||||
G4double plab,
|
||||
G4double A, G4double Z )
|
||||
{
|
||||
G4double m1 = particle->GetPDGMass();
|
||||
G4LorentzVector lv1(0.,0.,plab,std::sqrt(plab*plab+m1*m1));
|
||||
|
||||
G4int iZ = static_cast<G4int>(Z+0.5);
|
||||
G4int iA = static_cast<G4int>(A+0.5);
|
||||
G4ParticleDefinition * theDef = 0;
|
||||
|
||||
if (iZ == 1 && iA == 1) theDef = theProton;
|
||||
else if (iZ == 1 && iA == 2) theDef = theDeuteron;
|
||||
else if (iZ == 1 && iA == 3) theDef = G4Triton::Triton();
|
||||
else if (iZ == 2 && iA == 3) theDef = G4He3::He3();
|
||||
else if (iZ == 2 && iA == 4) theDef = theAlpha;
|
||||
else theDef = G4ParticleTable::GetParticleTable()->FindIon(iZ,iA,0,iZ);
|
||||
|
||||
G4double tmass = theDef->GetPDGMass();
|
||||
|
||||
G4LorentzVector lv(0.0,0.0,0.0,tmass);
|
||||
lv += lv1;
|
||||
|
||||
G4ThreeVector bst = lv.boostVector();
|
||||
lv1.boost(-bst);
|
||||
|
||||
G4ThreeVector p1 = lv1.vect();
|
||||
G4double ptot = p1.mag();
|
||||
G4double ptot2 = ptot*ptot;
|
||||
G4double cost = 1 - 0.5*std::fabs(tMand)/ptot2;
|
||||
|
||||
if( cost >= 1.0 ) cost = 1.0;
|
||||
else if( cost <= -1.0) cost = -1.0;
|
||||
|
||||
G4double thetaCMS = std::acos(cost);
|
||||
|
||||
G4double sigma = GetDiffuseElasticXsc( particle, thetaCMS, ptot, A);
|
||||
|
||||
sigma *= pi/ptot2;
|
||||
|
||||
return sigma;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// return differential elastic cross section d(sigma)/d(omega) with Coulomb
|
||||
// correction
|
||||
|
||||
G4double
|
||||
G4DiffuseElastic::GetDiffuseElasticSumXsc( const G4ParticleDefinition* particle,
|
||||
G4double theta,
|
||||
G4double momentum,
|
||||
G4double A, G4double Z )
|
||||
{
|
||||
fParticle = particle;
|
||||
fWaveVector = momentum/hbarc;
|
||||
fAtomicWeight = A;
|
||||
fAtomicNumber = Z;
|
||||
G4double z = particle->GetPDGCharge();
|
||||
if(z)
|
||||
{
|
||||
fAddCoulomb = true;
|
||||
fBeta = CalculateParticleBeta( particle, momentum);
|
||||
fZommerfeld = CalculateZommerfeld( fBeta, z, fAtomicNumber);
|
||||
fAm = CalculateAm( momentum, fZommerfeld, fAtomicNumber);
|
||||
}
|
||||
fNuclearRadius = CalculateNuclearRad(A);
|
||||
|
||||
G4double sigma = fNuclearRadius*fNuclearRadius*GetDiffElasticSumProb(theta);
|
||||
|
||||
return sigma;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// return invariant differential elastic cross section d(sigma)/d(tMand) with Coulomb
|
||||
// correction
|
||||
|
||||
G4double
|
||||
G4DiffuseElastic::GetInvElasticSumXsc( const G4ParticleDefinition* particle,
|
||||
G4double tMand,
|
||||
G4double plab,
|
||||
G4double A, G4double Z )
|
||||
{
|
||||
G4double m1 = particle->GetPDGMass();
|
||||
G4LorentzVector lv1(0.,0.,plab,std::sqrt(plab*plab+m1*m1));
|
||||
|
||||
G4int iZ = static_cast<G4int>(Z+0.5);
|
||||
G4int iA = static_cast<G4int>(A+0.5);
|
||||
G4ParticleDefinition * theDef = 0;
|
||||
|
||||
if (iZ == 1 && iA == 1) theDef = theProton;
|
||||
else if (iZ == 1 && iA == 2) theDef = theDeuteron;
|
||||
else if (iZ == 1 && iA == 3) theDef = G4Triton::Triton();
|
||||
else if (iZ == 2 && iA == 3) theDef = G4He3::He3();
|
||||
else if (iZ == 2 && iA == 4) theDef = theAlpha;
|
||||
else theDef = G4ParticleTable::GetParticleTable()->FindIon(iZ,iA,0,iZ);
|
||||
|
||||
G4double tmass = theDef->GetPDGMass();
|
||||
|
||||
G4LorentzVector lv(0.0,0.0,0.0,tmass);
|
||||
lv += lv1;
|
||||
|
||||
G4ThreeVector bst = lv.boostVector();
|
||||
lv1.boost(-bst);
|
||||
|
||||
G4ThreeVector p1 = lv1.vect();
|
||||
G4double ptot = p1.mag();
|
||||
G4double ptot2 = ptot*ptot;
|
||||
G4double cost = 1 - 0.5*std::fabs(tMand)/ptot2;
|
||||
|
||||
if( cost >= 1.0 ) cost = 1.0;
|
||||
else if( cost <= -1.0) cost = -1.0;
|
||||
|
||||
G4double thetaCMS = std::acos(cost);
|
||||
|
||||
G4double sigma = GetDiffuseElasticSumXsc( particle, thetaCMS, ptot, A, Z );
|
||||
|
||||
sigma *= pi/ptot2;
|
||||
|
||||
return sigma;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// return invariant differential elastic cross section d(sigma)/d(tMand) with Coulomb
|
||||
// correction
|
||||
|
||||
G4double
|
||||
G4DiffuseElastic::GetInvCoulombElasticXsc( const G4ParticleDefinition* particle,
|
||||
G4double tMand,
|
||||
G4double plab,
|
||||
G4double A, G4double Z )
|
||||
{
|
||||
G4double m1 = particle->GetPDGMass();
|
||||
G4LorentzVector lv1(0.,0.,plab,std::sqrt(plab*plab+m1*m1));
|
||||
|
||||
G4int iZ = static_cast<G4int>(Z+0.5);
|
||||
G4int iA = static_cast<G4int>(A+0.5);
|
||||
G4ParticleDefinition * theDef = 0;
|
||||
|
||||
if (iZ == 1 && iA == 1) theDef = theProton;
|
||||
else if (iZ == 1 && iA == 2) theDef = theDeuteron;
|
||||
else if (iZ == 1 && iA == 3) theDef = G4Triton::Triton();
|
||||
else if (iZ == 2 && iA == 3) theDef = G4He3::He3();
|
||||
else if (iZ == 2 && iA == 4) theDef = theAlpha;
|
||||
else theDef = G4ParticleTable::GetParticleTable()->FindIon(iZ,iA,0,iZ);
|
||||
|
||||
G4double tmass = theDef->GetPDGMass();
|
||||
|
||||
G4LorentzVector lv(0.0,0.0,0.0,tmass);
|
||||
lv += lv1;
|
||||
|
||||
G4ThreeVector bst = lv.boostVector();
|
||||
lv1.boost(-bst);
|
||||
|
||||
G4ThreeVector p1 = lv1.vect();
|
||||
G4double ptot = p1.mag();
|
||||
G4double ptot2 = ptot*ptot;
|
||||
G4double cost = 1 - 0.5*std::fabs(tMand)/ptot2;
|
||||
|
||||
if( cost >= 1.0 ) cost = 1.0;
|
||||
else if( cost <= -1.0) cost = -1.0;
|
||||
|
||||
G4double thetaCMS = std::acos(cost);
|
||||
|
||||
G4double sigma = GetCoulombElasticXsc( particle, thetaCMS, ptot, Z );
|
||||
|
||||
sigma *= pi/ptot2;
|
||||
|
||||
return sigma;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// return differential elastic probability d(probability)/d(omega)
|
||||
@@ -317,20 +687,24 @@ G4DiffuseElastic::GetDiffElasticProb( // G4ParticleDefinition* particle,
|
||||
e1 = 0.3*fermi;
|
||||
e2 = 0.35*fermi;
|
||||
}
|
||||
G4double kg = fWaveVector*gamma; // wavek*delta;
|
||||
G4double lambda = 15.; // 15 ok
|
||||
// G4double kg = fWaveVector*gamma; // wavek*delta;
|
||||
G4double kg = lambda*(1.-std::exp(-fWaveVector*gamma/lambda)); // wavek*delta;
|
||||
G4double kg2 = kg*kg;
|
||||
G4double dk2t = delta*fWaveVector*fWaveVector*theta; // delta*wavek*wavek*theta;
|
||||
G4double dk2t2 = dk2t*dk2t;
|
||||
G4double pikdt = pi*fWaveVector*diffuse*theta;// pi*wavek*diffuse*theta;
|
||||
// G4double dk2t = delta*fWaveVector*fWaveVector*theta; // delta*wavek*wavek*theta;
|
||||
// G4double dk2t2 = dk2t*dk2t;
|
||||
// G4double pikdt = pi*fWaveVector*diffuse*theta;// pi*wavek*diffuse*theta;
|
||||
G4double pikdt = lambda*(1.-std::exp(-pi*fWaveVector*diffuse*theta/lambda)); // wavek*delta;
|
||||
|
||||
damp = DampFactor(pikdt);
|
||||
damp2 = damp*damp;
|
||||
|
||||
G4double mode2k2 = (e1*e1+e2*e2)*fWaveVector*fWaveVector;
|
||||
G4double e2dk3t = -2.*e2*delta*fWaveVector*fWaveVector*fWaveVector*theta;
|
||||
|
||||
|
||||
damp = DampFactor(pikdt);
|
||||
damp2 = damp*damp;
|
||||
|
||||
sigma = kg2 + dk2t2;
|
||||
sigma = kg2;
|
||||
// sigma += dk2t2;
|
||||
sigma *= bzero2;
|
||||
sigma += mode2k2*bone2 + e2dk3t*bzero*bone;
|
||||
sigma += kr2*bonebyarg2;
|
||||
@@ -339,6 +713,100 @@ G4DiffuseElastic::GetDiffElasticProb( // G4ParticleDefinition* particle,
|
||||
return sigma;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// return differential elastic probability d(probability)/d(omega) with
|
||||
// Coulomb correction
|
||||
|
||||
G4double
|
||||
G4DiffuseElastic::GetDiffElasticSumProb( // G4ParticleDefinition* particle,
|
||||
G4double theta
|
||||
// G4double momentum,
|
||||
// G4double A
|
||||
)
|
||||
{
|
||||
G4double sigma, bzero, bzero2, bonebyarg, bonebyarg2, damp, damp2;
|
||||
G4double delta, diffuse, gamma;
|
||||
G4double e1, e2, bone, bone2;
|
||||
|
||||
// G4double wavek = momentum/hbarc; // wave vector
|
||||
// G4double r0 = 1.08*fermi;
|
||||
// G4double rad = r0*std::pow(A, 1./3.);
|
||||
G4double kr = fWaveVector*fNuclearRadius; // wavek*rad;
|
||||
G4double kr2 = kr*kr;
|
||||
G4double krt = kr*theta;
|
||||
|
||||
bzero = BesselJzero(krt);
|
||||
bzero2 = bzero*bzero;
|
||||
bone = BesselJone(krt);
|
||||
bone2 = bone*bone;
|
||||
bonebyarg = BesselOneByArg(krt);
|
||||
bonebyarg2 = bonebyarg*bonebyarg;
|
||||
|
||||
if (fParticle == theProton)
|
||||
{
|
||||
diffuse = 0.63*fermi;
|
||||
// diffuse = 0.6*fermi;
|
||||
gamma = 0.3*fermi;
|
||||
delta = 0.1*fermi*fermi;
|
||||
e1 = 0.3*fermi;
|
||||
e2 = 0.35*fermi;
|
||||
}
|
||||
else // as proton, if were not defined
|
||||
{
|
||||
diffuse = 0.63*fermi;
|
||||
gamma = 0.3*fermi;
|
||||
delta = 0.1*fermi*fermi;
|
||||
e1 = 0.3*fermi;
|
||||
e2 = 0.35*fermi;
|
||||
}
|
||||
G4double lambda = 15.; // 15 ok
|
||||
// G4double kg = fWaveVector*gamma; // wavek*delta;
|
||||
G4double kg = lambda*(1.-std::exp(-fWaveVector*gamma/lambda)); // wavek*delta;
|
||||
|
||||
// G4cout<<"kg = "<<kg<<G4endl;
|
||||
|
||||
if(fAddCoulomb) // add Coulomb correction
|
||||
{
|
||||
G4double sinHalfTheta = std::sin(0.5*theta);
|
||||
G4double sinHalfTheta2 = sinHalfTheta*sinHalfTheta;
|
||||
|
||||
kg += 0.5*fZommerfeld/kr/(sinHalfTheta2+fAm); // correction at J0()
|
||||
// kg += 0.65*fZommerfeld/kr/(sinHalfTheta2+fAm); // correction at J0()
|
||||
}
|
||||
|
||||
G4double kg2 = kg*kg;
|
||||
// G4double dk2t = delta*fWaveVector*fWaveVector*theta; // delta*wavek*wavek*theta;
|
||||
|
||||
// G4cout<<"dk2t = "<<dk2t<<G4endl;
|
||||
|
||||
// G4double dk2t2 = dk2t*dk2t;
|
||||
|
||||
// G4double pikdt = pi*fWaveVector*diffuse*theta;// pi*wavek*diffuse*theta;
|
||||
G4double pikdt = lambda*(1.-std::exp(-pi*fWaveVector*diffuse*theta/lambda)); // wavek*delta;
|
||||
|
||||
// G4cout<<"pikdt = "<<pikdt<<G4endl;
|
||||
|
||||
damp = DampFactor(pikdt);
|
||||
damp2 = damp*damp;
|
||||
|
||||
G4double mode2k2 = (e1*e1+e2*e2)*fWaveVector*fWaveVector;
|
||||
G4double e2dk3t = -2.*e2*delta*fWaveVector*fWaveVector*fWaveVector*theta;
|
||||
|
||||
sigma = kg2;
|
||||
// sigma += dk2t2;
|
||||
sigma *= bzero2;
|
||||
sigma += mode2k2*bone2;
|
||||
sigma += e2dk3t*bzero*bone;
|
||||
|
||||
// sigma += kr2*(1 + 8.*fZommerfeld*fZommerfeld/kr2)*bonebyarg2; // correction at J1()/()
|
||||
sigma += kr2*bonebyarg2; // correction at J1()/()
|
||||
|
||||
sigma *= damp2; // *rad*rad;
|
||||
|
||||
return sigma;
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -350,7 +818,7 @@ G4DiffuseElastic::GetIntegrandFunction( G4double theta )
|
||||
G4double result;
|
||||
|
||||
result = 2*pi*std::sin(theta);
|
||||
result *= GetDiffElasticProb(theta);
|
||||
result *= GetDiffElasticSumProb(theta);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -368,10 +836,8 @@ G4DiffuseElastic::IntegralElasticProb( const G4ParticleDefinition* particle,
|
||||
fParticle = particle;
|
||||
fWaveVector = momentum/hbarc;
|
||||
fAtomicWeight = A;
|
||||
G4double r0;
|
||||
if(A > 10.) r0 = 1.16*( 1 - std::pow(A, -2./3.) )*fermi; // 1.08*fermi;
|
||||
else r0 = 1.1*fermi;
|
||||
fNuclearRadius = r0*std::pow(A, 1./3.);
|
||||
|
||||
fNuclearRadius = CalculateNuclearRad(A);
|
||||
|
||||
|
||||
G4Integrator<G4DiffuseElastic,G4double(G4DiffuseElastic::*)(G4double)> integral;
|
||||
@@ -393,6 +859,18 @@ G4double G4DiffuseElastic::SampleT( const G4ParticleDefinition* aParticle, G4dou
|
||||
return t;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Return inv momentum transfer -t > 0 from initialisation table
|
||||
|
||||
G4double G4DiffuseElastic::SampleTableT( const G4ParticleDefinition* aParticle, G4double p,
|
||||
G4double Z, G4double A)
|
||||
{
|
||||
G4double theta = SampleTableThetaCMS( aParticle, p, Z, A); // sample theta in cms
|
||||
G4double t = 2*p*p*( 1 - std::cos(theta) ); // -t !!!
|
||||
return t;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Return scattering angle sampled in cms
|
||||
@@ -403,18 +881,16 @@ G4DiffuseElastic::SampleThetaCMS(const G4ParticleDefinition* particle,
|
||||
G4double momentum, G4double A)
|
||||
{
|
||||
G4int i, iMax = 100;
|
||||
G4double r0, norm, result, theta1, theta2, thetaMax, sum = 0.;
|
||||
G4double norm, result, theta1, theta2, thetaMax, sum = 0.;
|
||||
|
||||
fParticle = particle;
|
||||
fWaveVector = momentum/hbarc;
|
||||
fAtomicWeight = A;
|
||||
|
||||
if(A > 10.) r0 = 1.16*( 1 - std::pow(A, -2./3.) )*fermi; // 1.08*fermi;
|
||||
else r0 = 1.1*fermi;
|
||||
|
||||
fNuclearRadius = r0*std::pow(A, 1./3.);
|
||||
fNuclearRadius = CalculateNuclearRad(A);
|
||||
|
||||
thetaMax = 10.174/fWaveVector/fNuclearRadius;
|
||||
|
||||
if (thetaMax > pi) thetaMax = pi;
|
||||
|
||||
G4Integrator<G4DiffuseElastic,G4double(G4DiffuseElastic::*)(G4double)> integral;
|
||||
@@ -437,9 +913,155 @@ G4DiffuseElastic::SampleThetaCMS(const G4ParticleDefinition* particle,
|
||||
}
|
||||
}
|
||||
if (i > iMax ) result = 0.5*(theta1 + theta2);
|
||||
|
||||
G4double sigma = pi*thetaMax/iMax;
|
||||
|
||||
result += G4RandGauss::shoot(0.,sigma);
|
||||
|
||||
if(result < 0.) result = 0.;
|
||||
if(result > thetaMax) result = thetaMax;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Return scattering angle sampled in cms according to precalculated table.
|
||||
|
||||
|
||||
G4double
|
||||
G4DiffuseElastic::SampleTableThetaCMS(const G4ParticleDefinition* particle,
|
||||
G4double momentum, G4double Z, G4double A)
|
||||
{
|
||||
size_t iElement;
|
||||
G4int iMomentum, iAngle;
|
||||
G4double randAngle, position, theta1, theta2, E1, E2, W1, W2, W;
|
||||
G4double m1 = particle->GetPDGMass();
|
||||
|
||||
for(iElement = 0; iElement < fElementNumberVector.size(); iElement++)
|
||||
{
|
||||
if( std::fabs(Z - fElementNumberVector[iElement]) < 0.5) break;
|
||||
}
|
||||
if ( iElement == fElementNumberVector.size() )
|
||||
{
|
||||
InitialiseOnFly(Z,A);
|
||||
// iElement--;
|
||||
|
||||
// G4cout << "G4DiffuseElastic: Element with atomic number " << Z
|
||||
// << " is not found, return zero angle" << G4endl;
|
||||
// return 0.; // no table for this element
|
||||
}
|
||||
// G4cout<<"iElement = "<<iElement<<G4endl;
|
||||
|
||||
fAngleTable = fAngleBank[iElement];
|
||||
|
||||
G4double kinE = std::sqrt(momentum*momentum + m1*m1) - m1;
|
||||
|
||||
for(iMomentum = 0; iMomentum < fEnergyBin; iMomentum++)
|
||||
{
|
||||
if( kinE < fEnergyVector->GetLowEdgeEnergy(iMomentum) ) break;
|
||||
}
|
||||
if ( iMomentum == fEnergyBin ) iMomentum--; // kinE is more then theMaxEnergy
|
||||
if ( iMomentum < 0 ) iMomentum = 0; // against negative index, kinE < theMinEnergy
|
||||
// G4cout<<"iMomentum = "<<iMomentum<<G4endl;
|
||||
|
||||
if (iMomentum == fEnergyBin -1 || iMomentum == 0 ) // the table edges
|
||||
{
|
||||
position = (*(*fAngleTable)(iMomentum))(fAngleBin-2)*G4UniformRand();
|
||||
// G4cout<<"position = "<<position<<G4endl;
|
||||
|
||||
for(iAngle = 0; iAngle < fAngleBin; iAngle++)
|
||||
{
|
||||
if( position < (*(*fAngleTable)(iMomentum))(iAngle) ) break;
|
||||
}
|
||||
if (iAngle == fAngleBin) iAngle--;
|
||||
// G4cout<<"iAngle = "<<iAngle<<G4endl;
|
||||
|
||||
randAngle = GetScatteringAngle(iMomentum, iAngle, position);
|
||||
// G4cout<<"randAngle = "<<randAngle<<G4endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
position = (*(*fAngleTable)(iMomentum))(fAngleBin-2)*G4UniformRand();
|
||||
// G4cout<<"position = "<<position<<G4endl;
|
||||
|
||||
for(iAngle = 0; iAngle < fAngleBin; iAngle++)
|
||||
{
|
||||
if( position < (*(*fAngleTable)(iMomentum))(iAngle) ) break;
|
||||
}
|
||||
if (iAngle == fAngleBin) iAngle--;
|
||||
// G4cout<<"iAngle = "<<iAngle<<G4endl;
|
||||
|
||||
theta2 = GetScatteringAngle(iMomentum, iAngle, position);
|
||||
// G4cout<<"theta2 = "<<theta2<<G4endl;
|
||||
E2 = fEnergyVector->GetLowEdgeEnergy(iMomentum);
|
||||
// G4cout<<"E2 = "<<E2<<G4endl;
|
||||
|
||||
iMomentum--;
|
||||
|
||||
position = (*(*fAngleTable)(iMomentum))(fAngleBin-2)*G4UniformRand();
|
||||
// G4cout<<"position = "<<position<<G4endl;
|
||||
|
||||
for(iAngle = 0; iAngle < fAngleBin; iAngle++)
|
||||
{
|
||||
if( position < (*(*fAngleTable)(iMomentum))(iAngle) ) break;
|
||||
}
|
||||
if (iAngle == fAngleBin) iAngle--;
|
||||
|
||||
theta1 = GetScatteringAngle(iMomentum, iAngle, position);
|
||||
// G4cout<<"theta1 = "<<theta1<<G4endl;
|
||||
E1 = fEnergyVector->GetLowEdgeEnergy(iMomentum);
|
||||
// G4cout<<"E1 = "<<E1<<G4endl;
|
||||
|
||||
W = 1.0/(E2 - E1);
|
||||
W1 = (E2 - kinE)*W;
|
||||
W2 = (kinE - E1)*W;
|
||||
|
||||
randAngle = W1*theta1 + W2*theta2;
|
||||
// G4cout<<"randAngle = "<<randAngle<<G4endl;
|
||||
}
|
||||
return randAngle;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
//
|
||||
|
||||
G4double
|
||||
G4DiffuseElastic:: GetScatteringAngle(G4int iMomentum, G4int iAngle, G4double position)
|
||||
{
|
||||
G4double x1, x2, y1, y2, randAngle;
|
||||
|
||||
if( iAngle == 0 )
|
||||
{
|
||||
randAngle = (*fAngleTable)(iMomentum)->GetLowEdgeEnergy(iAngle);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( iAngle >= G4int((*fAngleTable)(iMomentum)->GetVectorLength()) )
|
||||
{
|
||||
iAngle = (*fAngleTable)(iMomentum)->GetVectorLength() - 1;
|
||||
}
|
||||
y1 = (*(*fAngleTable)(iMomentum))(iAngle-1);
|
||||
y2 = (*(*fAngleTable)(iMomentum))(iAngle);
|
||||
|
||||
x1 = (*fAngleTable)(iMomentum)->GetLowEdgeEnergy(iAngle-1);
|
||||
x2 = (*fAngleTable)(iMomentum)->GetLowEdgeEnergy(iAngle);
|
||||
|
||||
if ( x1 == x2 ) randAngle = x2;
|
||||
else
|
||||
{
|
||||
if ( y1 == y2 ) randAngle = x1 + (x2 - x1)*G4UniformRand();
|
||||
else
|
||||
{
|
||||
randAngle = x1 + (position - y1)*(x2 - x1)/(y2 - y1);
|
||||
}
|
||||
}
|
||||
}
|
||||
return randAngle;
|
||||
}
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -462,9 +1084,9 @@ G4DiffuseElastic::SampleThetaLab( const G4HadProjectile* aParticle,
|
||||
lv1.boost(-bst);
|
||||
|
||||
G4ThreeVector p1 = lv1.vect();
|
||||
G4double ptot = p1.mag();
|
||||
G4double tmax = 4.0*ptot*ptot;
|
||||
G4double t = 0.0;
|
||||
G4double ptot = p1.mag();
|
||||
G4double tmax = 4.0*ptot*ptot;
|
||||
G4double t = 0.0;
|
||||
|
||||
|
||||
//
|
||||
@@ -528,3 +1150,128 @@ G4DiffuseElastic::SampleThetaLab( const G4HadProjectile* aParticle,
|
||||
|
||||
return theta;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Return scattering angle in lab system (target at rest) knowing theta in CMS
|
||||
|
||||
|
||||
|
||||
G4double
|
||||
G4DiffuseElastic::ThetaCMStoThetaLab( const G4DynamicParticle* aParticle,
|
||||
G4double tmass, G4double thetaCMS)
|
||||
{
|
||||
const G4ParticleDefinition* theParticle = aParticle->GetDefinition();
|
||||
G4double m1 = theParticle->GetPDGMass();
|
||||
// G4double plab = aParticle->GetTotalMomentum();
|
||||
G4LorentzVector lv1 = aParticle->Get4Momentum();
|
||||
G4LorentzVector lv(0.0,0.0,0.0,tmass);
|
||||
|
||||
lv += lv1;
|
||||
|
||||
G4ThreeVector bst = lv.boostVector();
|
||||
|
||||
lv1.boost(-bst);
|
||||
|
||||
G4ThreeVector p1 = lv1.vect();
|
||||
G4double ptot = p1.mag();
|
||||
|
||||
G4double phi = G4UniformRand()*twopi;
|
||||
G4double cost = std::cos(thetaCMS);
|
||||
G4double sint;
|
||||
|
||||
if( cost >= 1.0 )
|
||||
{
|
||||
cost = 1.0;
|
||||
sint = 0.0;
|
||||
}
|
||||
else if( cost <= -1.0)
|
||||
{
|
||||
cost = -1.0;
|
||||
sint = 0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
sint = std::sqrt((1.0-cost)*(1.0+cost));
|
||||
}
|
||||
if (verboseLevel>1)
|
||||
{
|
||||
G4cout << "cos(tcms)=" << cost << " std::sin(tcms)=" << sint << G4endl;
|
||||
}
|
||||
G4ThreeVector v1(sint*std::cos(phi),sint*std::sin(phi),cost);
|
||||
v1 *= ptot;
|
||||
G4LorentzVector nlv1(v1.x(),v1.y(),v1.z(),std::sqrt(ptot*ptot + m1*m1));
|
||||
|
||||
nlv1.boost(bst);
|
||||
|
||||
G4ThreeVector np1 = nlv1.vect();
|
||||
|
||||
|
||||
G4double thetaLab = np1.theta();
|
||||
|
||||
return thetaLab;
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Return scattering angle in CMS system (target at rest) knowing theta in Lab
|
||||
|
||||
|
||||
|
||||
G4double
|
||||
G4DiffuseElastic::ThetaLabToThetaCMS( const G4DynamicParticle* aParticle,
|
||||
G4double tmass, G4double thetaLab)
|
||||
{
|
||||
const G4ParticleDefinition* theParticle = aParticle->GetDefinition();
|
||||
G4double m1 = theParticle->GetPDGMass();
|
||||
G4double plab = aParticle->GetTotalMomentum();
|
||||
G4LorentzVector lv1 = aParticle->Get4Momentum();
|
||||
G4LorentzVector lv(0.0,0.0,0.0,tmass);
|
||||
|
||||
lv += lv1;
|
||||
|
||||
G4ThreeVector bst = lv.boostVector();
|
||||
|
||||
// lv1.boost(-bst);
|
||||
|
||||
// G4ThreeVector p1 = lv1.vect();
|
||||
// G4double ptot = p1.mag();
|
||||
|
||||
G4double phi = G4UniformRand()*twopi;
|
||||
G4double cost = std::cos(thetaLab);
|
||||
G4double sint;
|
||||
|
||||
if( cost >= 1.0 )
|
||||
{
|
||||
cost = 1.0;
|
||||
sint = 0.0;
|
||||
}
|
||||
else if( cost <= -1.0)
|
||||
{
|
||||
cost = -1.0;
|
||||
sint = 0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
sint = std::sqrt((1.0-cost)*(1.0+cost));
|
||||
}
|
||||
if (verboseLevel>1)
|
||||
{
|
||||
G4cout << "cos(tlab)=" << cost << " std::sin(tlab)=" << sint << G4endl;
|
||||
}
|
||||
G4ThreeVector v1(sint*std::cos(phi),sint*std::sin(phi),cost);
|
||||
v1 *= plab;
|
||||
G4LorentzVector nlv1(v1.x(),v1.y(),v1.z(),std::sqrt(plab*plab + m1*m1));
|
||||
|
||||
nlv1.boost(-bst);
|
||||
|
||||
G4ThreeVector np1 = nlv1.vect();
|
||||
|
||||
|
||||
G4double thetaCMS = np1.theta();
|
||||
|
||||
return thetaCMS;
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4HadronElastic.cc,v 1.54 2007/05/25 17:50:49 dennis Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: G4HadronElastic.cc,v 1.55 2007/12/10 09:56:01 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Physics model class G4HadronElastic (derived from G4LElastic)
|
||||
@@ -86,7 +86,7 @@ G4HadronElastic::G4HadronElastic(G4ElasticHadrNucleusHE* HModel)
|
||||
verboseLevel= 0;
|
||||
lowEnergyRecoilLimit = 100.*keV;
|
||||
lowEnergyLimitQ = 0.0*GeV;
|
||||
lowEnergyLimitHE = 1.0*GeV;
|
||||
lowEnergyLimitHE = DBL_MAX;
|
||||
lowestEnergyLimit= 0.0*keV;
|
||||
plabLowLimit = 20.0*MeV;
|
||||
|
||||
@@ -187,7 +187,8 @@ G4HadFinalState* G4HadronElastic::ApplyYourself(
|
||||
// S-wave for very low energy
|
||||
if(plab < plabLowLimit) gtype = fSWave;
|
||||
// HE-elastic for energetic projectile mesons
|
||||
else if(ekin >= lowEnergyLimitHE && theParticle->GetBaryonNumber() == 0)
|
||||
// else if(ekin >= lowEnergyLimitHE && theParticle->GetBaryonNumber() == 0)
|
||||
else if(ekin >= lowEnergyLimitHE && (theParticle == thePionPlus || theParticle == thePionMinus))
|
||||
gtype = fHElastic;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,9 +24,11 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
|
||||
// G4 Low energy model: n-p scattering
|
||||
// F.W. Jones, L.G. Greeniaus, H.P. Wellisch
|
||||
// G4 Low energy model: n-p scattering
|
||||
// F.W. Jones, L.G. Greeniaus, H.P. Wellisch
|
||||
|
||||
// 11-OCT-2007 F.W. Jones: removed erroneous code for identity
|
||||
// exchange of particles.
|
||||
|
||||
#include "G4LEnp.hh"
|
||||
#include "Randomize.hh"
|
||||
@@ -312,30 +314,14 @@ G4LEnp::ApplyYourself(const G4HadProjectile& aTrack, G4Nucleus& targetNucleus)
|
||||
<< G4endl;
|
||||
}
|
||||
|
||||
// charge symmetry....
|
||||
if(G4UniformRand()<.5)
|
||||
{
|
||||
theParticleChange.SetMomentumChange(newP->GetMomentumDirection());
|
||||
theParticleChange.SetEnergyChange(newP->GetKineticEnergy());
|
||||
delete newP;
|
||||
G4DynamicParticle* p1 = new G4DynamicParticle;
|
||||
p1->SetDefinition(targetParticle->GetDefinition());
|
||||
p1->SetMomentum(targetParticle->GetMomentum());
|
||||
theParticleChange.AddSecondary(p1);
|
||||
}
|
||||
else
|
||||
{
|
||||
theParticleChange.SetStatusChange(stopAndKill);
|
||||
G4DynamicParticle * pA = new G4DynamicParticle;
|
||||
pA->SetDefinition(targetParticle->GetDefinition());
|
||||
pA->SetMomentum(newP->GetMomentum());
|
||||
G4DynamicParticle * pB = new G4DynamicParticle;
|
||||
pB->SetDefinition(newP->GetDefinition());
|
||||
pB->SetMomentum(targetParticle->GetMomentum());
|
||||
delete newP;
|
||||
theParticleChange.AddSecondary(pA);
|
||||
theParticleChange.AddSecondary(pB);
|
||||
}
|
||||
theParticleChange.SetMomentumChange(newP->GetMomentumDirection());
|
||||
theParticleChange.SetEnergyChange(newP->GetKineticEnergy());
|
||||
delete newP;
|
||||
G4DynamicParticle* p1 = new G4DynamicParticle;
|
||||
p1->SetDefinition(targetParticle->GetDefinition());
|
||||
p1->SetMomentum(targetParticle->GetMomentum());
|
||||
theParticleChange.AddSecondary(p1);
|
||||
|
||||
return &theParticleChange;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4UHadronElasticProcess.cc,v 1.34 2007/06/14 17:08:27 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: G4UHadronElasticProcess.cc,v 1.35 2007/11/15 15:53:25 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
// Geant4 Hadron Elastic Scattering Process -- header file
|
||||
//
|
||||
@@ -118,12 +118,14 @@ G4double G4UHadronElasticProcess::GetMeanFreePath(const G4Track& track,
|
||||
G4double temp = material->GetTemperature();
|
||||
G4int nelm = material->GetNumberOfElements();
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if(verboseLevel>1)
|
||||
G4cout << "G4UHadronElasticProcess get mfp for "
|
||||
<< theParticle->GetParticleName()
|
||||
<< " p(GeV)= " << dp->GetTotalMomentum()/GeV
|
||||
<< " in " << material->GetName()
|
||||
<< G4endl;
|
||||
#endif
|
||||
|
||||
for (G4int i=0; i<nelm; i++) {
|
||||
const G4Element* elm = (*theElementVector)[i];
|
||||
@@ -131,14 +133,17 @@ G4double G4UHadronElasticProcess::GetMeanFreePath(const G4Track& track,
|
||||
cross += theAtomNumDensityVector[i]*x;
|
||||
xsec[i] = cross;
|
||||
}
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if(verboseLevel>1)
|
||||
G4cout << "G4UHadronElasticProcess cross(1/mm)= " << cross
|
||||
<< " E(MeV)= " << dp->GetKineticEnergy()
|
||||
<< " " << theParticle->GetParticleName()
|
||||
<< " in " << material->GetName()
|
||||
<< G4endl;
|
||||
if(cross > DBL_MIN) x = 1./cross;
|
||||
#endif
|
||||
|
||||
if(cross > DBL_MIN) x = 1./cross;
|
||||
return x;
|
||||
}
|
||||
|
||||
@@ -165,11 +170,14 @@ G4double G4UHadronElasticProcess::GetMicroscopicCrossSection(
|
||||
G4int N = G4int(elm->GetN()+0.5) - iz;
|
||||
x = qCManager->GetCrossSection(true,momentum,iz,N,pPDG);
|
||||
xsecH[0] = x;
|
||||
#ifdef G4VERBOSE
|
||||
if(verboseLevel>1)
|
||||
G4cout << "G4UHadronElasticProcess compute CHIPS CS for Z= " << iz
|
||||
<< " N= " << N << " pdg= " << pPDG
|
||||
<< " mom(GeV)= " << momentum/GeV
|
||||
<< " " << qCManager << G4endl;
|
||||
#endif
|
||||
|
||||
} else {
|
||||
G4double* ab = elm->GetRelativeAbundanceVector();
|
||||
for(G4int j=0; j<ni; j++) {
|
||||
@@ -192,10 +200,12 @@ G4double G4UHadronElasticProcess::GetMicroscopicCrossSection(
|
||||
|
||||
// GHAD cross section
|
||||
} else {
|
||||
#ifdef G4VERBOSE
|
||||
if(verboseLevel>1)
|
||||
G4cout << "G4UHadronElasticProcess compute GHAD CS for element "
|
||||
<< elm->GetName()
|
||||
<< G4endl;
|
||||
#endif
|
||||
x = store->GetCrossSection(dp, elm, temp);
|
||||
}
|
||||
// NaN finder
|
||||
@@ -211,12 +221,14 @@ G4double G4UHadronElasticProcess::GetMicroscopicCrossSection(
|
||||
x = 0.0;
|
||||
}
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if(verboseLevel>1)
|
||||
G4cout << "G4UHadronElasticProcess cross(mb)= " << x/millibarn
|
||||
<< " E(MeV)= " << dp->GetKineticEnergy()
|
||||
<< " " << theParticle->GetParticleName()
|
||||
<< " in Z= " << iz
|
||||
<< G4endl;
|
||||
#endif
|
||||
|
||||
return x;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user