Ignore:
Timestamp:
Dec 22, 2010, 3:52:27 PM (13 years ago)
Author:
garnier
Message:

geant4 tag 9.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/hadronic/models/de_excitation/photon_evaporation/src/G4ContinuumGammaTransition.cc

    r1340 r1347  
    2424// ********************************************************************
    2525//
    26 // $Id: G4ContinuumGammaTransition.cc,v 1.4 2010/10/07 07:50:13 mkelsey Exp $
     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//
    2729// -------------------------------------------------------------------
    2830//      GEANT 4 class file
     
    4143//        15 April 1999, Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
    4244//              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 // -------------------------------------------------------------------
     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// ----------------------------------------------------------------------------
    4650//
    4751//  Class G4ContinuumGammaTransition.cc
     
    5256#include "G4ConstantLevelDensityParameter.hh"
    5357#include "G4RandGeneralTmp.hh"
     58#include "Randomize.hh"
     59#include "G4Pow.hh"
     60
    5461//
    5562// Constructor
     
    8390  _eMin = 0.001 * MeV;
    8491  // Giant Dipole Resonance energy
    85   G4double energyGDR = (40.3 / std::pow(G4double(_nucleusA),0.2) ) * MeV;
     92  G4double energyGDR = (40.3 / G4Pow::GetInstance()->powZ(_nucleusA,0.2) ) * MeV;
    8693  // Giant Dipole Resonance width
    8794  G4double widthGDR = 0.30 * energyGDR;
     
    97104//
    98105
    99 G4ContinuumGammaTransition::~G4ContinuumGammaTransition() {}
    100 
    101 //
    102 // Override GammaEnergy function from G4VGammaTransition
    103 //
     106G4ContinuumGammaTransition::~G4ContinuumGammaTransition()
     107{}
    104108
    105109void G4ContinuumGammaTransition::SelectGamma()
     
    127131  G4double finalExcitation = _excitation - _eGamma;
    128132 
    129   if(_verbose > 10)
     133  if(_verbose > 10) {
    130134    G4cout << "*---*---* G4ContinuumTransition: eGamma = " << _eGamma
    131135           << "   finalExcitation = " << finalExcitation
    132136           << " random = " << random << G4endl;
    133 
    134 //  if (finalExcitation < 0)
     137  }
     138  //  if (finalExcitation < 0)
    135139  if(finalExcitation < _minLevelE/2.)
    136140    {
     
    148152  _gammaCreationTime = GammaTime();
    149153
    150   if(_verbose > 10)
     154  if(_verbose > 10) {
    151155    G4cout << "*---*---* G4ContinuumTransition: _gammaCreationTime = "
    152156           << _gammaCreationTime/second << G4endl;
    153 
     157  }
    154158  return; 
    155159}
     
    166170
    167171
    168 void G4ContinuumGammaTransition::SetEnergyFrom(const G4double energy)
    169 {
    170 
     172void G4ContinuumGammaTransition::SetEnergyFrom(G4double energy)
     173{
    171174  if (energy > 0.) _excitation = energy;
    172   return; 
    173 
    174175}
    175176
     
    178179{
    179180  G4double theProb = 0.0;
    180 
    181   if( (_excitation - e) < 0.0 || e < 0 || _excitation < 0) return theProb;
     181  G4double U = std::max(0.0, _excitation - e);
     182
     183  if(e < 0.0 || _excitation < 0.0) { return theProb; }
    182184
    183185  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;
     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;
    192197 
    193198  // Now form the probability density
     
    199204  G4double sigma0 = 2.5 * _nucleusA; 
    200205
    201   G4double Egdp = (40.3 / std::pow(G4double(_nucleusA),0.2) )*MeV;
     206  G4double Egdp = (40.3 /G4Pow::GetInstance()->powZ(_nucleusA,0.2) )*MeV;
    202207  G4double GammaR = 0.30 * Egdp;
    203208 
    204   G4double normC = 1.0 / (pi * hbarc)*(pi * hbarc);
     209  const G4double normC = 1.0 / (pi * hbarc)*(pi * hbarc);
    205210
    206211  G4double numerator = sigma0 * e*e * GammaR*GammaR;
     
    210215  G4double sigmaAbs = numerator/denominator ;
    211216
    212   if(_verbose > 20)
     217  if(_verbose > 20) {
    213218    G4cout << ".. " << Egdp << " .. " << GammaR
    214219           << " .. " << normC << " .. " << sigmaAbs 
    215            << " .. " << e*e << " .. " << levelDensAft/levelDensBef
     220           << " .. " << e*e << " .. " << coeff
    216221           << G4endl;
     222  }
    217223
    218224  //  theProb = normC * sigmaAbs * e*e * levelDensAft/levelDensBef;
    219   theProb =  sigmaAbs * e*e * levelDensAft/levelDensBef;
     225  theProb =  sigmaAbs * e*e * coeff;
    220226
    221227  return theProb;
     
    226232{
    227233
    228   G4double GammaR = 0.30 * (40.3 / std::pow(G4double(_nucleusA),0.2) )*MeV;
     234  G4double GammaR = 0.30 * (40.3 /G4Pow::GetInstance()->powZ(_nucleusA,0.2) )*MeV;
    229235  G4double tau = hbar_Planck/GammaR;
    230 
     236  G4double creationTime = -tau*std::log(G4UniformRand());
     237  /*
    231238  G4double tMin = 0;
    232239  G4double tMax = 10.0 * tau;
     
    234241  G4double sampleArray[200];
    235242
    236   for(G4int i = 0;i<nBins;i++)
     243  for(G4int i = 0; i<nBins;i++)
    237244  {
    238245    G4double t = tMin + ((tMax-tMin)/nBins)*i;
     
    244251 
    245252  G4double creationTime = tMin + (tMax - tMin) * random;
    246 
     253  */
    247254  return creationTime;
    248255}
Note: See TracChangeset for help on using the changeset viewer.