Changeset 1347 for trunk/source/processes/hadronic/models/de_excitation/photon_evaporation/src/G4ContinuumGammaTransition.cc
- Timestamp:
- Dec 22, 2010, 3:52:27 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/hadronic/models/de_excitation/photon_evaporation/src/G4ContinuumGammaTransition.cc
r1340 r1347 24 24 // ******************************************************************** 25 25 // 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 // 27 29 // ------------------------------------------------------------------- 28 30 // GEANT 4 class file … … 41 43 // 15 April 1999, Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it) 42 44 // 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 // ---------------------------------------------------------------------------- 46 50 // 47 51 // Class G4ContinuumGammaTransition.cc … … 52 56 #include "G4ConstantLevelDensityParameter.hh" 53 57 #include "G4RandGeneralTmp.hh" 58 #include "Randomize.hh" 59 #include "G4Pow.hh" 60 54 61 // 55 62 // Constructor … … 83 90 _eMin = 0.001 * MeV; 84 91 // 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; 86 93 // Giant Dipole Resonance width 87 94 G4double widthGDR = 0.30 * energyGDR; … … 97 104 // 98 105 99 G4ContinuumGammaTransition::~G4ContinuumGammaTransition() {} 100 101 // 102 // Override GammaEnergy function from G4VGammaTransition 103 // 106 G4ContinuumGammaTransition::~G4ContinuumGammaTransition() 107 {} 104 108 105 109 void G4ContinuumGammaTransition::SelectGamma() … … 127 131 G4double finalExcitation = _excitation - _eGamma; 128 132 129 if(_verbose > 10) 133 if(_verbose > 10) { 130 134 G4cout << "*---*---* G4ContinuumTransition: eGamma = " << _eGamma 131 135 << " finalExcitation = " << finalExcitation 132 136 << " random = " << random << G4endl; 133 134 // if (finalExcitation < 0)137 } 138 // if (finalExcitation < 0) 135 139 if(finalExcitation < _minLevelE/2.) 136 140 { … … 148 152 _gammaCreationTime = GammaTime(); 149 153 150 if(_verbose > 10) 154 if(_verbose > 10) { 151 155 G4cout << "*---*---* G4ContinuumTransition: _gammaCreationTime = " 152 156 << _gammaCreationTime/second << G4endl; 153 157 } 154 158 return; 155 159 } … … 166 170 167 171 168 void G4ContinuumGammaTransition::SetEnergyFrom(const G4double energy) 169 { 170 172 void G4ContinuumGammaTransition::SetEnergyFrom(G4double energy) 173 { 171 174 if (energy > 0.) _excitation = energy; 172 return;173 174 175 } 175 176 … … 178 179 { 179 180 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; } 182 184 183 185 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; 192 197 193 198 // Now form the probability density … … 199 204 G4double sigma0 = 2.5 * _nucleusA; 200 205 201 G4double Egdp = (40.3 / std::pow(G4double(_nucleusA),0.2) )*MeV;206 G4double Egdp = (40.3 /G4Pow::GetInstance()->powZ(_nucleusA,0.2) )*MeV; 202 207 G4double GammaR = 0.30 * Egdp; 203 208 204 G4double normC = 1.0 / (pi * hbarc)*(pi * hbarc);209 const G4double normC = 1.0 / (pi * hbarc)*(pi * hbarc); 205 210 206 211 G4double numerator = sigma0 * e*e * GammaR*GammaR; … … 210 215 G4double sigmaAbs = numerator/denominator ; 211 216 212 if(_verbose > 20) 217 if(_verbose > 20) { 213 218 G4cout << ".. " << Egdp << " .. " << GammaR 214 219 << " .. " << normC << " .. " << sigmaAbs 215 << " .. " << e*e << " .. " << levelDensAft/levelDensBef220 << " .. " << e*e << " .. " << coeff 216 221 << G4endl; 222 } 217 223 218 224 // theProb = normC * sigmaAbs * e*e * levelDensAft/levelDensBef; 219 theProb = sigmaAbs * e*e * levelDensAft/levelDensBef;225 theProb = sigmaAbs * e*e * coeff; 220 226 221 227 return theProb; … … 226 232 { 227 233 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; 229 235 G4double tau = hbar_Planck/GammaR; 230 236 G4double creationTime = -tau*std::log(G4UniformRand()); 237 /* 231 238 G4double tMin = 0; 232 239 G4double tMax = 10.0 * tau; … … 234 241 G4double sampleArray[200]; 235 242 236 for(G4int i = 0; i<nBins;i++)243 for(G4int i = 0; i<nBins;i++) 237 244 { 238 245 G4double t = tMin + ((tMax-tMin)/nBins)*i; … … 244 251 245 252 G4double creationTime = tMin + (tMax - tMin) * random; 246 253 */ 247 254 return creationTime; 248 255 }
Note: See TracChangeset
for help on using the changeset viewer.