Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4InuclSpecialFunctions Namespace Reference

Classes

class  paraMaker
 

Functions

G4double bindingEnergy (G4int A, G4int Z)
 
G4double bindingEnergyAsymptotic (G4int A, G4int Z)
 
G4double FermiEnergy (G4int A, G4int Z, G4int ntype)
 
G4double getAL (G4int A)
 
G4double csNN (G4double e)
 
G4double csPN (G4double e)
 
G4double G4cbrt (G4double x)
 
G4double G4cbrt (G4int n)
 
G4double inuclRndm ()
 
G4double randomInuclPowers (G4double ekin, const G4double(&coeff)[4][4])
 
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

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 }
double A(double temperature)
static G4double GetBindingEnergy(const G4int A, const G4int Z)

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 34 of file bindingEnergyAsymptotic.cc.

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

Here is the call graph for this function:

Here is the caller graph for this function:

G4double G4InuclSpecialFunctions::csNN ( G4double  e)

Definition at line 83 of file G4InuclSpecialFunctions.cc.

83  {
84  G4double snn;
85 
86  if (e < 40.0) {
87  snn = -1174.8 / (e * e) + 3088.5 / e + 5.3107;
88  } else {
89  snn = 93074.0 / (e * e) - 11.148 / e + 22.429;
90  }
91 
92  return snn;
93 }
double G4double
Definition: G4Types.hh:76

Here is the caller graph for this function:

G4double G4InuclSpecialFunctions::csPN ( G4double  e)

Definition at line 95 of file G4InuclSpecialFunctions.cc.

95  {
96  G4double spn;
97 
98  if (e < 40.0) {
99  spn = -5057.4 / (e * e) + 9069.2 / e + 6.9466;
100  } else {
101  spn = 239380.0 / (e * e) + 1802.0 / e + 27.147;
102  }
103 
104  return spn;
105 }
double G4double
Definition: G4Types.hh:76

Here is the caller graph for this function:

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

Definition at line 109 of file G4InuclSpecialFunctions.cc.

109  {
110  G4Pow* g4pow = G4Pow::GetInstance();
111  const G4double C = 55.4 / g4pow->Z23(A);
112  G4double arg = (ntype==0) ? g4pow->Z23(A-Z) : g4pow->Z23(Z);
113 
114  return C * arg;
115 }
static G4Pow * GetInstance()
Definition: G4Pow.cc:55
Definition: G4Pow.hh:56
double C(double temp)
double A(double temperature)
G4double Z23(G4int Z) const
Definition: G4Pow.hh:154
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

Here is the caller graph for this function:

G4double G4InuclSpecialFunctions::G4cbrt ( G4double  x)

Definition at line 117 of file G4InuclSpecialFunctions.cc.

117  {
118  return x==0 ? 0. : (x<0?-1.:1.)*G4Exp(G4Log(std::fabs(x))/3.);
119 }
G4double G4Log(G4double x)
Definition: G4Log.hh:230
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
Definition: G4Exp.hh:183

Here is the call graph for this function:

Here is the caller graph for this function:

G4double G4InuclSpecialFunctions::G4cbrt ( G4int  n)

Definition at line 121 of file G4InuclSpecialFunctions.cc.

121  {
122  return n==0 ? 0. : (n<0?-1.:1.)*G4Pow::GetInstance()->Z13(std::abs(n));
123 }
static G4Pow * GetInstance()
Definition: G4Pow.cc:55
G4double Z13(G4int Z) const
Definition: G4Pow.hh:127

Here is the call graph for this function:

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

Definition at line 151 of file G4InuclSpecialFunctions.cc.

152  {
153  G4double phi = randomPHI();
154  G4double pt = p * std::sqrt(std::fabs(1.0 - ct * ct));
155 
156  // Buffers to avoid memory thrashing
157  static G4ThreadLocal G4ThreeVector *pvec_G4MT_TLS_ = 0;
158  if (!pvec_G4MT_TLS_) {
159  pvec_G4MT_TLS_ = new G4ThreeVector;
160  G4AutoDelete::Register(pvec_G4MT_TLS_);
161  }
162  G4ThreeVector &pvec = *pvec_G4MT_TLS_;
163 
164  static G4ThreadLocal G4LorentzVector *momr_G4MT_TLS_ = 0;
165  if (!momr_G4MT_TLS_) {
166  momr_G4MT_TLS_ = new G4LorentzVector;
167  G4AutoDelete::Register(momr_G4MT_TLS_);
168  }
169  G4LorentzVector &momr = *momr_G4MT_TLS_;
170 
171  pvec.set(pt*std::cos(phi), pt*std::sin(phi), p*ct);
172  momr.setVectM(pvec, mass);
173 
174  return momr;
175 }
void set(double x, double y, double z)
CLHEP::Hep3Vector G4ThreeVector
const char * p
Definition: xmltok.h:285
#define G4ThreadLocal
Definition: tls.hh:89
void setVectM(const Hep3Vector &spatial, double mass)
void Register(T *inst)
Definition: G4AutoDelete.hh:65
double G4double
Definition: G4Types.hh:76
CLHEP::HepLorentzVector G4LorentzVector

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 178 of file G4InuclSpecialFunctions.cc.

