Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4InuclSpecialFunctions Namespace Reference

Functions

G4double bindingEnergy (G4int A, G4int Z)
 
G4double bindingEnergyAsymptotic (G4int A, G4int Z)
 
G4double FermiEnergy (G4int A, G4int Z, G4int ntype)
 
void paraMaker (G4double Z, std::pair< std::vector< G4double >, std::vector< G4double > > &parms)
 
void paraMakerTruncated (G4double Z, std::pair< G4double, G4double > &parms)
 
G4double getAL (G4int A)
 
G4double csNN (G4double e)
 
G4double csPN (G4double e)
 
G4double G4cbrt (G4double x)
 
G4double inuclRndm ()
 
G4double randomGauss (G4double sigma)
 
G4double randomPHI ()
 
std::pair< G4double, G4doublerandomCOS_SIN ()
 
G4double nucleiLevelDensity (G4int A)
 
G4LorentzVector generateWithFixedTheta (G4double ct, G4double p, G4double mass=0.)
 
G4LorentzVector generateWithRandomAngles (G4double p, G4double mass=0.)
 

Function Documentation

◆ bindingEnergy()

G4double G4InuclSpecialFunctions::bindingEnergy ( G4int  A,
G4int  Z 
)

Definition at line 37 of file bindingEnergy.cc.

37 {
38 // NOTE: Test condition copied from G4NucleiProperties.cc; not encapsulated
39 if (A < 1 || Z < 0 || Z > A) return 0.;
40
42}
static G4double GetBindingEnergy(const G4int A, const G4int Z)

Referenced by G4BigBanger::collide(), G4EquilibriumEvaporator::collide(), G4Fissioner::collide(), G4NonEquilibriumEvaporator::collide(), G4CascadeColliderBase::explosion(), G4CascadeRecoilMaker::goodNucleus(), and G4NucleiModel::initializeCascad().

◆ bindingEnergyAsymptotic()

G4double G4InuclSpecialFunctions::bindingEnergyAsymptotic ( G4int  A,
G4int  Z 
)

Definition at line 33 of file bindingEnergyAsymptotic.cc.

33 {
34 // calculates the nuclei binding energy
35 // using smooth liquid high energy formula
36 G4double X = (1.0 - 2.0*Z/A); X *= X;
37 G4double X1 = G4cbrt(A);
38 G4double X2 = X1 * X1;
39 G4double X3 = 1.0 / X1;
40 G4double X4 = 1.0 / X2;
41 G4double X5 = (1.0 - 0.62025 * X4); X5 *= X5;
42
43 G4double DM = 17.035 * (1.0 - 1.846 * X) * A -
44 25.8357 * (1.0 - 1.712 * X) * X2 * X5 -
45 0.779 * Z * (Z - 1) * X3 *
46 (1.0 - 1.5849 * X4 + 1.2273 / A + 1.5772 * X4 * X4) +
47 0.4328 * G4cbrt(Z*Z*Z*Z) * X3 *
48 (1.0 - 0.57811 * X3 - 0.14518 * X4 + 0.496 / A);
49
50 return DM;
51}
double G4double
Definition: G4Types.hh:64

Referenced by G4Fissioner::collide().

◆ csNN()

G4double G4InuclSpecialFunctions::csNN ( G4double  e)

Definition at line 46 of file G4InuclSpecialFunctions.cc.

46 {
47 G4double snn;
48
49 if (e < 40.0) {
50 snn = -1174.8 / (e * e) + 3088.5 / e + 5.3107;
51 } else {
52 snn = 93074.0 / (e * e) - 11.148 / e + 22.429;
53 }
54
55 return snn;
56}

Referenced by G4NonEquilibriumEvaporator::collide().

◆ csPN()

G4double G4InuclSpecialFunctions::csPN ( G4double  e)

Definition at line 58 of file G4InuclSpecialFunctions.cc.

