Ignore:
Timestamp:
Jun 18, 2010, 11:42:07 AM (14 years ago)
Author:
garnier
Message:

update geant4-09-04-beta-cand-01 interfaces-V09-03-09 vis-V09-03-08

File:
1 edited

Legend:

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

    r819 r1315  
    2525//
    2626//
    27 //  Class G4E1Probability.cc
     27// $Id: G4E1Probability.cc,v 1.9 2010/05/25 10:47:24 vnivanch Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
     29//
     30//---------------------------------------------------------------------
     31//
     32// Geant4 class G4E1Probability
     33//
     34// by V. Lara (May 2003)
     35//
     36// Modifications:
     37// 18.05.2010 V.Ivanchenko trying to speedup the most slow method
     38//            by usage of G4Pow, integer A and introduction of const members
     39//
    2840//
    2941
    3042#include "G4E1Probability.hh"
    31 #include "G4ConstantLevelDensityParameter.hh"
     43//#include "G4ConstantLevelDensityParameter.hh"
    3244#include "Randomize.hh"
     45#include "G4Pow.hh"
    3346
    3447// Constructors and operators
    3548//
    3649
    37 G4E1Probability::G4E1Probability(const G4E1Probability& ) : G4VEmissionProbability()
    38 {
    39 
    40   throw G4HadronicException(__FILE__, __LINE__, "G4E1Probability::copy_constructor meant to not be accessible");
    41 
    42 }
    43 
    44 const G4E1Probability& G4E1Probability::
    45 operator=(const G4E1Probability& )
    46 {
    47 
    48   throw G4HadronicException(__FILE__, __LINE__, "G4E1Probability::operator= meant to not be accessible");
    49   return *this;
    50 }
    51 
    52 G4bool G4E1Probability::operator==(const G4E1Probability& ) const
    53 {
    54 
    55   return false;
    56 
    57 }
    58 
    59 G4bool G4E1Probability::operator!=(const G4E1Probability& ) const
    60 {
    61 
    62   return true;
    63 
    64 }
     50G4E1Probability::G4E1Probability():G4VEmissionProbability()
     51{
     52  G4double x = CLHEP::pi*CLHEP::hbarc;
     53  normC = 1.0 / (x*x);
     54  theLevelDensityParameter = 0.125/MeV;
     55  fG4pow = G4Pow::GetInstance();
     56}
     57
     58G4E1Probability::~G4E1Probability()
     59{}
    6560
    6661// Calculate the emission probability
     
    6863
    6964G4double G4E1Probability::EmissionProbDensity(const G4Fragment& frag,
    70                                                  const G4double gammaE)
     65                                              const G4double gammaE)
    7166{
    7267
     
    7671  // the probability density for photon evaporation from U to U - gammaE
    7772  // (U = nucleus excitation energy, gammaE = total evaporated photon
    78   // energy).
    79   // fragment = nuclear fragment BEFORE de-excitation
     73  // energy). Fragment = nuclear fragment BEFORE de-excitation
    8074
    8175  G4double theProb = 0.0;
    8276
    83   const G4double Afrag = frag.GetA();
    84   const G4double Zfrag = frag.GetZ();
    85   const G4double Uexcite = frag.GetExcitationEnergy();
    86 
    87   if( (Uexcite-gammaE) < 0.0 || gammaE < 0 || Uexcite <= 0) return theProb;
     77  G4int Afrag = frag.GetA_asInt();
     78  G4double Uexcite = frag.GetExcitationEnergy();
     79
     80  if( (Uexcite-gammaE) < 0.0 || gammaE < 0) { return theProb; }
    8881
    8982  // Need a level density parameter.
     
    9184  // nuclei).
    9285
    93   static G4ConstantLevelDensityParameter a;
    94 
    95   G4double aLevelDensityParam = a.LevelDensityParameter(static_cast<G4int>(Afrag),
    96                                                         static_cast<G4int>(Zfrag),
    97                                                         Uexcite);
    98 
    99   G4double levelDensBef = std::exp(2.0*std::sqrt(aLevelDensityParam*Uexcite));
    100   G4double levelDensAft = std::exp(2.0*std::sqrt(aLevelDensityParam*(Uexcite-gammaE)));
    101 
     86  G4double aLevelDensityParam = Afrag*theLevelDensityParameter;
     87
     88  //  G4double levelDensBef = std::exp(2*std::sqrt(aLevelDensityParam*Uexcite));
     89  //  G4double levelDensAft = std::exp(2*std::sqrt(aLevelDensityParam*(Uexcite-gammaE)));
     90  // VI reduce number of calls to exp
     91  G4double levelDens = 1.0;
     92  if( aLevelDensityParam > 0.0 ) {
     93    levelDens = std::exp(2*(std::sqrt(aLevelDensityParam*(Uexcite-gammaE))
     94      - std::sqrt(aLevelDensityParam*Uexcite)));
     95  }
    10296  // Now form the probability density
    10397
     
    107101  G4double sigma0 = 2.5 * Afrag * millibarn;  // millibarns
    108102
    109   G4double Egdp = (40.3 / std::pow(Afrag,0.2) )*MeV;
     103  G4double Egdp   = (40.3 / fG4pow->powZ(Afrag,0.2) )*MeV;
    110104  G4double GammaR = 0.30 * Egdp;
    111105 
    112   static G4double normC = 1.0 / ((pi * hbarc)*(pi * hbarc));
    113 
    114106  // CD
    115107  //cout<<"  PROB TESTS "<<G4endl;
     
    124116  //cout<<" normC = "<<normC<<G4endl;
    125117
    126   G4double numerator = sigma0 * gammaE*gammaE * GammaR*GammaR;
    127   G4double denominator = (gammaE*gammaE - Egdp*Egdp)*
    128            (gammaE*gammaE - Egdp*Egdp) + GammaR*GammaR*gammaE*gammaE;
    129 
    130   G4double sigmaAbs = numerator/denominator;
    131 
    132   theProb = normC * sigmaAbs * gammaE*gammaE *
    133             levelDensAft/levelDensBef;
     118  // VI implementation 18.05.2010
     119  G4double gammaE2 = gammaE*gammaE;
     120  G4double gammaR2 = gammaE2*GammaR*GammaR;
     121  G4double egdp2   = gammaE2 - Egdp*Egdp;
     122  G4double sigmaAbs = sigma0*gammaR2/(egdp2*egdp2 + gammaR2);
     123  theProb = normC * sigmaAbs * gammaE2 * levelDens;
     124
     125  // old implementation
     126  //  G4double numerator = sigma0 * gammaE*gammaE * GammaR*GammaR;
     127  // G4double denominator = (gammaE*gammaE - Egdp*Egdp)*
     128  //         (gammaE*gammaE - Egdp*Egdp) + GammaR*GammaR*gammaE*gammaE;
     129
     130  //G4double sigmaAbs = numerator/denominator;
     131  //theProb = normC * sigmaAbs * gammaE2 * levelDensAft/levelDensBef;
    134132
    135133  // CD
     
    211209}
    212210
    213 G4E1Probability::~G4E1Probability() {}
    214 
    215 
     211
Note: See TracChangeset for help on using the changeset viewer.