source: trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundFragment.cc @ 1007

Last change on this file since 1007 was 1007, checked in by garnier, 15 years ago

update to geant4.9.2

File size: 5.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//J. M. Quesada (August 2008). 
27//Based  on previous work by V. Lara
28// JMQ (06 September 2008) Also external choice has been added for:
29//                      - superimposed Coulomb barrier (if useSICB=true)
30//
31#include "G4PreCompoundFragment.hh"
32
33G4PreCompoundFragment::
34G4PreCompoundFragment(const G4PreCompoundFragment &right) :
35  G4VPreCompoundFragment(right)
36{}
37
38
39G4PreCompoundFragment::
40G4PreCompoundFragment(const G4double anA,
41                      const G4double aZ, 
42                      G4VCoulombBarrier* aCoulombBarrier,
43                      const G4String & aName):
44  G4VPreCompoundFragment(anA,aZ,aCoulombBarrier,aName)
45{
46}
47
48
49
50G4PreCompoundFragment::~G4PreCompoundFragment()
51{
52}
53
54
55const G4PreCompoundFragment & G4PreCompoundFragment::
56operator= (const G4PreCompoundFragment & right)
57{
58  if (&right != this) this->G4VPreCompoundFragment::operator=(right);
59  return *this;
60}
61
62G4int G4PreCompoundFragment::operator==(const G4PreCompoundFragment & right) const
63{
64  return G4VPreCompoundFragment::operator==(right);
65}
66
67G4int G4PreCompoundFragment::operator!=(const G4PreCompoundFragment & right) const
68{
69  return G4VPreCompoundFragment::operator!=(right);
70}
71
72
73G4double G4PreCompoundFragment::
74CalcEmissionProbability(const G4Fragment & aFragment)
75{
76// If  theCoulombBarrier effect is included in the emission probabilities
77//if (GetMaximalKineticEnergy() <= 0.0)
78  G4double limit;
79  if(OPTxs==0 ||  useSICB) limit= theCoulombBarrier;
80  else limit=0.;
81  if (GetMaximalKineticEnergy() <= limit) 
82    {
83      theEmissionProbability = 0.0;
84      return 0.0;
85  }   
86// If  theCoulombBarrier effect is included in the emission probabilities
87//  G4double LowerLimit = 0.;
88// Coulomb barrier is the lower limit
89// of integration over kinetic energy
90  G4double LowerLimit = limit;
91
92// Excitation energy of nucleus after fragment emission is the upper limit of integration over kinetic energy
93  G4double UpperLimit = GetMaximalKineticEnergy();
94 
95  theEmissionProbability = 
96    IntegrateEmissionProbability(LowerLimit,UpperLimit,aFragment);
97  return theEmissionProbability;
98}
99
100G4double G4PreCompoundFragment::
101IntegrateEmissionProbability(const G4double & Low, const G4double & Up,
102                             const G4Fragment & aFragment)
103{
104  static const G4int N = 10;
105  // 10-Points Gauss-Legendre abcisas and weights
106  static const G4double w[N] = {
107    0.0666713443086881,
108    0.149451349150581,
109    0.219086362515982,
110    0.269266719309996,
111    0.295524224714753,
112    0.295524224714753,
113    0.269266719309996,
114    0.219086362515982,
115    0.149451349150581,
116    0.0666713443086881
117  };
118  static const G4double x[N] = {
119    -0.973906528517172,
120    -0.865063366688985,
121    -0.679409568299024,
122    -0.433395394129247,
123    -0.148874338981631,
124    0.148874338981631,
125    0.433395394129247,
126    0.679409568299024,
127    0.865063366688985,
128    0.973906528517172
129  };
130 
131  G4double Total = 0.0;
132
133
134  for (G4int i = 0; i < N; i++) 
135    {
136      G4double KineticE = ((Up-Low)*x[i]+(Up+Low))/2.0;
137      Total += w[i]*ProbabilityDistributionFunction(KineticE, aFragment);
138    }
139  Total  *= (Up-Low)/2.0;
140  return Total;
141}
142
143
144
145
146G4double G4PreCompoundFragment::
147GetKineticEnergy(const G4Fragment & aFragment) 
148{
149
150//      G4double V = this->GetCoulombBarrier();// alternative way for accessing the Coulomb barrier
151//                                             //should be equivalent (in fact it is)
152  G4double V;
153  if(OPTxs==0 || useSICB) V= theCoulombBarrier;//let's keep this way for consistency with CalcEmissionProbability method
154  else V=0.;
155
156  G4double Tmax =  GetMaximalKineticEnergy() ; 
157  G4double T(0.0);
158  G4double NormalizedProbability(1.0);
159  do 
160    {
161      T =V+ G4UniformRand()*(Tmax-V);
162      NormalizedProbability = ProbabilityDistributionFunction(T,aFragment)/GetEmissionProbability();     
163    }   while (G4UniformRand() > NormalizedProbability); 
164  return T;
165}
Note: See TracBrowser for help on using the repository browser.