58 {
59 G4double spn;
60
61 if (e < 40.0) {
62 spn = -5057.4 / (e * e) + 9069.2 / e + 6.9466;
63 } else {
64 spn = 239380.0 / (e * e) + 1802.0 / e + 27.147;
65 }
66
67 return spn;
68}

Referenced by G4NonEquilibriumEvaporator::collide().

◆ FermiEnergy()

G4double G4InuclSpecialFunctions::FermiEnergy ( G4int  A,
G4int  Z,
G4int  ntype 
)

Definition at line 72 of file G4InuclSpecialFunctions.cc.

72 {
73 const G4double C = 55.4;
74 G4double arg = (ntype==0) ? G4double(A-Z)/A : G4double(Z)/A;
75
76 return C * G4cbrt(arg*arg); // 2/3 power
77}

Referenced by G4NonEquilibriumEvaporator::collide().

◆ G4cbrt()

◆ generateWithFixedTheta()

G4LorentzVector G4InuclSpecialFunctions::generateWithFixedTheta ( G4double  ct,
G4double  p,
G4double  mass = 0. 
)

Definition at line 109 of file G4InuclSpecialFunctions.cc.

110 {
111 G4double phi = randomPHI();
112 G4double pt = p * std::sqrt(std::fabs(1.0 - ct * ct));
113
114 static G4ThreeVector pvec; // Buffers to avoid memory thrashing
115 static G4LorentzVector momr;
116
117 pvec.set(pt*std::cos(phi), pt*std::sin(phi), p*ct);
118 momr.setVectM(pvec, mass);
119
120 return momr;
121}
void set(double x, double y, double z)
void setVectM(const Hep3Vector &spatial, double mass)

Referenced by G4NucleiModel::initializeCascad().

◆ generateWithRandomAngles()

G4LorentzVector G4InuclSpecialFunctions::generateWithRandomAngles ( G4double  p,
G4double  mass = 0. 
)

Definition at line 124 of file G4InuclSpecialFunctions.cc.

124 {
125 std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
126 G4double phi = randomPHI();
127 G4double pt = p * COS_SIN.second;
128
129 static G4ThreeVector pvec; // Buffers to avoid memory thrashing
130 static G4LorentzVector momr;
131
132 pvec.set(pt*std::cos(phi), pt*std::sin(phi), p*COS_SIN.first);
133 momr.setVectM(pvec, mass);
134
135 return momr;
136}
std::pair< G4double, G4double > randomCOS_SIN()

Referenced by G4EquilibriumEvaporator::collide(), G4Fissioner::collide(), G4NonEquilibriumEvaporator::collide(), G4NucleiModel::generateNucleonMomentum(), and G4NucleiModel::initializeCascad().

◆ getAL()

G4double G4InuclSpecialFunctions::getAL ( G4int  A)

Definition at line 42 of file G4InuclSpecialFunctions.cc.

42 {
43 return 0.76 + 2.2 / G4cbrt(A);
44}

Referenced by G4EquilibriumEvaporator::collide(), and G4NonEquilibriumEvaporator::collide().

◆ inuclRndm()

◆ nucleiLevelDensity()

G4double G4InuclSpecialFunctions::nucleiLevelDensity ( G4int  A)

Definition at line 33 of file nucleiLevelDensity.cc.

