#include <G4DiscreteGammaDeexcitation.hh>
Inheritance diagram for G4DiscreteGammaDeexcitation:
Public Member Functions | |
G4DiscreteGammaDeexcitation () | |
virtual | ~G4DiscreteGammaDeexcitation () |
virtual G4VGammaTransition * | CreateTransition () |
virtual G4bool | CanDoTransition () |
void | SetICM (G4bool hl) |
void | SetRDM (G4bool hl) |
void | SetHL (G4double hl) |
Definition at line 68 of file G4DiscreteGammaDeexcitation.hh.
G4DiscreteGammaDeexcitation::G4DiscreteGammaDeexcitation | ( | ) |
Definition at line 67 of file G4DiscreteGammaDeexcitation.cc.
00067 : 00068 _nucleusZ(0), _nucleusA(0), _max_hl(1e-6*second), _icm(false), 00069 _rdm(false), _levelManager(0) 00070 { 00071 _tolerance = CLHEP::keV; 00072 }
G4DiscreteGammaDeexcitation::~G4DiscreteGammaDeexcitation | ( | ) | [virtual] |
G4bool G4DiscreteGammaDeexcitation::CanDoTransition | ( | ) | [virtual] |
Implements G4VGammaDeexcitation.
Definition at line 129 of file G4DiscreteGammaDeexcitation.cc.
References G4VGammaDeexcitation::_transition, G4VGammaDeexcitation::_verbose, G4cout, G4endl, G4Fragment::GetExcitationEnergy(), G4VGammaDeexcitation::GetNucleus(), G4NuclearLevel::HalfLife(), G4NuclearLevelManager::MaxLevelEnergy(), G4NuclearLevelManager::MinLevelEnergy(), and G4NuclearLevelManager::NearestLevel().
00130 { 00131 00132 G4bool canDo = true; 00133 00134 if (_transition == 0) { 00135 canDo = false; 00136 00137 if (_verbose > 0) 00138 G4cout 00139 << "G4DiscreteGammaDeexcitation::CanDoTransition - Null transition " 00140 << G4endl; 00141 } 00142 if (canDo) { 00143 //remove the _nucleusZ>98 limit L. Desorgher Sept. 2011 00144 //if (_nucleusZ<2 || _nucleusA<3 || _nucleusZ>98) 00145 if (_nucleusZ<2 || _nucleusA<3 ) 00146 { 00147 canDo = false; 00148 if (_verbose > 0) 00149 G4cout 00150 << "G4DiscreteGammaDeexcitation::CanDoTransition - n/p/H/>Cf" 00151 << G4endl; 00152 } 00153 } 00154 00155 G4Fragment* nucleus = GetNucleus(); 00156 G4double excitation = nucleus->GetExcitationEnergy(); 00157 //G4cout << "G4DiscreteGammaDeexcitation::CanDoTransition: " << nucleus << G4endl; 00158 00159 if (canDo) { 00160 if (excitation <= _tolerance) { 00161 canDo = false; 00162 if (_verbose > 0) { 00163 G4cout 00164 << "G4DiscreteGammaDeexcitation::CanDoTransition - Excitation <= 0" 00165 << excitation << " " << excitation - _tolerance 00166 << G4endl; 00167 } 00168 } else { 00169 if (excitation > _levelManager->MaxLevelEnergy() + _tolerance) { canDo = false; } 00170 //if (excitation < _levelManager->MinLevelEnergy() - _tolerance) canDo = false; 00171 // The following is a protection to avoid looping in case of elements with very low 00172 // ensdf levels 00173 //if (excitation < _levelManager->MinLevelEnergy() * 0.9) canDo = false; 00174 00175 if (_verbose > 0) { 00176 G4cout << "G4DiscreteGammaDeexcitation::CanDoTransition - Excitation " 00177 << excitation << ", Min-Max are " 00178 << _levelManager->MinLevelEnergy() << " " 00179 << _levelManager->MaxLevelEnergy() << G4endl; 00180 } 00181 } 00182 } 00183 00184 if (canDo) { 00185 const G4NuclearLevel* level = _levelManager->NearestLevel(excitation); 00186 if (!level) { 00187 canDo = false; 00188 00189 } else { 00190 if (level->HalfLife() > _max_hl && !_rdm ) { canDo = false; } 00191 00192 if (_verbose > 0) { 00193 G4cout << "G4DiscreteGammaDeexcitation::CanDoTransition - Halflife " 00194 << level->HalfLife() << ", Calling from RDM " 00195 << (_rdm ? " True " : " False ") << ", Max-HL = " << _max_hl 00196 << G4endl; 00197 } 00198 } 00199 } 00200 if (_verbose > 0) { 00201 G4cout <<"G4DiscreteGammaDeexcitation::CanDoTransition - CanDo: " 00202 << (canDo ? " True " : " False ") << G4endl; 00203 } 00204 00205 return canDo; 00206 00207 }
G4VGammaTransition * G4DiscreteGammaDeexcitation::CreateTransition | ( | ) | [virtual] |
Implements G4VGammaDeexcitation.
Definition at line 77 of file G4DiscreteGammaDeexcitation.cc.
References G4VGammaDeexcitation::_verbose, G4NuclearLevel::Energy(), G4cout, G4endl, G4Fragment::GetA_asInt(), G4Fragment::GetExcitationEnergy(), G4NuclearLevelStore::GetInstance(), G4NuclearLevelStore::GetManager(), G4VGammaDeexcitation::GetNucleus(), G4Fragment::GetZ_asInt(), G4NuclearLevelManager::IsValid(), G4NuclearLevelManager::NearestLevel(), and G4DiscreteGammaTransition::SetICM().
00078 { 00079 G4Fragment* nucleus = GetNucleus(); 00080 G4int A = nucleus->GetA_asInt(); 00081 G4int Z = nucleus->GetZ_asInt(); 00082 // _verbose =2; 00083 // G4cout << "G4DiscreteGammaDeexcitation::CreateTransition: " << nucleus << G4endl; 00084 if (_nucleusA != A || _nucleusZ != Z) 00085 { 00086 _nucleusA = A; 00087 _nucleusZ = Z; 00088 _levelManager = G4NuclearLevelStore::GetInstance()->GetManager(Z,A); 00089 } 00090 00091 if (_levelManager->IsValid()) 00092 { 00093 if (_verbose > 1) 00094 { 00095 G4cout 00096 << "G4DiscreteGammaDeexcitation::CreateTransition - (A,Z) is valid " 00097 << G4endl; 00098 } 00099 00100 G4double excitation = nucleus->GetExcitationEnergy(); 00101 const G4NuclearLevel* level =_levelManager->NearestLevel(excitation); 00102 00103 if (level != 0) 00104 { 00105 if (_verbose > 0) { 00106 G4cout 00107 << "G4DiscreteGammaDeexcitation::CreateTransition - Created from level energy " 00108 << level->Energy() << ", excitation is " 00109 << excitation << G4endl; 00110 } 00111 G4DiscreteGammaTransition* dtransit = new G4DiscreteGammaTransition(*level,Z,A); 00112 dtransit->SetICM(_icm); 00113 return dtransit; 00114 } 00115 else 00116 { 00117 if (_verbose > 0) { 00118 G4cout 00119 << "G4DiscreteGammaDeexcitation::CreateTransition - No transition created from " 00120 << excitation << " within tolerance " << _tolerance << G4endl; 00121 } 00122 return 0; 00123 } 00124 } 00125 return 0; 00126 }
void G4DiscreteGammaDeexcitation::SetHL | ( | G4double | hl | ) | [inline] |
void G4DiscreteGammaDeexcitation::SetICM | ( | G4bool | hl | ) | [inline] |
Definition at line 85 of file G4DiscreteGammaDeexcitation.hh.
Referenced by G4PhotonEvaporation::G4PhotonEvaporation().
void G4DiscreteGammaDeexcitation::SetRDM | ( | G4bool | hl | ) | [inline] |