Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4BENeutronChannel.cc
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26//
27// Implementation of the HETC88 code into Geant4.
28// Evaporation and De-excitation parts
29// T. Lampen, Helsinki Institute of Physics, May-2000
30//
31// 20120608 M. Kelsey -- Change vars 's','m','m2' to avoid name collisions
32
33#include "globals.hh"
34#include "G4ios.hh"
35#include "Randomize.hh"
36#include "G4SystemOfUnits.hh"
37#include "G4Neutron.hh"
38#include "G4Proton.hh"
39#include "G4Deuteron.hh"
40#include "G4Triton.hh"
41#include "G4Alpha.hh"
42#include "G4ParticleTable.hh"
43#include "G4Nucleus.hh"
44#include "G4BENeutronChannel.hh"
45
46
48{
49 name = "neutron";
50 particleA = 1;
51 particleZ = 0;
52 verboseLevel = 0;
53 rho = 0;
54}
55
56
58{
59}
60
61
63{
64 const G4int residualZ = nucleusZ - particleZ;
65 const G4int residualA = nucleusA - particleA;
66
67 if ( nucleusA < 2.0 * particleA ||
68 nucleusZ < 2.0 * particleZ ||
69 residualA <= residualZ ||
71 {
72 if ( verboseLevel >= 6 )
73 G4cout << "G4BENeutronChannel : calculateProbability = 0 " << G4endl;
75 return;
76 }
77
78 // In HETC88 s-s0 was used in std::exp( s ), in which s0 was either 50 or
79 // max(s_i), where i goes over all channels.
80
81 const G4double levelParam = getLevelDensityParameter();
82
83 const G4double slevel = 2 * std::sqrt( levelParam * ( excitationEnergy - getThresh() - correction ) );
84 const G4double eye0 = std::exp( slevel ) * ( slevel - 1 ) / ( 2 * levelParam );
85 const G4double eye1 = ( slevel*slevel - 3*slevel +3 ) * std::exp( slevel ) / ( 4 * levelParam*levelParam ) ;
86
87 emissionProbability = std::pow( G4double(residualA), 0.666666 ) * alpha() * ( eye1 + beta() * eye0 );
88
89 if ( verboseLevel >= 6 )
90 G4cout << "G4BENeutronChannel : calculateProbability " << G4endl
91 << " res A = " << residualA << G4endl
92 << " res Z = " << residualZ << G4endl
93 << " alpha = " << alpha() << G4endl
94 << " beta = " << beta() << G4endl
95 << " E = " << excitationEnergy << G4endl
96 << " correction = " << correction << G4endl
97 << " eye1 = " << eye1 << G4endl
98 << " eye0 = " << eye0 << G4endl
99 << " levelParam = " << levelParam << G4endl
100 << " thresh = " << getThresh() << G4endl
101 << " s = " << s << G4endl
102 << " probability = " << emissionProbability << G4endl;
103
104 return;
105}
106
107
109{
110 ////////////////
111 // A random number is sampled from the density function
112 // P(x) = x * std::exp ( 2 std::sqrt ( a ( xMax - x ) ) ) [not normalized],
113 // x belongs to [ 0, xMax ]
114 // with the 'Hit or Miss' -method
115 // Kinetic energy is this energy scaled properly
116
117 G4double levelParam;
118 levelParam = getLevelDensityParameter();
119
120 const G4double xMax = excitationEnergy - getThresh() - correction + beta(); // maximum number
121 const G4double xProb = ( - 1 + std::sqrt ( 1 + 4 * levelParam * xMax ) ) / ( 2 * levelParam ); // most probable value
122 const G4double maxProb = xProb * std::exp ( 2 * std::sqrt ( levelParam * ( xMax - xProb ) ) ); // maximum value of P(x)
123
124 // Sample x according to density function P(x) with rejection method
125 G4double r1;
126 G4double r2;
127 G4int koe=0;
128 do
129 {
130 r1 = beta() + G4UniformRand() * ( xMax - beta() );
131 r2 = G4UniformRand() * maxProb;
132 koe++;
133 }
134 while ( r1 * std::exp ( 2 * std::sqrt ( levelParam * ( xMax - r1 ) ) ) < r2 );
135
136// G4cout << koe << G4endl;
137 G4double kineticEnergy = r1 - beta();
138
139 if ( verboseLevel >= 10 )
140 G4cout << " G4BENeutronChannel : sampleKineticEnergy() " << G4endl
141 << " kinetic n e = " << kineticEnergy << G4endl
142 << " levelParam = " << levelParam << G4endl
143 << " thresh= " << getThresh() << G4endl
144 << " beta= " << beta() << G4endl;
145
146 return kineticEnergy;
147}
148
149
151{
152 G4double u;
153 G4double v;
154 G4double w;
155 G4DynamicParticle * pParticle = new G4DynamicParticle;
156
157 pParticle -> SetDefinition( G4Neutron::Neutron() );
158 pParticle -> SetKineticEnergy( sampleKineticEnergy() );
159 isotropicCosines( u, v, w );
160 pParticle -> SetMomentumDirection( u , v , w );
161
162 return pParticle;
163}
164
165
166G4double G4BENeutronChannel::alpha()
167{
168 const G4double residualA = nucleusA - particleA;
169 return 0.76 + 1.93 * std::pow( residualA, -0.33333 );
170}
171
172
173G4double G4BENeutronChannel::beta()
174{
175 G4double residualA = nucleusA - particleA;
176 return ( 1.66 * std::pow ( residualA, -0.66666 ) - 0.05 )/alpha()*MeV;
177}
178
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
#define G4UniformRand()
Definition: Randomize.hh:53
G4DynamicParticle * emit()
virtual void calculateProbability()
void isotropicCosines(G4double &, G4double &, G4double &)
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104