178  {
179  std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
180  G4double phi = randomPHI();
181  G4double pt = p * COS_SIN.second;
182 
183  // Buffers to avoid memory thrashing
184  static G4ThreadLocal G4ThreeVector *pvec_G4MT_TLS_ = 0;
185  if (!pvec_G4MT_TLS_) {
186  pvec_G4MT_TLS_ = new G4ThreeVector;
187  G4AutoDelete::Register(pvec_G4MT_TLS_);
188  }
189  G4ThreeVector &pvec = *pvec_G4MT_TLS_;
190 
191  static G4ThreadLocal G4LorentzVector *momr_G4MT_TLS_ = 0;
192  if (!momr_G4MT_TLS_) {
193  momr_G4MT_TLS_ = new G4LorentzVector;
194  G4AutoDelete::Register(momr_G4MT_TLS_);
195  }
196  G4LorentzVector &momr = *momr_G4MT_TLS_;
197 
198  pvec.set(pt*std::cos(phi), pt*std::sin(phi), p*COS_SIN.first);
199  momr.setVectM(pvec, mass);
200 
201  return momr;
202 }
void set(double x, double y, double z)
CLHEP::Hep3Vector G4ThreeVector
const char * p
Definition: xmltok.h:285
#define G4ThreadLocal
Definition: tls.hh:89
void setVectM(const Hep3Vector &spatial, double mass)
void Register(T *inst)
Definition: G4AutoDelete.hh:65
std::pair< G4double, G4double > randomCOS_SIN()
double G4double
Definition: G4Types.hh:76
CLHEP::HepLorentzVector G4LorentzVector

Here is the call graph for this function:

Here is the caller graph for this function:

G4double G4InuclSpecialFunctions::getAL ( G4int  A)

Definition at line 79 of file G4InuclSpecialFunctions.cc.

79  {
80  return 0.76 + 2.2 / G4cbrt(A);
81 }
double A(double temperature)

Here is the call graph for this function:

Here is the caller graph for this function:

G4double G4InuclSpecialFunctions::inuclRndm ( )

Definition at line 125 of file G4InuclSpecialFunctions.cc.

125  {
126  return G4UniformRand();
127 }
#define G4UniformRand()
Definition: Randomize.hh:97

Here is the caller graph for this function:

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 }
double G4double
Definition: G4Types.hh:76

Here is the caller graph for this function:

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

Definition at line 144 of file G4InuclSpecialFunctions.cc.

144  {
145  G4double CT = 1.0 - 2.0 * inuclRndm();
146 
147  return std::pair<G4double, G4double>(CT, std::sqrt(1.0 - CT*CT));
148 }
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

Here is the caller graph for this function:

G4double G4InuclSpecialFunctions::randomGauss ( G4double  sigma)

Definition at line 129 of file G4InuclSpecialFunctions.cc.

129  {
130  const G4double eps = 1.0e-6;
131  G4double r1 = inuclRndm();
132  r1 = r1 > eps ? r1 : eps;
133  G4double r2 = inuclRndm();
134  r2 = r2 > eps ? r2 : eps;
135  r2 = r2 < 1.0 - eps ? r2 : 1.0 - eps;
136 
137  return sigma * std::sin(twopi * r1) * std::sqrt(-2.0 * G4Log(r2));
138 }
static const G4double eps
static constexpr double twopi
Definition: G4SIunits.hh:76
G4double G4Log(G4double x)
Definition: G4Log.hh:230
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

Here is the caller graph for this function:

G4double G4InuclSpecialFunctions::randomInuclPowers ( G4double  ekin,
const G4double(&)  coeff[4][4] 
)

Definition at line 55 of file G4InuclSpecialFunctions.cc.

56  {
57  G4Pow* theG4Pow = G4Pow::GetInstance();
58 
59  G4double S = G4UniformRand(); // Random fraction for expansion
60 
61  G4double C, V;
62  G4double PQ=0., PR=0.;
63  for (G4int i=0; i<4; i++) {
64  V = 0.0;
65  for (G4int k=0; k<4; k++) {
66  C = coeff[i][k];
67  V += C * theG4Pow->powN(ekin, k);
68  }
69 
70  PQ += V;
71  PR += V * theG4Pow->powN(S, i);
72  }
73 
74  return std::sqrt(S) * (PR + (1-PQ)*(S*S*S*S));
75 }
static G4Pow * GetInstance()
Definition: G4Pow.cc:55
G4double powN(G4double x, G4int n) const
Definition: G4Pow.cc:128
double S(double temp)
Definition: G4Pow.hh:56
double C(double temp)
int G4int
Definition: G4Types.hh:78
#define G4UniformRand()
Definition: Randomize.hh:97
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

Here is the caller graph for this function:

G4double G4InuclSpecialFunctions::randomPHI ( )

Definition at line 140 of file G4InuclSpecialFunctions.cc.

140  {
141  return twopi * inuclRndm();
142 }
static constexpr double twopi
Definition: G4SIunits.hh:76

Here is the call graph for this function:

Here is the caller graph for this function: