Import Geant4 8.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 14:36:02 +02:00
parent d93e1e39a9
commit 8a51e0bc40
5471 changed files with 99628 additions and 55248 deletions
@@ -21,9 +21,22 @@
// ********************************************************************
//
//
// $Id: G4DiffElasticHadrNucleus.hh,v 1.10 2005/06/10 13:23:42 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4DiffElasticHadrNucleus.hh,v 1.13 2005/11/25 19:17:32 dennis Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// G4DiffElasticHadrNucleus header file
//
// High energy hadron-nucleus elastic scattering
// Kinetic energy T > 1 GeV
// N. Starkov 2003.
//
// Modifications:
// 14.11.05 The HE elastic scattering on proton is added (N.Starkov)
// 23.11.05 int -> G4int, fabs -> abs (V.Ivanchenko)
//
#ifndef G4DiffElasticHadrNucleus_h
#define G4DiffElasticHadrNucleus_h 1
@@ -32,49 +45,51 @@
#include "G4HadronValues.hh"
#include "G4IntegrHadrNucleus.hh"
class G4DiffElasticHadrNucleus: public //G4HadronValues
G4IntegrHadrNucleus
{
class G4DiffElasticHadrNucleus: public G4IntegrHadrNucleus
{
public:
G4DiffElasticHadrNucleus() : // G4HadronValues(),
G4IntegrHadrNucleus()
{
Factors();
r0 = 1.1; // The WS's parameters
r01 = 1.16;
rAmax = 2.5;
NpointsB = 500;
}
public:
G4DiffElasticHadrNucleus();
~G4DiffElasticHadrNucleus() {;}
~G4DiffElasticHadrNucleus();
G4double HadrNuclDifferCrSec(
G4double HadrNuclDifferCrSec(
const G4DynamicParticle * aHadron,
G4Nucleus * aNucleus,
G4double Q2);
G4double HadrNuclDifferCrSecT(
G4double HadrNuclDifferCrSecT(
const G4DynamicParticle * aHadron,
G4Nucleus * aNucleus,
G4double Q2,
G4int Kind);
G4double Thickness(G4int A, G4double b);
G4double Thickness(G4int A, G4double b);
void GetIntegrandB(G4int Anucleus);
void GetIntegrandB(G4int Anucleus);
G4double GetIntegrandS(G4int Anucleus, G4double b, G4int Kind);
G4double GetIntegrandS(G4int Anucleus, G4double b, G4int Kind);
void GetNucleusParameters(G4Nucleus * aNucleus);
void GetNucleusParameters(G4Nucleus * aNucleus);
G4double HadronProtonDiffCrSec(G4double Q2);
G4double MyJ0(G4double x)
void GetKinematics(const G4DynamicParticle * aHadron);
void GetParametersHP(const G4DynamicParticle * aHadron);
G4double LineInterpol(G4double p0, G4double p1,
G4double c0, G4double c1,
G4double p);
// ====================================================
G4double MyJ0(G4double x)
{
G4double x1, x2, x3, x4, x5, x6, x7, f0, th0, res;
x2 = x*x/9.0;
if(std::fabs(x)<=3)
if(std::abs(x)<=3.0)
{
x3 = x2*x2;
x4 = x3*x2;
@@ -104,8 +119,8 @@ class G4DiffElasticHadrNucleus: public //G4HadronValues
}
return res;
}
G4double MyI0(G4double x)
// +++++++++++++++++++++++++++++++++++++++++++++
G4double MyI0(G4double x)
{
G4double p1=1.0, p2=3.5156229, p3=3.0899424,
p4=1.2067492, p5=0.2659732, p6=3.360768e-2,
@@ -114,7 +129,7 @@ class G4DiffElasticHadrNucleus: public //G4HadronValues
q4=-1.57565e-3, q5=9.16281e-3, q6=-2.057706e-2,
q7=2.635537e-2, q8=-1.647633e-2, q9=3.922377e-3;
G4double k1=3.75, ax=std::fabs(x), y=0.0, result=0.0;
G4double k1=3.75, ax=std::abs(x), y=0.0, result=0.0;
if(ax<k1)
{
@@ -131,86 +146,61 @@ class G4DiffElasticHadrNucleus: public //G4HadronValues
return result;
}
private:
private:
void Factors();
// ++++++++++++++++++++++++++++++++++++++++++++++++++
G4double binom(G4int N, G4int M)
{
G4double binom(G4int N, G4int M)
{
G4double Fact1 = 1;
if ((N>1) & (N>=M))
{
Fact1 = Factorials[N]/Factorials[M]/
Fact1 = Factorials[N]/Factorials[M]/
Factorials[N-M];
}
return Fact1;
}
// +++++++++++++++++++++++++++++++++++++++++++++++++++
G4double Factorial(G4int N)
G4double Factorial(G4int N)
{
G4double Res;
Res = 1;
if(N == 0) return Res;
G4double Res=1;
if(N < 100) for(G4int M = 1; M<=N; M++) Res = Res*M;
if(N == 0) return Res;
if(N >= 100) Res = 2.50662827*std::exp(static_cast<double>(-N-1))*
if(N < 100) for(G4int M = 1; M<=N; M++) Res = Res*M;
if(N >= 100) Res = 2.50662827*
std::exp(static_cast<double>(-N-1))*
std::pow(static_cast<double>(N+1),N+0.5)*
(1+1/12/(N+1)+1/288/(N+1)/(N+1)-
139/51840/(N+1)/(N+1)/(N+1)-
571/2488320/(N+1)/(N+1)/(N+1)/(N+1));
return Res;
}
return Res;
}
// +++++++++++++++++++++++++++++++++++++++++++++++++++
void Factors()
{
G4int ii, ll, mm;
G4double Sum1, Fac1, Fac3, Sum3;
Factorials[0] = 1;
for( ii = 1; ii<250; ii++)
{
if(ii >= 100) Mnoj[ii] = 3.03; // there is the saturation
else
{
Sum1 = 0;
Fac1 = 1;
Factorials[ii] = Factorial(ii);
for( ll = 0; ll<=ii; ll++)
{
Fac1 = binom(ii,ll);
Fac3 = 1;
Sum3 = 1;
for( mm = 1; mm<=ii-ll; mm++)
{
Fac3 = binom(ii-ll,mm);
Sum3 = Sum3 + 1/Fac3;
} // mm
Sum1 = Sum1 + Sum3/Fac1;
} // ll
Mnoj[ii] = Sum1;
} // else
} // ii
Mnoj[0] = 1;
} // Factors
// --------------------------------------------------------
public:
G4double Mnoj[250], Factorials[250];
G4double ReIntegrand[1000], ImIntegrand[1000], Thick[1000];
G4double rAfm, rAGeV, stepB, MomentumCMN;
G4double SigTot, Slope, ReOnIm, HdrE, ConstU, Q2;
G4double ProtonM, HadronM, HadronE, Sh, PM2, HM2;
public:
G4double R1, R2, Pnucl, Aeff, AIm, ARe, Dem, DIm, InCoh, InCohI;
G4double r0, r01, rAmax;
G4int NpointsB;
};
G4double EcmP, EcmH, Kcm, CosCM, SqrtS, MaxT, FmaxT, DsigDt;
G4double Slope1, Slope2, Coeff1, Coeff2, IntConst, MaxTR;
G4double Slope0, Coeff0;
G4int NumbPointsB, NumbPointsT, HadrCode;
G4String HadronName;
G4double Mnoj[250], Factorials[250];
G4double ReIntegrand[1000], ImIntegrand[1000], Thick[1000];
G4double rAfm, rAGeV, stepB, MomentumCMN, MomentumH;
G4double R1, R2, Pnucl, Aeff, AIm, ARe, Dem, DIm, InCoh, InCohI;
G4double r0, r01, rAmax;
G4double BoundaryP[7], BoundaryTL[7], BoundaryTG[7];
G4int NpointsB, HadrCodes[7], Intern;
};
#endif