Changeset 1315 for trunk/source/processes/hadronic/models/de_excitation/photon_evaporation/src/G4E1Probability.cc
- Timestamp:
- Jun 18, 2010, 11:42:07 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/hadronic/models/de_excitation/photon_evaporation/src/G4E1Probability.cc
r819 r1315 25 25 // 26 26 // 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 // 28 40 // 29 41 30 42 #include "G4E1Probability.hh" 31 #include "G4ConstantLevelDensityParameter.hh"43 //#include "G4ConstantLevelDensityParameter.hh" 32 44 #include "Randomize.hh" 45 #include "G4Pow.hh" 33 46 34 47 // Constructors and operators 35 48 // 36 49 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 } 50 G4E1Probability::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 58 G4E1Probability::~G4E1Probability() 59 {} 65 60 66 61 // Calculate the emission probability … … 68 63 69 64 G4double G4E1Probability::EmissionProbDensity(const G4Fragment& frag, 70 65 const G4double gammaE) 71 66 { 72 67 … … 76 71 // the probability density for photon evaporation from U to U - gammaE 77 72 // (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 80 74 81 75 G4double theProb = 0.0; 82 76 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; } 88 81 89 82 // Need a level density parameter. … … 91 84 // nuclei). 92 85 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 } 102 96 // Now form the probability density 103 97 … … 107 101 G4double sigma0 = 2.5 * Afrag * millibarn; // millibarns 108 102 109 G4double Egdp = (40.3 / std::pow(Afrag,0.2) )*MeV;103 G4double Egdp = (40.3 / fG4pow->powZ(Afrag,0.2) )*MeV; 110 104 G4double GammaR = 0.30 * Egdp; 111 105 112 static G4double normC = 1.0 / ((pi * hbarc)*(pi * hbarc));113 114 106 // CD 115 107 //cout<<" PROB TESTS "<<G4endl; … … 124 116 //cout<<" normC = "<<normC<<G4endl; 125 117 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; 134 132 135 133 // CD … … 211 209 } 212 210 213 G4E1Probability::~G4E1Probability() {} 214 215 211
Note: See TracChangeset
for help on using the changeset viewer.