source: trunk/source/processes/hadronic/models/de_excitation/photon_evaporation/src/G4ContinuumGammaTransition.cc @ 1340

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

update ti head

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