Changeset 1315 for trunk/source/processes/hadronic/models/de_excitation/photon_evaporation/src/G4DiscreteGammaTransition.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/G4DiscreteGammaTransition.cc
r819 r1315 37 37 // 38 38 // Modifications: 39 // 15 April 1999, Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it) 40 // Added creation time evaluation for products of evaporation 41 // 42 // 21 Nov. 2001, Fan Lei (flei@space.qinetiq.com) 43 // i) added G4int _nucleusZ initialise it through the constructor 44 // ii) modified SelectGamma() to allow the generation of conversion electrons 45 // iii) added #include G4AtomicShells.hh 46 // 39 47 // 09 Sep. 2002, Fan Lei (flei@space.qinetiq.com) 40 48 // Added renormalization to determine whether transition leads to 41 49 // electron or gamma in SelectGamma() 42 50 // 43 // 21 Nov. 2001, Fan Lei (flei@space.qinetiq.com)44 // i) added G4int _nucleusZ initialise it through the constructor45 // ii) modified SelectGamma() to allow the generation of conversion electrons46 // iii) added #include G4AtomicShells.hh47 // 48 // 15 April 1999, Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)49 // Added creation time evaluation for products of evaporation51 // 19 April 2010, J. M. Quesada. 52 // Corrections added for taking into account mismatch between tabulated 53 // gamma energies and level energy differences (fake photons eliminated) 54 // 55 // 9 May 2010, V.Ivanchenko 56 // Removed unphysical corretions of gamma energy; fixed default particle 57 // as gamma; do not subtract bounding energy in case of electron emmision 50 58 // 51 59 // ------------------------------------------------------------------- … … 55 63 #include "G4RandGeneralTmp.hh" 56 64 #include "G4AtomicShells.hh" 65 //JMQ: 66 #include "G4NuclearLevelStore.hh" 67 #include "G4Pow.hh" 57 68 58 69 G4DiscreteGammaTransition::G4DiscreteGammaTransition(const G4NuclearLevel& level): … … 60 71 { } 61 72 62 G4DiscreteGammaTransition::G4DiscreteGammaTransition(const G4NuclearLevel& level, G4int Z): 73 //JMQ: now A is also needed in the constructor 74 //G4DiscreteGammaTransition::G4DiscreteGammaTransition(const G4NuclearLevel& level, G4int Z): 75 G4DiscreteGammaTransition::G4DiscreteGammaTransition(const G4NuclearLevel& level, G4int Z, G4int A): 63 76 _nucleusZ(Z), _orbitE(-1), _bondE(0.), _aGamma(true), _icm(false), _gammaEnergy(0.), 64 _level(level), _excitation(0.), _gammaCreationTime(0.) 77 _level(level), _excitation(0.), _gammaCreationTime(0.),_A(A),_Z(Z) 65 78 { 66 79 _verbose = 0; 80 //JMQ: added tolerence in the mismatch 81 _tolerance = CLHEP::keV; 67 82 } 68 83 … … 74 89 void G4DiscreteGammaTransition::SelectGamma() 75 90 { 76 91 // default gamma 92 _aGamma = true; 77 93 _gammaEnergy = 0.; 78 94 79 95 G4int nGammas = _level.NumberOfGammas(); 80 96 if (nGammas > 0) 81 97 { 82 98 G4double random = G4UniformRand(); 83 84 G4int iGamma = 0;85 for(iGamma=0; iGamma < nGammas;iGamma++)99 100 G4int iGamma; 101 for(iGamma=0; iGamma<nGammas; ++iGamma) 86 102 { 87 103 if(random <= (_level.GammaCumulativeProbabilities())[iGamma]) 88 break;104 { break; } 89 105 } 90 91 106 92 107 // Small correction due to the fact that there are mismatches between 93 108 // nominal level energies and emitted gamma energies 94 95 G4double eCorrection = _level.Energy() - _excitation;96 109 110 // 09.05.2010 VI : it is an error ? 111 G4double eCorrection = _level.Energy() - _excitation; 97 112 _gammaEnergy = (_level.GammaEnergies())[iGamma] - eCorrection; 98 113 114 //JMQ: 115 //1)If chosen gamma energy is close enough to excitation energy, the later 116 // is used instead for gamma dacey to gs (it guarantees energy conservation) 117 //2)For energy conservation, level energy differences instead of tabulated 118 // gamma energies must be used (origin of final fake photons) 119 120 if(_excitation - _gammaEnergy < _tolerance) 121 { 122 _gammaEnergy =_excitation; 123 } 124 else 125 { 126 _levelManager = G4NuclearLevelStore::GetInstance()->GetManager(_Z,_A); 127 _gammaEnergy = _excitation - 128 _levelManager->NearestLevel(_excitation - _gammaEnergy)->Energy(); 129 } 130 99 131 // Warning: the following check is needed to avoid loops: 100 132 // Due essentially to missing nuclear levels in data files, it is … … 106 138 // but this change needs a more complex revision of actual design. 107 139 // I leave this for a later revision. 108 109 if (_gammaEnergy < _level.Energy()*10e-5) _gammaEnergy = _excitation; 140 141 if (_gammaEnergy < _level.Energy()*10.e-5) _gammaEnergy = _excitation; 142 143 //G4cout << "G4DiscreteGammaTransition::SelectGamma: " << _gammaEnergy 144 // << " _icm: " << _icm << G4endl; 145 110 146 // now decide whether Internal Coversion electron should be emitted instead 111 147 if (_icm) { … … 144 180 } 145 181 } 146 if (_verbose > 0) 182 _bondE = G4AtomicShells::GetBindingEnergy(_nucleusZ, iShell); 183 if (_verbose > 0) { 147 184 G4cout << "G4DiscreteGammaTransition: _nucleusZ = " <<_nucleusZ 148 185 << " , iShell = " << iShell 149 << " , Shell binding energy = " << G4AtomicShells::GetBindingEnergy(_nucleusZ, iShell) /keV186 << " , Shell binding energy = " << _bondE/keV 150 187 << " keV " << G4endl; 151 _bondE = G4AtomicShells::GetBindingEnergy(_nucleusZ, iShell); 152 _gammaEnergy = _gammaEnergy - _bondE; 188 } 189 190 // 09.05.2010 VI : it is an error - cannot subtract bond energy from 191 // transition energy here 192 //_gammaEnergy = _gammaEnergy - _bondE; 193 //G4cout << "_gammaEnergy = " << _gammaEnergy << G4endl; 194 153 195 _orbitE = iShell; 154 196 _aGamma = false ; // emitted is not a gamma now 155 197 } 156 198 } 157 158 G4double tau = _level.HalfLife() / std::log(2.0); 159 160 G4double tMin = 0; 161 G4double tMax = 10.0 * tau; 199 200 G4double tau = _level.HalfLife() / G4Pow::GetInstance()->logZ(2); 201 202 //09.05.2010 VI rewrite samling of decay time 203 // assuming ordinary exponential low 204 _gammaCreationTime = 0.; 205 if(tau > 0.0) { _gammaCreationTime = -tau*log(G4UniformRand()); } 206 207 //G4double tMin = 0; 208 //G4double tMax = 10.0 * tau; 162 209 // Original code, not very efficent 163 210 // G4int nBins = 200; … … 172 219 // G4RandGeneralTmp randGeneral(sampleArray, nBins); 173 220 //G4double random = randGeneral.shoot(); 174 221 175 222 //_gammaCreationTime = tMin + (tMax - tMin) * random; 176 223 177 224 // new code by Fan Lei 178 225 // 226 /* 179 227 if (tau != 0 ) 180 228 { … … 186 234 // << _gammaCreationTime/second << G4endl; 187 235 } else { _gammaCreationTime=0.; } 236 */ 188 237 } 189 238 return; 190 239 } 191 240 192 193 //G4bool G4DiscreteGammaTransition::IsAGamma()194 //{195 // return _aGamma;196 //}197 198 199 241 G4double G4DiscreteGammaTransition::GetGammaEnergy() 200 242 { … … 210 252 { 211 253 _excitation = energy; 212 return; 213 } 214 215 216 217 218 219 254 } 255 256 257 258 259 260
Note: See TracChangeset
for help on using the changeset viewer.