Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Data Structures | Functions
G4InuclSpecialFunctions Namespace Reference

Data Structures

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 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.

References G4NucleiProperties::GetBindingEnergy().

Referenced by G4VAtomDeexcitation::AlongStepDeexcitation(), G4eIonisationSpectrum::AverageEnergy(), G4RDeIonisationSpectrum::AverageEnergy(), G4QMDNucleus::CalEnergyAndAngularMomentumInCM(), G4NonEquilibriumEvaporator::deExcite(), G4BigBanger::deExcite(), G4Fissioner::deExcite(), G4EquilibriumEvaporator::deExcite(), G4CascadeDeexciteBase::explosion(), G4NucleiModel::fillBindingEnergies(), G4AtomicTransitionManager::G4AtomicTransitionManager(), G4RDAtomicTransitionManager::G4RDAtomicTransitionManager(), G4ProtonField::GetBarrier(), G4SigmaPlusField::GetField(), G4KaonZeroField::GetField(), G4SigmaMinusField::GetField(), G4SigmaZeroField::GetField(), G4KaonMinusField::GetField(), G4KaonPlusField::GetField(), G4PionZeroField::GetField(), G4PionPlusField::GetField(), G4AntiProtonField::GetField(), G4PionMinusField::GetField(), G4CascadeRecoilMaker::goodNucleus(), G4NucleiModel::initializeCascad(), G4LowEnergyPhotoElectric::PostStepDoIt(), G4LowEnergyIonisation::PostStepDoIt(), G4hImpactIonisation::PostStepDoIt(), G4eIonisationSpectrum::Probability(), G4RDeIonisationSpectrum::Probability(), G4DeltaAngle::SampleDirection(), G4eIonisationSpectrum::SampleEnergy(), G4RDeIonisationSpectrum::SampleEnergy(), G4LivermorePolarizedPhotoElectricModel::SampleSecondaries(), G4DNARuddIonisationExtendedModel::SampleSecondaries(), G4DNARuddIonisationModel::SampleSecondaries(), G4DNABornIonisationModel::SampleSecondaries(), G4LivermorePhotoElectricModel::SampleSecondaries(), G4LivermoreIonisationModel::SampleSecondaries(), G4PenelopePhotoElectricModel::SampleSecondaries(), G4KleinNishinaModel::SampleSecondaries(), G4MuElecInelasticModel::SampleSecondaries(), G4MicroElecInelasticModel::SampleSecondaries(), G4PEEffectFluoModel::SampleSecondaries(), G4PenelopeComptonModel::SampleSecondaries(), G4PenelopeIonisationModel::SampleSecondaries(), and G4KM_OpticalEqRhs::SetFactor().

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)
G4double G4InuclSpecialFunctions::bindingEnergyAsymptotic ( G4int  A,
G4int  Z 
)

Definition at line 33 of file bindingEnergyAsymptotic.cc.

References G4cbrt().

Referenced by G4Fissioner::deExcite().

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:76
G4double G4InuclSpecialFunctions::csNN ( G4double  e)

Definition at line 79 of file G4InuclSpecialFunctions.cc.

Referenced by G4NonEquilibriumEvaporator::deExcite().

79  {
80  G4double snn;
81 
82  if (e < 40.0) {
83  snn = -1174.8 / (e * e) + 3088.5 / e + 5.3107;
84  } else {
85  snn = 93074.0 / (e * e) - 11.148 / e + 22.429;
86  }
87 
88  return snn;
89 }
double G4double
Definition: G4Types.hh:76
G4double G4InuclSpecialFunctions::csPN ( G4double  e)

Definition at line 91 of file G4InuclSpecialFunctions.cc.

Referenced by G4NonEquilibriumEvaporator::deExcite().

91  {
92  G4double spn;
93 
94  if (e < 40.0) {
95  spn = -5057.4 / (e * e) + 9069.2 / e + 6.9466;
96  } else {
97  spn = 239380.0 / (e * e) + 1802.0 / e + 27.147;
98  }
99 
100  return spn;
101 }
double G4double
Definition: G4Types.hh:76
G4double G4InuclSpecialFunctions::FermiEnergy ( G4int  A,
G4int  Z,
G4int  ntype 
)

Definition at line 105 of file G4InuclSpecialFunctions.cc.

References G4cbrt().

Referenced by G4NonEquilibriumEvaporator::deExcite().

105  {
106  const G4double C = 55.4;
107  G4double arg = (ntype==0) ? G4double(A-Z)/A : G4double(Z)/A;
108 
109  return C * G4cbrt(arg*arg); // 2/3 power
110 }
double G4double
Definition: G4Types.hh:76
G4double G4InuclSpecialFunctions::G4cbrt ( G4double  x)

Definition at line 112 of file G4InuclSpecialFunctions.cc.

References G4Exp(), and G4Log().

Referenced by bindingEnergyAsymptotic(), G4NonEquilibriumEvaporator::deExcite(), G4Fissioner::deExcite(), G4EquilibriumEvaporator::deExcite(), FermiEnergy(), G4NucleiModel::fillPotentials(), G4NucleiModel::generateModel(), G4NucleiModel::generateNucleonMomentum(), getAL(), G4CascadeColliderBase::inelasticInteractionPossible(), and G4IntraNucleiCascader::initialize().

112  {
113  return x==0 ? 0. : (x<0?-1.:1.)*G4Exp(G4Log(std::fabs(x))/3.);
114 }
G4double G4Log(G4double x)
Definition: G4Log.hh:227
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
Definition: G4Exp.hh:180
G4LorentzVector G4InuclSpecialFunctions::generateWithFixedTheta ( G4double  ct,
G4double  p,
G4double  mass = 0. 
)

