Import Geant4 7.1.0 source tree
This commit is contained in:
+95
-4
@@ -20,6 +20,10 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4DiffElasticHadrNucleus.hh,v 1.10 2005/06/10 13:23:42 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
//
|
||||
#ifndef G4DiffElasticHadrNucleus_h
|
||||
#define G4DiffElasticHadrNucleus_h 1
|
||||
|
||||
@@ -34,7 +38,14 @@ class G4DiffElasticHadrNucleus: public //G4HadronValues
|
||||
|
||||
public:
|
||||
G4DiffElasticHadrNucleus() : // G4HadronValues(),
|
||||
G4IntegrHadrNucleus() {Factors();}
|
||||
G4IntegrHadrNucleus()
|
||||
{
|
||||
Factors();
|
||||
r0 = 1.1; // The WS's parameters
|
||||
r01 = 1.16;
|
||||
rAmax = 2.5;
|
||||
NpointsB = 500;
|
||||
}
|
||||
|
||||
~G4DiffElasticHadrNucleus() {;}
|
||||
|
||||
@@ -43,7 +54,82 @@ class G4DiffElasticHadrNucleus: public //G4HadronValues
|
||||
G4Nucleus * aNucleus,
|
||||
G4double Q2);
|
||||
|
||||
void GetNucleusParameters(G4Nucleus * aNucleus);
|
||||
G4double HadrNuclDifferCrSecT(
|
||||
const G4DynamicParticle * aHadron,
|
||||
G4Nucleus * aNucleus,
|
||||
G4double Q2,
|
||||
G4int Kind);
|
||||
|
||||
G4double Thickness(G4int A, G4double b);
|
||||
|
||||
void GetIntegrandB(G4int Anucleus);
|
||||
|
||||
G4double GetIntegrandS(G4int Anucleus, G4double b, G4int Kind);
|
||||
|
||||
void GetNucleusParameters(G4Nucleus * aNucleus);
|
||||
|
||||
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)
|
||||
{
|
||||
x3 = x2*x2;
|
||||
x4 = x3*x2;
|
||||
x5 = x4*x2;
|
||||
x6 = x5*x2;
|
||||
x7 = x6*x2;
|
||||
res = 1.0-2.2499997*x2+1.2656208*x3-
|
||||
0.3163866*x4+0.0444479*x5-
|
||||
0.0039444*x6+0.0002100*x7;
|
||||
}
|
||||
else
|
||||
{
|
||||
x1 = x/3.0;
|
||||
x3 = x2*x1;
|
||||
x4 = x3*x1;
|
||||
x5 = x4*x1;
|
||||
x6 = x5*x1;
|
||||
f0 = 0.7978456 -0.00000077/x-
|
||||
0.00552740/x2-0.00009512/x3+
|
||||
0.00137237/x4-0.00072805/x5+
|
||||
0.00014476/x6;
|
||||
th0 = x-0.78539816 -0.04166397/x1-
|
||||
0.00003954/x2+0.00262573/x3-
|
||||
0.00054125/x4-0.00029333/x5+
|
||||
0.00013558/x6;
|
||||
res = f0*std::cos(th0)/std::sqrt(x);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
G4double MyI0(G4double x)
|
||||
{
|
||||
G4double p1=1.0, p2=3.5156229, p3=3.0899424,
|
||||
p4=1.2067492, p5=0.2659732, p6=3.360768e-2,
|
||||
p7=4.5813e-3;
|
||||
G4double q1=0.39894228, q2=1.328592e-2, q3=2.25319e-3,
|
||||
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;
|
||||
|
||||
if(ax<k1)
|
||||
{
|
||||
G4double xx = x/k1;
|
||||
y = xx*xx;
|
||||
result = p1+y*(p2+y*(p3+y*(p4+y*(p5+y*(p6+y*p7)))));
|
||||
}
|
||||
else
|
||||
{
|
||||
y = k1/ax;
|
||||
result = std::exp(ax)/std::sqrt(ax)*(q1+y*(q2+y*(q3+y*(q4+
|
||||
y*(q5+y*(q6+y*(q7+y*(q8+y*q9))))))));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -68,7 +154,8 @@ class G4DiffElasticHadrNucleus: public //G4HadronValues
|
||||
|
||||
if(N < 100) for(G4int M = 1; M<=N; M++) Res = Res*M;
|
||||
|
||||
if(N >= 100) Res = 2.50662827*std::exp(-N-1.0)*std::pow(N+1.0,N+0.5)*
|
||||
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));
|
||||
@@ -116,10 +203,14 @@ class G4DiffElasticHadrNucleus: public //G4HadronValues
|
||||
// --------------------------------------------------------
|
||||
|
||||
G4double Mnoj[250], Factorials[250];
|
||||
G4double ReIntegrand[1000], ImIntegrand[1000], Thick[1000];
|
||||
G4double rAfm, rAGeV, stepB, MomentumCMN;
|
||||
|
||||
public:
|
||||
|
||||
G4double R1, R2, Pnucl, Aeff, AIm, ARe, DIm;
|
||||
G4double R1, R2, Pnucl, Aeff, AIm, ARe, Dem, DIm, InCoh, InCohI;
|
||||
G4double r0, r01, rAmax;
|
||||
G4int NpointsB;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
+10
-5
@@ -20,6 +20,10 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ElasticHadrNucleusHE.hh,v 1.15 2005/06/10 13:28:07 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
//
|
||||
// G4ElasticHadrNucleusHe.hh
|
||||
|
||||
#ifndef G4ElasticHadrNucleusHE_h
|
||||
@@ -99,7 +103,7 @@
|
||||
};
|
||||
|
||||
class G4ElasticHadrNucleusHE : public G4DiffElasticHadrNucleus,
|
||||
public G4HadronicInteraction
|
||||
public G4HadronicInteraction
|
||||
{
|
||||
public:
|
||||
G4ElasticHadrNucleusHE(const G4ParticleDefinition * aHadron,
|
||||
@@ -146,16 +150,17 @@
|
||||
|
||||
if(N < 100) for(G4int M = 1; M<=N; M++) Res = Res*M;
|
||||
|
||||
else Res = 2.50662827*std::exp(-N-1.0)*std::pow(N+1.0,N+0.5)*
|
||||
else 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;
|
||||
}
|
||||
}
|
||||
// ++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
std::vector<ElasticData> SetOfElasticData;
|
||||
|
||||
G4IonTable MyIonTable;
|
||||
G4IonTable * MyIonTable;
|
||||
G4DiffElasticHadrNucleus aDiffElHadNcls;
|
||||
// G4HadFinalState FinState;
|
||||
|
||||
@@ -176,6 +181,6 @@
|
||||
Factorials1[250]; // The array for factorials
|
||||
G4double dEbeg1, dEend1, dQ2, maxQ2;
|
||||
|
||||
}; // The end of the class description
|
||||
}; // The end of the class description
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user