Changeset 1315 for trunk/source/processes/hadronic/models/de_excitation/photon_evaporation/src/G4DiscreteGammaDeexcitation.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/G4DiscreteGammaDeexcitation.cc
r962 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4DiscreteGammaDeexcitation.cc,v 1.15 2010/05/10 07:20:40 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 26 28 // 27 29 // ------------------------------------------------------------------- … … 65 67 _rdm(false), _levelManager(0) 66 68 { 67 _tolerance = 0.1 * MeV;69 _tolerance = CLHEP::keV; 68 70 } 69 71 70 71 G4DiscreteGammaDeexcitation::~G4DiscreteGammaDeexcitation() {} 72 72 G4DiscreteGammaDeexcitation::~G4DiscreteGammaDeexcitation() 73 {} 73 74 74 75 G4VGammaTransition* G4DiscreteGammaDeexcitation::CreateTransition() 75 76 { 76 G4Fragment nucleus = GetNucleus(); 77 G4int A = static_cast<G4int>(nucleus.GetA()); 78 G4int Z = static_cast<G4int>(nucleus.GetZ()); 79 77 G4Fragment* nucleus = GetNucleus(); 78 G4int A = static_cast<G4int>(nucleus->GetA()); 79 G4int Z = static_cast<G4int>(nucleus->GetZ()); 80 // _verbose =2; 81 // G4cout << "G4DiscreteGammaDeexcitation::CreateTransition: " << nucleus << G4endl; 80 82 if (_nucleusA != A || _nucleusZ != Z) 81 83 { … … 84 86 _levelManager = G4NuclearLevelStore::GetInstance()->GetManager(Z,A); 85 87 } 86 87 88 88 89 89 if (_levelManager->IsValid()) … … 96 96 } 97 97 98 G4double excitation = nucleus.GetExcitationEnergy(); 99 // const G4NuclearLevel* level =_levelManager.NearestLevel(excitation, _tolerance); 98 G4double excitation = nucleus->GetExcitationEnergy(); 100 99 const G4NuclearLevel* level =_levelManager->NearestLevel(excitation); 101 100 102 101 if (level != 0) 103 102 { 104 if (_verbose > 0) 103 if (_verbose > 0) { 105 104 G4cout 106 105 << "G4DiscreteGammaDeexcitation::CreateTransition - Created from level energy " 107 106 << level->Energy() << ", excitation is " 108 107 << excitation << G4endl; 109 G4DiscreteGammaTransition* dtransit = new G4DiscreteGammaTransition(*level,Z); 108 } 109 G4DiscreteGammaTransition* dtransit = new G4DiscreteGammaTransition(*level,Z,A); 110 110 dtransit->SetICM(_icm); 111 111 return dtransit; … … 113 113 else 114 114 { 115 if (_verbose > 0) 115 if (_verbose > 0) { 116 116 G4cout 117 117 << "G4DiscreteGammaDeexcitation::CreateTransition - No transition created from " 118 118 << excitation << " within tolerance " << _tolerance << G4endl; 119 119 } 120 120 return 0; 121 121 } 122 122 } 123 elsereturn 0;123 return 0; 124 124 } 125 125 126 126 127 G4bool G4DiscreteGammaDeexcitation::CanDoTransition() const127 G4bool G4DiscreteGammaDeexcitation::CanDoTransition() 128 128 { 129 129 … … 138 138 << G4endl; 139 139 } 140 G4Fragment nucleus = GetNucleus();141 140 if (canDo) { 142 G4double A = nucleus.GetA(); 143 G4double Z = nucleus.GetZ(); 144 if (Z<2 || A<3 || Z>98) 141 if (_nucleusZ<2 || _nucleusA<3 || _nucleusZ>98) 145 142 { 146 143 canDo = false; … … 152 149 } 153 150 154 G4double excitation = nucleus.GetExcitationEnergy(); 151 G4Fragment* nucleus = GetNucleus(); 152 G4double excitation = nucleus->GetExcitationEnergy(); 153 //G4cout << "G4DiscreteGammaDeexcitation::CanDoTransition: " << nucleus << G4endl; 155 154 156 155 if (canDo) { 157 if (excitation <= 0.) {156 if (excitation <= _tolerance) { 158 157 canDo = false; 159 if (_verbose > 0) 158 if (_verbose > 0) { 160 159 G4cout 161 160 << "G4DiscreteGammaDeexcitation::CanDoTransition - Excitation <= 0" 161 << excitation << " " << excitation - _tolerance 162 162 << G4endl; 163 } 163 164 } else { 164 165 if (excitation > _levelManager->MaxLevelEnergy() + _tolerance) canDo = false; 165 if (excitation < _levelManager->MinLevelEnergy() - _tolerance) canDo = false;166 //if (excitation < _levelManager->MinLevelEnergy() - _tolerance) canDo = false; 166 167 // The following is a protection to avoid looping in case of elements with very low 167 168 // ensdf levels 168 if (excitation < _levelManager->MinLevelEnergy() * 0.9) canDo = false;169 //if (excitation < _levelManager->MinLevelEnergy() * 0.9) canDo = false; 169 170 170 171 if (_verbose > 0) {
Note: See TracChangeset
for help on using the changeset viewer.