Definition at line 142 of file G4InuclSpecialFunctions.cc.

References G4ThreadLocal, randomPHI(), CLHEP::Hep3Vector::set(), and CLHEP::HepLorentzVector::setVectM().

Referenced by G4CascadeFinalStateAlgorithm::FillDirManyBody(), G4CascadeFinalStateAlgorithm::FillDirThreeBody(), and G4NucleiModel::initializeCascad().

143  {
144  G4double phi = randomPHI();
145  G4double pt = p * std::sqrt(std::fabs(1.0 - ct * ct));
146 
147  // Buffers to avoid memory thrashing
148  static G4ThreadLocal G4ThreeVector *pvec_G4MT_TLS_ = 0;
149  if (!pvec_G4MT_TLS_) pvec_G4MT_TLS_ = new G4ThreeVector;
150  G4ThreeVector &pvec = *pvec_G4MT_TLS_;
151 
152  static G4ThreadLocal G4LorentzVector *momr_G4MT_TLS_ = 0;
153  if (!momr_G4MT_TLS_) momr_G4MT_TLS_ = new G4LorentzVector;
154  G4LorentzVector &momr = *momr_G4MT_TLS_;
155 
156  pvec.set(pt*std::cos(phi), pt*std::sin(phi), p*ct);
157  momr.setVectM(pvec, mass);
158 
159  return momr;
160 }
void set(double x, double y, double z)
CLHEP::Hep3Vector G4ThreeVector
const char * p
Definition: xmltok.h:285
#define G4ThreadLocal
Definition: tls.hh:52
void setVectM(const Hep3Vector &spatial, double mass)
double G4double
Definition: G4Types.hh:76
CLHEP::HepLorentzVector G4LorentzVector
G4LorentzVector G4InuclSpecialFunctions::generateWithRandomAngles ( G4double  p,
G4double  mass = 0. 
)

Definition at line 163 of file G4InuclSpecialFunctions.cc.

References G4ThreadLocal, randomCOS_SIN(), randomPHI(), CLHEP::Hep3Vector::set(), and CLHEP::HepLorentzVector::setVectM().

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

163  {
164  std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
165  G4double phi = randomPHI();
166  G4double pt = p * COS_SIN.second;
167 
168  // Buffers to avoid memory thrashing
169  static G4ThreadLocal G4ThreeVector *pvec_G4MT_TLS_ = 0;
170  if (!pvec_G4MT_TLS_) pvec_G4MT_TLS_ = new G4ThreeVector;
171  G4ThreeVector &pvec = *pvec_G4MT_TLS_;
172 
173  static G4ThreadLocal G4LorentzVector *momr_G4MT_TLS_ = 0;
174  if (!momr_G4MT_TLS_) momr_G4MT_TLS_ = new G4LorentzVector;
175  G4LorentzVector &momr = *momr_G4MT_TLS_;
176 
177  pvec.set(pt*std::cos(phi), pt*std::sin(phi), p*COS_SIN.first);
178  momr.setVectM(pvec, mass);
179 
180  return momr;
181 }
void set(double x, double y, double z)
CLHEP::Hep3Vector G4ThreeVector
const char * p
Definition: xmltok.h:285
#define G4ThreadLocal
Definition: tls.hh:52
void setVectM(const Hep3Vector &spatial, double mass)
std::pair< G4double, G4double > randomCOS_SIN()
double G4double
Definition: G4Types.hh:76
CLHEP::HepLorentzVector G4LorentzVector
G4double G4InuclSpecialFunctions::getAL ( G4int  A)

Definition at line 75 of file G4InuclSpecialFunctions.cc.

References G4cbrt().

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

75  {
76  return 0.76 + 2.2 / G4cbrt(A);
77 }
G4double G4InuclSpecialFunctions::inuclRndm ( )
G4double G4InuclSpecialFunctions::nucleiLevelDensity ( G4int  A)

Definition at line 33 of file nucleiLevelDensity.cc.

References test::a.

Referenced by G4Fissioner::deExcite().

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
std::pair< G4double, G4double > G4InuclSpecialFunctions::randomCOS_SIN ( )

Definition at line 135 of file G4InuclSpecialFunctions.cc.

References inuclRndm().

Referenced by generateWithRandomAngles().

135  {
136  G4double CT = 1.0 - 2.0 * inuclRndm();
137 
138  return std::pair<G4double, G4double>(CT, std::sqrt(1.0 - CT*CT));
139 }
double G4double
Definition: G4Types.hh:76
G4double G4InuclSpecialFunctions::randomGauss ( G4double  sigma)

Definition at line 120 of file G4InuclSpecialFunctions.cc.

References G4Log(), inuclRndm(), and python.hepunit::twopi.

Referenced by G4Fissioner::deExcite().

120  {
121  const G4double eps = 1.0e-6;
122  G4double r1 = inuclRndm();
123  r1 = r1 > eps ? r1 : eps;
124  G4double r2 = inuclRndm();
125  r2 = r2 > eps ? r2 : eps;
126  r2 = r2 < 1.0 - eps ? r2 : 1.0 - eps;
127 
128  return sigma * std::sin(twopi * r1) * std::sqrt(-2.0 * G4Log(r2));
129 }
G4double G4Log(G4double x)
Definition: G4Log.hh:227
double G4double
Definition: G4Types.hh:76
G4double G4InuclSpecialFunctions::randomInuclPowers ( G4double  ekin,
const G4double(&)  coeff[4][4] 
)

Definition at line 51 of file G4InuclSpecialFunctions.cc.

References G4UniformRand, G4Pow::GetInstance(), and G4Pow::powN().

Referenced by G4InuclParamAngDst::GetCosTheta(), and G4InuclParamMomDst::GetMomentum().

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