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 | // $Id: G4ContinuumGammaTransition.cc,v 1.5 2010/11/17 19:17:17 vnivanch Exp $ |
---|
27 | // GEANT4 tag $Name: geant4-09-04-ref-00 $ |
---|
28 | // |
---|
29 | // ------------------------------------------------------------------- |
---|
30 | // GEANT 4 class file |
---|
31 | // |
---|
32 | // CERN, Geneva, Switzerland |
---|
33 | // |
---|
34 | // File name: G4ContinuumGammaTransition |
---|
35 | // |
---|
36 | // Authors: Carlo Dallapiccola (dallapiccola@umdhep.umd.edu) |
---|
37 | // Maria Grazia Pia (pia@genova.infn.it) |
---|
38 | // |
---|
39 | // Creation date: 23 October 1998 |
---|
40 | // |
---|
41 | // Modifications: |
---|
42 | // |
---|
43 | // 15 April 1999, Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it) |
---|
44 | // Added creation time evaluation for products of evaporation |
---|
45 | // 02 May 2003, V. Ivanchenko change interface to G4NuclearlevelManager |
---|
46 | // 06 Oct 2010, M. Kelsey -- follow changes to G4NuclearLevelManager |
---|
47 | // 17 Nov 2010, V. Ivanchenko use exponential law for sampling of time |
---|
48 | // and extra cleanup |
---|
49 | // ---------------------------------------------------------------------------- |
---|
50 | // |
---|
51 | // Class G4ContinuumGammaTransition.cc |
---|
52 | // |
---|
53 | |
---|
54 | #include "G4ContinuumGammaTransition.hh" |
---|
55 | #include "G4VLevelDensityParameter.hh" |
---|
56 | #include "G4ConstantLevelDensityParameter.hh" |
---|
57 | #include "G4RandGeneralTmp.hh" |
---|
58 | #include "Randomize.hh" |
---|
59 | #include "G4Pow.hh" |
---|
60 | |
---|
61 | // |
---|
62 | // Constructor |
---|
63 | // |
---|
64 | |
---|
65 | G4ContinuumGammaTransition::G4ContinuumGammaTransition( |
---|
66 | const G4NuclearLevelManager* levelManager, |
---|
67 | G4int Z, G4int A, |
---|
68 | G4double excitation, |
---|
69 | G4int verbose): |
---|
70 | _nucleusA(A), _nucleusZ(Z), _excitation(excitation), _levelManager(levelManager) |
---|
71 | { |
---|
72 | G4double eTolerance = 0.; |
---|
73 | G4int lastButOne = _levelManager->NumberOfLevels() - 2; |
---|
74 | if (lastButOne >= 0) |
---|
75 | { |
---|
76 | eTolerance = (_levelManager->MaxLevelEnergy() - |
---|
77 | _levelManager->GetLevel(lastButOne)->Energy()); |
---|
78 | if (eTolerance < 0.) eTolerance = 0.; |
---|
79 | } |
---|
80 | |
---|
81 | |
---|
82 | _verbose = verbose; |
---|
83 | _eGamma = 0.; |
---|
84 | _gammaCreationTime = 0.; |
---|
85 | |
---|
86 | _maxLevelE = _levelManager->MaxLevelEnergy() + eTolerance; |
---|
87 | _minLevelE = _levelManager->MinLevelEnergy(); |
---|
88 | |
---|
89 | // Energy range for photon generation; upper limit is defined 5*Gamma(GDR) from GDR peak |
---|
90 | _eMin = 0.001 * MeV; |
---|
91 | // Giant Dipole Resonance energy |
---|
92 | G4double energyGDR = (40.3 / G4Pow::GetInstance()->powZ(_nucleusA,0.2) ) * MeV; |
---|
93 | // Giant Dipole Resonance width |
---|
94 | G4double widthGDR = 0.30 * energyGDR; |
---|
95 | // Extend |
---|
96 | G4double factor = 5; |
---|
97 | _eMax = energyGDR + factor * widthGDR; |
---|
98 | if (_eMax > excitation) _eMax = _excitation; |
---|
99 | |
---|
100 | } |
---|
101 | |
---|
102 | // |
---|
103 | // Destructor |
---|
104 | // |
---|
105 | |
---|
106 | G4ContinuumGammaTransition::~G4ContinuumGammaTransition() |
---|
107 | {} |
---|
108 | |
---|
109 | void G4ContinuumGammaTransition::SelectGamma() |
---|
110 | { |
---|
111 | |
---|
112 | _eGamma = 0.; |
---|
113 | |
---|
114 | G4int nBins = 200; |
---|
115 | G4double sampleArray[200]; |
---|
116 | G4int i; |
---|
117 | for (i=0; i<nBins; i++) |
---|
118 | { |
---|
119 | G4double e = _eMin + ( (_eMax - _eMin) / nBins) * i; |
---|
120 | sampleArray[i] = E1Pdf(e); |
---|
121 | |
---|
122 | if(_verbose > 10) |
---|
123 | G4cout << "*---* G4ContinuumTransition: e = " << e |
---|
124 | << " pdf = " << sampleArray[i] << G4endl; |
---|
125 | } |
---|
126 | G4RandGeneralTmp randGeneral(sampleArray, nBins); |
---|
127 | G4double random = randGeneral.shoot(); |
---|
128 | |
---|
129 | _eGamma = _eMin + (_eMax - _eMin) * random; |
---|
130 | |
---|
131 | G4double finalExcitation = _excitation - _eGamma; |
---|
132 | |
---|
133 | if(_verbose > 10) { |
---|
134 | G4cout << "*---*---* G4ContinuumTransition: eGamma = " << _eGamma |
---|
135 | << " finalExcitation = " << finalExcitation |
---|
136 | << " random = " << random << G4endl; |
---|
137 | } |
---|
138 | // if (finalExcitation < 0) |
---|
139 | if(finalExcitation < _minLevelE/2.) |
---|
140 | { |
---|
141 | _eGamma = _excitation; |
---|
142 | finalExcitation = 0.; |
---|
143 | } |
---|
144 | |
---|
145 | if (finalExcitation < _maxLevelE && finalExcitation > 0.) |
---|
146 | { |
---|
147 | G4double levelE = _levelManager->NearestLevel(finalExcitation)->Energy(); |
---|
148 | G4double diff = finalExcitation - levelE; |
---|
149 | _eGamma = _eGamma + diff; |
---|
150 | } |
---|
151 | |
---|
152 | _gammaCreationTime = GammaTime(); |
---|
153 | |
---|
154 | if(_verbose > 10) { |
---|
155 | G4cout << "*---*---* G4ContinuumTransition: _gammaCreationTime = " |
---|
156 | << _gammaCreationTime/second << G4endl; |
---|
157 | } |
---|
158 | return; |
---|
159 | } |
---|
160 | |
---|
161 | G4double G4ContinuumGammaTransition::GetGammaEnergy() |
---|
162 | { |
---|
163 | return _eGamma; |
---|
164 | } |
---|
165 | |
---|
166 | G4double G4ContinuumGammaTransition::GetGammaCreationTime() |
---|
167 | { |
---|
168 | return _gammaCreationTime; |
---|
169 | } |
---|
170 | |
---|
171 | |
---|
172 | void G4ContinuumGammaTransition::SetEnergyFrom(G4double energy) |
---|
173 | { |
---|
174 | if (energy > 0.) _excitation = energy; |
---|
175 | } |
---|
176 | |
---|
177 | |
---|
178 | G4double G4ContinuumGammaTransition::E1Pdf(G4double e) |
---|
179 | { |
---|
180 | G4double theProb = 0.0; |
---|
181 | G4double U = std::max(0.0, _excitation - e); |
---|
182 | |
---|
183 | if(e < 0.0 || _excitation < 0.0) { return theProb; } |
---|
184 | |
---|
185 | G4ConstantLevelDensityParameter ldPar; |
---|
186 | G4double aLevelDensityParam = |
---|
187 | ldPar.LevelDensityParameter(_nucleusA,_nucleusZ,_excitation); |
---|
188 | |
---|
189 | //G4double levelDensBef = std::exp(2.0*std::sqrt(aLevelDensityParam*_excitation)); |
---|
190 | //G4double levelDensAft = std::exp(2.0*std::sqrt(aLevelDensityParam*(_excitation - e))); |
---|
191 | G4double coeff = std::exp(2.0*(std::sqrt(aLevelDensityParam*U) |
---|
192 | - std::sqrt(aLevelDensityParam*_excitation))); |
---|
193 | |
---|
194 | //if(_verbose > 20) |
---|
195 | // G4cout << _nucleusA << " LevelDensityParameter = " << aLevelDensityParam |
---|
196 | // << " Bef Aft " << levelDensBef << " " << levelDensAft << G4endl; |
---|
197 | |
---|
198 | // Now form the probability density |
---|
199 | |
---|
200 | // Define constants for the photoabsorption cross-section (the reverse |
---|
201 | // process of our de-excitation) |
---|
202 | |
---|
203 | // G4double sigma0 = 2.5 * _nucleusA * millibarn; |
---|
204 | G4double sigma0 = 2.5 * _nucleusA; |
---|
205 | |
---|
206 | G4double Egdp = (40.3 /G4Pow::GetInstance()->powZ(_nucleusA,0.2) )*MeV; |
---|
207 | G4double GammaR = 0.30 * Egdp; |
---|
208 | |
---|
209 | const G4double normC = 1.0 / (pi * hbarc)*(pi * hbarc); |
---|
210 | |
---|
211 | G4double numerator = sigma0 * e*e * GammaR*GammaR; |
---|
212 | G4double denominator = (e*e - Egdp*Egdp)* (e*e - Egdp*Egdp) + GammaR*GammaR*e*e; |
---|
213 | // if (denominator < 1.0e-9) denominator = 1.0e-9; |
---|
214 | |
---|
215 | G4double sigmaAbs = numerator/denominator ; |
---|
216 | |
---|
217 | if(_verbose > 20) { |
---|
218 | G4cout << ".. " << Egdp << " .. " << GammaR |
---|
219 | << " .. " << normC << " .. " << sigmaAbs |
---|
220 | << " .. " << e*e << " .. " << coeff |
---|
221 | << G4endl; |
---|
222 | } |
---|
223 | |
---|
224 | // theProb = normC * sigmaAbs * e*e * levelDensAft/levelDensBef; |
---|
225 | theProb = sigmaAbs * e*e * coeff; |
---|
226 | |
---|
227 | return theProb; |
---|
228 | } |
---|
229 | |
---|
230 | |
---|
231 | G4double G4ContinuumGammaTransition::GammaTime() |
---|
232 | { |
---|
233 | |
---|
234 | G4double GammaR = 0.30 * (40.3 /G4Pow::GetInstance()->powZ(_nucleusA,0.2) )*MeV; |
---|
235 | G4double tau = hbar_Planck/GammaR; |
---|
236 | G4double creationTime = -tau*std::log(G4UniformRand()); |
---|
237 | /* |
---|
238 | G4double tMin = 0; |
---|
239 | G4double tMax = 10.0 * tau; |
---|
240 | G4int nBins = 200; |
---|
241 | G4double sampleArray[200]; |
---|
242 | |
---|
243 | for(G4int i = 0; i<nBins;i++) |
---|
244 | { |
---|
245 | G4double t = tMin + ((tMax-tMin)/nBins)*i; |
---|
246 | sampleArray[i] = (std::exp(-t/tau))/tau; |
---|
247 | } |
---|
248 | |
---|
249 | G4RandGeneralTmp randGeneral(sampleArray, nBins); |
---|
250 | G4double random = randGeneral.shoot(); |
---|
251 | |
---|
252 | G4double creationTime = tMin + (tMax - tMin) * random; |
---|
253 | */ |
---|
254 | return creationTime; |
---|
255 | } |
---|
256 | |
---|
257 | |
---|
258 | |
---|
259 | |
---|
260 | |
---|
261 | |
---|
262 | |
---|
263 | |
---|
264 | |
---|
265 | |
---|
266 | |
---|
267 | |
---|