179{
181
182 G4double totprob, prob, oldprob = 0.0;
184 std::size_t maxchannel, i;
185
186 G4int Amax = theResidualNucleus->GetA_asInt();
187 if(fVerbose > 1) {
188 G4cout <<
"### G4Evaporation::BreakItUp loop" <<
G4endl;
189 }
190 CLHEP::HepRandomEngine* rndm = G4Random::getTheEngine();
191
192
193
194 for(
G4int ia=0; ia<Amax; ++ia) {
195
196
197 G4int Z = theResidualNucleus->GetZ_asInt();
198 G4int A = theResidualNucleus->GetA_asInt();
199 if(
A <= 1) {
break; }
200 G4double Eex = theResidualNucleus->GetExcitationEnergy();
201
202
203 if(
theFBU->IsApplicable(Z,
A, Eex)) {
break; }
204
205
206 G4double abun = nist->GetIsotopeAbundance(Z,
A);
207
208 if(Eex <= minExcitation &&
209 (abun > 0.0 || (
A == 3 && (Z == 1 || Z == 2)))) {
break; }
210
211 totprob = 0.0;
212 maxchannel = nChannels;
213 if(fVerbose > 1) {
214 G4cout <<
"Evaporation# " << ia <<
" Z= " << Z <<
" A= " <<
A
215 << " Eex(MeV)= " << theResidualNucleus->GetExcitationEnergy()
216 <<
" aban= " << abun <<
G4endl;
217 }
218
219 for(i=0; i<nChannels; ++i) {
220 prob = (*theChannels)[i]->GetEmissionProbability(theResidualNucleus);
221 if (fVerbose > 1 && prob > 0.0) {
222 G4cout <<
" Channel# " << i <<
" prob= " << prob <<
G4endl;
223 }
224 totprob += prob;
225 probabilities[i] = totprob;
226
227
228 if (i > 8) {
229 if (prob <= totprob*limFact && oldprob <= totprob*limFact) {
230 maxchannel = i + 1;
231 break;
232 }
233 }
234 oldprob = prob;
235 }
236
237
238
239 if(0.0 < totprob && probabilities[0] == totprob) {
240 if(fVerbose > 1) {
241 G4cout <<
"$$$ Start chain of gamma evaporation" <<
G4endl;
242 }
243 (*theChannels)[0]->BreakUpChain(theResult, theResidualNucleus);
244
245
246 if(abun > 0.0) {
247 theResidualNucleus->SetLongLived(true);
248 break;
249 }
250
251 Eex = theResidualNucleus->GetExcitationEnergy();
252 if(
theFBU->IsApplicable(Z,
A, Eex)) {
break; }
253
254
255 if(theResidualNucleus->IsLongLived()) { break; }
256 totprob = 0.0;
257 }
258
259 if(0.0 == totprob &&
A < 30) {
260
261
262 if(fVerbose > 1) {
264 }
265 if(unstableBreakUp->BreakUpChain(theResult, theResidualNucleus)) {
266 continue;
267 }
268
269 break;
270 }
271
272
273 totprob *= rndm->
flat();
274
275
276 for (i=0; i<maxchannel; ++i) {
277 if (probabilities[i] >= totprob) { break; }
278 }
279
280 if (fVerbose > 1) {
281 G4cout <<
"$$$ Selected Channel# " << i <<
" MaxChannel="
283 }
284 G4Fragment* frag = (*theChannels)[i]->EmittedFragment(theResidualNucleus);
285 if(fVerbose > 2 && frag) {
G4cout <<
" " << *frag <<
G4endl; }
286
287
288 if(nullptr != frag) { theResult->push_back(frag); }
289 else { break; }
290 }
291}
G4GLOB_DLL std::ostream G4cout
void InitialiseChannels() override