source: trunk/source/processes/hadronic/models/cascade/evaporation/src/G4BENeutronChannel.cc @ 1340

Last change on this file since 1340 was 819, checked in by garnier, 16 years ago

import all except CVS

File size: 7.3 KB
Line 
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#include "globals.hh"
32#include "G4ios.hh"
33#include "Randomize.hh"
34#include "G4Neutron.hh"
35#include "G4Proton.hh"
36#include "G4Deuteron.hh"
37#include "G4Triton.hh"
38#include "G4Alpha.hh"
39#include "G4ParticleTable.hh"   
40#include "G4Nucleus.hh" 
41#include "G4BENeutronChannel.hh"
42
43
44G4BENeutronChannel::G4BENeutronChannel()
45{
46  name         = "neutron";
47  particleA    = 1;
48  particleZ    = 0;
49  verboseLevel = 0;
50  rho          = 0;
51}
52
53
54G4BENeutronChannel::~G4BENeutronChannel()
55{
56}
57
58
59void G4BENeutronChannel::calculateProbability()
60{
61  const G4int residualZ = nucleusZ - particleZ;
62  const G4int residualA = nucleusA - particleA;
63
64  if ( nucleusA  <  2.0 * particleA || 
65       nucleusZ  <  2.0 * particleZ || 
66       residualA <= residualZ       || 
67       excitationEnergy - getThresh() - correction < 0 )
68    {
69      if ( verboseLevel >= 6 )
70        G4cout << "G4BENeutronChannel : calculateProbability = 0 " << G4endl;
71      emissionProbability = 0;
72      return;
73    }
74
75  // In HETC88 s-s0 was used in std::exp( s ), in which s0 was either 50 or
76  // max(s_i), where i goes over all channels.
77
78  const G4double levelParam = getLevelDensityParameter();
79 
80  const G4double s    = 2 * std::sqrt( levelParam  * ( excitationEnergy - getThresh() - correction ) );
81  // const G4double temp = ( std::pow( s, 2. ) - 3 * s + 3 ) / ( 4 * std::pow( levelParam, 2. ) )
82  //  + beta() * ( s - 1 ) /  ( 2 * levelParam );
83  const G4double eye0 = std::exp( s ) * ( s - 1 ) /  ( 2 * levelParam );
84  const G4double eye1 = ( std::pow( s, 2. ) - 3*s +3 ) * std::exp( s ) / ( 4 * std::pow( levelParam, 2. ) ) ;
85 
86  emissionProbability = std::pow( G4double(residualA), 0.666666 ) * alpha() * ( eye1 + beta() * eye0 );
87 
88  if ( verboseLevel >= 6 )
89    G4cout << "G4BENeutronChannel : calculateProbability " << G4endl
90           << "                    res A = " << residualA << G4endl
91           << "                    res Z = " << residualZ << G4endl
92           << "                    alpha = " << alpha() << G4endl
93           << "                     beta = " << beta() << G4endl
94           << "                        E = " << excitationEnergy << G4endl
95           << "               correction = " << correction << G4endl
96           << "                     eye1 = " << eye1 << G4endl
97           << "                     eye0 = " <<  eye0 << G4endl
98           << "               levelParam = " << levelParam << G4endl
99           << "                   thresh = " << getThresh() << G4endl
100           << "                        s = " << s << G4endl
101           << "              probability = " << emissionProbability << G4endl;
102
103  return;
104}
105
106
107G4double  G4BENeutronChannel::sampleKineticEnergy()
108{
109  // Samples the kinetic energy of the particle in CMS
110  //
111  // Algorithm used in HETC98
112  //
113//    G4double e1;
114//    G4double e2;
115//    G4double s;
116//    G4double levelParam;
117//    G4double eye0;
118//    G4double eye1;
119//    G4double kineticEnergyAv;
120//    G4double kineticEnergy;
121 
122//    e1 = RandExponential::shoot( 1 );
123//    e2 = RandExponential::shoot( 1 );
124
125//    levelParam  = getLevelDensityParameter();
126//    s = 2 * std::sqrt( levelParam  * ( excitationEnergy - getThresh() - correction ) );
127//    eye0 = 0.5 * ( s - 1 ) * std::exp( s ) / levelParam;
128//    eye1 = ( std::pow( s, 2. ) - 3*s + 3 ) * std::exp( s ) / ( 4 * std::pow( levelParam, 2. ) );
129//    kineticEnergyAv = 2 * ( std::pow( s, 3. ) - 6.0 * std::pow( s, 2. ) + 15.0 * s - 15.0 )  /
130//        ( ( 2.0 * std::pow( s, 2. ) - 6.0 * s + 6.0 ) * levelParam );
131//    kineticEnergyAv = ( kineticEnergyAv + beta() ) / ( 1.0 + beta() * eye0
132//         / eye1 );
133 
134//    kineticEnergy = 0.5 * ( e1 + e2 ) * kineticEnergyAv + getThresh() - getQ();
135
136  ////////////////
137  // A random number is sampled from the density function
138  // P(x) = x * std::exp ( 2 std::sqrt ( a ( xMax - x ) ) )  [not normalized],
139  // x belongs to [ 0, xMax ]
140  // with the 'Hit or Miss' -method
141  // Kinetic energy is this energy scaled properly
142 
143  G4double levelParam;
144  levelParam = getLevelDensityParameter();
145 
146  const G4double xMax  = excitationEnergy - getThresh() - correction + beta(); // maximum number
147  const G4double xProb = ( - 1 + std::sqrt ( 1 + 4 * levelParam * xMax ) ) / ( 2 * levelParam ); // most probable value
148  const G4double m = xProb * std::exp ( 2 * std::sqrt ( levelParam * ( xMax - xProb ) ) ); // maximum value of P(x)
149
150  // Sample x according to density function P(x) with rejection method
151  G4double r1;
152  G4double r2;
153  G4int koe=0;
154  do
155    {
156      r1 = beta() + G4UniformRand() * ( xMax - beta() );
157      r2 = G4UniformRand() * m;
158      koe++;
159    }
160  while (  r1 * std::exp ( 2 * std::sqrt ( levelParam * ( xMax - r1 ) ) )  < r2 );
161
162//  G4cout <<  koe << G4endl;
163  G4double kineticEnergy = r1 - beta();
164
165  if ( verboseLevel >= 10 )
166    G4cout << " G4BENeutronChannel : sampleKineticEnergy() " << G4endl
167           << "       kinetic n e = " << kineticEnergy << G4endl
168           << "        levelParam = " << levelParam << G4endl
169           << "             thresh= " << getThresh() << G4endl
170           << "               beta= " << beta() << G4endl;
171
172  return kineticEnergy;
173}
174
175
176G4DynamicParticle *  G4BENeutronChannel::emit()
177{
178  G4double u;
179  G4double v;
180  G4double w;
181  G4DynamicParticle * pParticle = new G4DynamicParticle;
182
183  pParticle -> SetDefinition( G4Neutron::Neutron() );
184  pParticle -> SetKineticEnergy( sampleKineticEnergy() ); 
185  isotropicCosines( u, v, w );
186  pParticle -> SetMomentumDirection( u , v , w ); 
187
188  return pParticle;
189}
190
191
192G4double G4BENeutronChannel::alpha()
193{
194  const G4double residualA = nucleusA - particleA;
195  return 0.76 + 1.93 * std::pow( residualA, -0.33333 );
196}
197
198
199G4double G4BENeutronChannel::beta()
200{
201  G4double residualA = nucleusA - particleA;
202  return ( 1.66 * std::pow ( residualA, -0.66666 ) - 0.05 )/alpha()*MeV;
203}
204
Note: See TracBrowser for help on using the repository browser.