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