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