Changeset 1315 for trunk/source/processes/hadronic/models/de_excitation/photon_evaporation/src/G4ContinuumGammaDeexcitation.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/G4ContinuumGammaDeexcitation.cc
r819 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4ContinuumGammaDeexcitation.cc,v 1.7 2010/04/30 16:08:03 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 26 28 // 27 29 // ------------------------------------------------------------------- … … 40 42 // 41 43 // 02 May 2003, Vladimir Ivanchenko change interface to G4NuclearlevelManager 44 // 45 // 19 April 2010 J. M. Quesada: smaller value of tolerance parameter 42 46 // 43 47 // ------------------------------------------------------------------- … … 61 65 // 62 66 63 G4ContinuumGammaDeexcitation::G4ContinuumGammaDeexcitation(): _nucleusZ(0), _nucleusA(0), _levelManager(0) 67 G4ContinuumGammaDeexcitation::G4ContinuumGammaDeexcitation() 68 : _nucleusZ(0), _nucleusA(0), _levelManager(0) 64 69 { } 65 70 … … 71 76 G4VGammaTransition* G4ContinuumGammaDeexcitation::CreateTransition() 72 77 { 73 G4Fragment nucleus = GetNucleus();74 G4int Z = static_cast<G4int>(nucleus .GetZ());75 G4int A = static_cast<G4int>(nucleus .GetA());76 G4double excitation = nucleus .GetExcitationEnergy();78 G4Fragment* nucleus = GetNucleus(); 79 G4int Z = static_cast<G4int>(nucleus->GetZ()); 80 G4int A = static_cast<G4int>(nucleus->GetA()); 81 G4double excitation = nucleus->GetExcitationEnergy(); 77 82 78 83 if (_nucleusA != A || _nucleusZ != Z) … … 83 88 } 84 89 85 if (_verbose > 1) 90 if (_verbose > 1) { 86 91 G4cout << "G4ContinuumGammaDeexcitation::CreateTransition - Created" << G4endl; 87 92 } 88 93 G4VGammaTransition* gt = new G4ContinuumGammaTransition(_levelManager,Z,A,excitation,_verbose ); 89 94 … … 92 97 93 98 94 G4bool G4ContinuumGammaDeexcitation::CanDoTransition() const99 G4bool G4ContinuumGammaDeexcitation::CanDoTransition() 95 100 { 96 G4bool canDo = true; 101 //JMQ: far too small, creating sometimes continuum gammas instead of the right discrete ones 102 // (when excitation energy is slightly over maximum discrete energy): changed 103 // G4double tolerance = 10*eV; 104 const G4double tolerance = CLHEP::keV; 97 105 98 106 if (_transition == 0) 99 107 { 100 canDo = false; 101 102 if (_verbose > 0) 103 G4cout 104 << "G4ContinuumGammaDeexcitation::CanDoTransition - Null transition " 105 << G4endl; 108 if (_verbose > 0) { 109 G4cout << "G4ContinuumGammaDeexcitation::CanDoTransition - Null transition " 110 << G4endl; 111 } 112 return false; 106 113 } 107 114 108 G4Fragment nucleus = GetNucleus();109 G4double excitation = nucleus .GetExcitationEnergy();115 G4Fragment* nucleus = GetNucleus(); 116 G4double excitation = nucleus->GetExcitationEnergy(); 110 117 111 G4double A = nucleus.GetA();112 G4double Z = nucleus.GetZ();113 if ( A <2 ||Z<3)118 // G4int A = (G4int)nucleus->GetA(); 119 // G4int Z = (G4int)nucleus->GetZ(); 120 if (_nucleusA<2 || _nucleusZ<3) 114 121 { 115 canDo = false;116 if (_verbose > 0) 117 G4cout118 << "G4ContinuumGammaDeexcitation::CanDoTransition - n/p/H" 119 << G4endl;122 if (_verbose > 1) { 123 G4cout << "G4ContinuumGammaDeexcitation::CanDoTransition - n/p/H" 124 << G4endl; 125 } 126 return false; 120 127 } 121 128 122 123 124 if (excitation <= 0.) 129 if (excitation <= tolerance) 125 130 { 126 canDo = false; 127 if (_verbose > 0) 128 G4cout 129 << "G4ContinuumGammaDeexcitation::CanDoTransition - Excitation <= 0" 130 << G4endl; 131 if (_verbose > 1) { 132 G4cout << "G4ContinuumGammaDeexcitation::CanDoTransition - Excitation " 133 << excitation/CLHEP::keV << " keV is too small" 134 << G4endl; 135 } 136 return false; 131 137 } 132 G4double tolerance = 10*eV;133 if (excitation <= (_levelManager->MaxLevelEnergy()+ tolerance))134 {135 canDo = false;136 if (_verbose > 0) 137 G4cout << "G4ContinuumGammaDeexcitation::CanDoTransition - Excitation " 138 << excitation << " below max discrete level " 139 << _levelManager->MaxLevelEnergy() << G4endl;138 if (excitation <= (_levelManager->MaxLevelEnergy() + tolerance)) 139 { 140 if (_verbose > 0) { 141 G4cout << "G4ContinuumGammaDeexcitation::CanDoTransition - Excitation " 142 << excitation << " below max discrete level " 143 << _levelManager->MaxLevelEnergy() << G4endl; 144 } 145 return false; 140 146 } 141 147 142 if ( canDo)143 { if (_verbose > 1)144 G4cout <<"G4ContinuumGammaDeexcitation::CanDoTransition - CanDo"145 << G4endl;146 } 147 148 return canDo;149 148 if (_verbose > 1) { 149 G4cout <<"G4ContinuumGammaDeexcitation::CanDoTransition - CanDo" 150 << " Eex(keV)= " << excitation/CLHEP::keV 151 << " Emax(keV)= " << _levelManager->MaxLevelEnergy()/CLHEP::keV 152 << " Z= " << _nucleusZ << " A= " << _nucleusA 153 << G4endl; 154 } 155 return true; 150 156 } 151 157
Note: See TracChangeset
for help on using the changeset viewer.