33 {
34 const G4double NLD[226] = {
35 // 20 - 29
36 3.94, 3.84, 3.74, 3.64, 3.55, 4.35, 4.26, 4.09, 3.96, 4.18,
37 // 30 - 39
38 4.39, 4.61, 4.82, 4.44, 4.44, 4.43, 4.42, 5.04, 5.66, 5.8,
39 // 40 - 49
40 5.95, 5.49, 6.18, 7.11, 6.96, 7.2, 7.73, 6.41, 6.85, 6.77,
41 // 50 - 59
42 6.91, 7.3, 7.2, 6.86, 8.06, 7.8, 7.82, 8.41, 8.13, 7.19,
43 // 60 - 69
44 8.35, 8.13, 8.02, 8.93, 8.9, 9.7, 9.65, 10.55, 9.38, 9.72,
45 // 70 - 79
46 10.66, 11.98, 12.76, 12.1, 12.86, 13.0, 12.81, 12.8, 12.65, 12.0,
47 // 80 - 89
48 12.69, 14.05, 13.33, 13.28, 13.22, 13.17, 8.66, 11.03, 10.4, 13.47,
49 // 90 - 99
50 10.17, 12.22, 11.62, 12.95, 13.15, 13.57, 12.87, 16.2, 14.71, 15.69,
51 // 100 - 109
52 14.1, 18.56, 16.22, 16.7, 17.13, 17.0, 16.86, 16.2, 15.61, 16.8,
53 // 110 - 119
54 17.93, 17.5, 16.97, 17.3, 17.6, 15.78, 16.8, 17.49, 16.03, 15.08,
55 // 120 - 129
56 16.74, 17.74, 17.43, 18.1, 17.1, 19.01, 17.02, 17.0, 17.02, 18.51,
57 // 130 - 139
58 17.2, 16.8, 16.97, 16.14, 16.91, 17.69, 15.5, 14.56, 14.35, 16.5,
59 // 140 - 149
60 18.29, 17.8, 17.05, 21.31, 19.15, 19.5, 19.78, 20.3, 20.9, 21.9,
61 // 150 - 159
62 22.89, 25.68, 24.6, 24.91, 23.24, 22.9, 22.46, 21.98, 21.64, 21.8,
63 // 160 - 169
64 21.85, 21.7, 21.69, 23.7, 21.35, 23.03, 20.66, 21.81, 20.77, 22.2,
65 // 170 - 179
66 22.58, 22.55, 21.45, 21.16, 21.02, 20.87, 22.09, 22.0, 21.28, 23.05,
67 // 180 - 189
68 21.7, 21.18, 22.28, 23.0, 22.11, 23.56, 22.83, 24.88, 22.6, 23.5,
69 // 190 - 199
70 23.89, 23.9, 23.94, 21.16, 22.3, 21.7, 21.19, 20.7, 20.29, 21.32,
71 // 200 - 209
72 19.0, 17.93, 17.85, 15.7, 13.54, 11.9, 10.02, 10.48, 10.28, 11.72,
73 // 210 - 219
74 13.81, 14.7, 15.5, 16.3, 17.2, 18.0, 18.9, 19.7, 20.6, 21.4,
75 // 220 - 229
76 22.3, 23.1, 24.0, 24.8, 25.6, 26.5, 27.3, 28.2, 29.0, 29.9,
77 // 230 - 239
78 30.71, 30.53, 31.45, 29.6, 30.2, 30.65, 30.27, 29.52, 30.08, 29.8,
79 // 240 - 245
80 29.87, 30.25, 30.5, 29.8, 29.17, 28.67};
81
82 return (a>=20) ? NLD[a-20] : 0.1*a;
83}

Referenced by G4Fissioner::collide().

◆ paraMaker()

void G4InuclSpecialFunctions::paraMaker ( G4double  Z,
std::pair< std::vector< G4double >, std::vector< G4double > > &  parms 
)

Definition at line 38 of file paraMaker.cc.

39 {
40 G4int verboseLevel(0);
41
42 if (verboseLevel > 3) {
43 G4cout << " >>> G4InuclSpecialFunctions::paraMaker" << G4endl;
44 }
45
46 // calculates the coefficients for the phenomenological formulas for
47 // coulumb barier, c.s. etc needed for evaporators
48
49 static const G4double Z1[5] = {10.0, 20.0, 30.0, 50.0, 70.0};
50 static const G4double AP[5] = {0.42, 0.58, 0.68, 0.77, 0.80};
51 static const G4double CP[5] = {0.50, 0.28, 0.20, 0.15, 0.10};
52 static const G4double AA[5] = {0.68, 0.82, 0.91, 0.97, 0.98};
53 static const G4double CA[5] = {0.10, 0.10, 0.10, 0.08, 0.06};
54
55 // Set up input buffer for results
56 std::vector<G4double>& AK = parms.first;
57 AK.resize(6,0.);
58
59 std::vector<G4double>& CPA = parms.second;
60 CPA.resize(6,0.);
61
62 AK[0] = 0.0;
63 CPA[0] = 0.0;
64
65 static G4CascadeInterpolator<5> interp(Z1, false); // Do not extrapolate
66 AK[1] = interp.interpolate(Z, AP);
67 AK[5] = interp.interpolate(Z, AA);
68 CPA[1] = interp.interpolate(Z, CP);
69 CPA[5] = interp.interpolate(Z, CA);
70
71 AK[2] = AK[1] + 0.06;
72 AK[3] = AK[1] + 0.12;
73 AK[4] = AK[5] - 0.06;
74
75 CPA[2] = CPA[1] * 0.5;
76 CPA[3] = CPA[1] / 3.0;
77 CPA[4] = 4.0 * CPA[5] / 3.0;
78
79 return; // Buffer filled
80}
int G4int
Definition: G4Types.hh:66
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout

Referenced by G4EquilibriumEvaporator::collide().

◆ paraMakerTruncated()

void G4InuclSpecialFunctions::paraMakerTruncated ( G4double  Z,
std::pair< G4double, G4double > &  parms 
)

Definition at line 83 of file paraMaker.cc.

84 {
85 G4int verboseLevel(0);
86
87 if (verboseLevel > 3) {
88 G4cout << " >>> G4InuclSpecialFunctions::paraMakerTruncated" << G4endl;
89 }
90
91 // truncated version of the previous one
92 static const G4double Z1[5] = {10.0, 20.0, 30.0, 50.0, 70.0};
93 static const G4double AP[5] = {0.42, 0.58, 0.68, 0.77, 0.8};
94 static const G4double CP[5] = {0.5, 0.28, 0.2, 0.15, 0.1};
95
96 // Set up buffers for output
97 G4double& AK2=parms.first;
98 G4double& CP2=parms.second;
99
100 static G4CascadeInterpolator<5> interp(Z1, false); // Do not extrapolate
101 AK2 = interp.interpolate(Z, AP);
102 CP2 = interp.interpolate(Z, CP);
103
104 return; // Buffer filled
105}

Referenced by G4NonEquilibriumEvaporator::collide().

◆ randomCOS_SIN()

std::pair< G4double, G4double > G4InuclSpecialFunctions::randomCOS_SIN ( )

Definition at line 102 of file G4InuclSpecialFunctions.cc.

102 {
103 G4double CT = 1.0 - 2.0 * inuclRndm();
104
105 return std::pair<G4double, G4double>(CT, std::sqrt(1.0 - CT*CT));
106}

Referenced by generateWithRandomAngles().

◆ randomGauss()

G4double G4InuclSpecialFunctions::randomGauss ( G4double  sigma)

Definition at line 87 of file G4InuclSpecialFunctions.cc.

87 {
88 const G4double eps = 1.0e-6;
89 G4double r1 = inuclRndm();
90 r1 = r1 > eps ? r1 : eps;
91 G4double r2 = inuclRndm();
92 r2 = r2 > eps ? r2 : eps;
93 r2 = r2 < 1.0 - eps ? r2 : 1.0 - eps;
94
95 return sigma * std::sin(twopi * r1) * std::sqrt(-2.0 * std::log(r2));
96}

Referenced by G4Fissioner::collide().

◆ randomPHI()

G4double G4InuclSpecialFunctions::randomPHI ( )

Definition at line 98 of file G4InuclSpecialFunctions.cc.

98 {
99 return twopi * inuclRndm();
100}

Referenced by generateWithFixedTheta(), generateWithRandomAngles(), and G4NucleiModel::initializeCascad().