74 {
76 G4cout <<
" >>> G4NonEquilibriumEvaporator::deExcite" <<
G4endl;
77 }
78
80
81 const G4int a_cut = 5;
82 const G4int z_cut = 3;
83
85
87 const G4int itry_max = 1000;
90
93
99
100 G4int QP = QPP + QNP;
101 G4int QH = QPH + QNH;
103
106
107 toTheExitonSystemRestFrame.
setBullet(dummy);
108
111
116 G4bool try_again = (NEX > 0);
117
118
119 std::pair<G4double, G4double> parms;
120
121 while (try_again) {
122 if (
A >= a_cut &&
Z >= z_cut &&
EEXS > eexs_cut) {
123
128
130 G4cout <<
" A " <<
A <<
" Z " <<
Z <<
" mass " << nuc_mass
132 }
133
139
140 if (QEX < std::sqrt(2.0 * EG)) {
142 G4cout <<
" QEX " << QEX <<
" < sqrt(2*EG) " << std::sqrt(2.*EG)
143 <<
" NEX " << NEX <<
G4endl;
144
147 const G4double& CPA1 = parms.second;
148
157
159 G4cout <<
" AK1 " << AK1 <<
" CPA1 " <<
" VP " << VP
160 << "\n bind(A,Z) " << DM1 << " dBind(N) " << BN
161 << " dBind(P) " << BP
162 <<
"\n EMN " << EMN <<
" EMP " << EMP <<
G4endl;
163 }
164
165 if (EMN > eexs_cut) {
167
168 if (NEX > 1) {
169 G4double APH = 0.25 * (QP * QP + QH * QH + QP - 3 * QH);
170 G4double APH1 = APH + 0.5 * (QP + QH);
173
175 G4cout <<
" APH " << APH <<
" APH1 " << APH1 <<
" ESP " << ESP
177
178 if (ESP > 15.0) {
179 MELE *= std::sqrt(15.0 / ESP);
180 } else if(ESP < 7.0) {
181 MELE *= std::sqrt(ESP / 7.0);
182 if (ESP < 2.0) MELE *= std::sqrt(ESP / 2.0);
183 };
184
187
189 G4cout <<
" MELE " << MELE <<
" F1 " << F1 <<
" F2 " << F2
191
192 if (F1 > 0.0 && F2 > 0.0) {
196 D[0] = M1 * F2 * F2 * theG4Pow->
powN(F, NEX-1) / (QEX+1);
198 G4cout <<
" D[0] " <<
D[0] <<
" with F " << F
199 <<
" powN(F,NEX-1) " << theG4Pow->
powN(F, NEX-1)
201 }
202
204
205 if (NEX >= 2) {
207
208 if (EMP > eexs_cut)
209 D[2] =
D[1] * theG4Pow->
powN(EMP/
EEXS, NEX) * (1.0 + CPA1);
211
213 G4cout <<
" D[1] " <<
D[1] <<
" with powN(EMN/EEXS, NEX) "
215 <<
" D[2] " <<
D[2] <<
" with powN(EMP/EEXS, NEX) "
217 }
218
219 if (QNP < 1)
D[1] = 0.0;
220 if (QPP < 1)
D[2] = 0.0;
221
222 try_again = NEX > 1 && (
D[1] > width_cut *
D[0] ||
223 D[2] > width_cut *
D[0]);
224
225 if (try_again) {
229
232
233 for (
G4int i = 0; i < 3; i++) {
235 if (SL <= S1) {
236 icase = i;
237 break;
238 }
239 }
240
243 }
244 }
245 } else try_again = false;
246 } else try_again = false;
247 }
248
249 if (try_again) {
250 if (icase > 0) {
253
257
258 if (
A < 3.0) try_again =
false;
259
260 if (try_again) {
261
262 if (icase == 1) {
265
266 if (QNP < 1) icase = 0;
267 else {
269 V = 0.0;
270 ptype = 2;
271 };
272 } else {
275
276 if (QPP < 1) icase = 0;
277 else {
279 V = VP;
280 ptype = 1;
281
282 if (
Z-1 < 1) try_again =
false;
283 };
284 };
285
286 if (try_again && icase != 0) {
288 G4cout <<
" ptype " << ptype <<
" B " <<
B <<
" V " << V
290
293
294 if (E < 0.0) icase = 0;
295 else {
301
302
303 while (itry1 < itry_max && icase > 0 && bad) {
304 itry1++;
306
307
308 while (EEXS_new < 0.0 && itry < itry_max) {
309 itry++;
312
313 if (NEX == 2) {
314 X = 1.0 - std::sqrt(R);
315
316 } else {
319 X = theG4Pow->
powA(0.5*R, QEX2);
321 G4cout <<
" R " << R <<
" QEX2 " << QEX2
322 <<
" powA(R, QEX2) " << X <<
G4endl;
323 }
324
325 for (
G4int i = 0; i < 1000; i++) {
327 (1.0 + QEX2 * X * (1.0 - R / theG4Pow->
powN(X, NEX)) / (1.0 - X));
329 G4cout <<
" NEX " << NEX <<
" powN(X, NEX) "
331 }
332
333 X -= DX;
334
335 if (std::fabs(DX / X) < 0.01) break;
336
337 };
338 };
339 EPART = EB - X * E1;
340 EEXS_new = EB - EPART *
A / (
A-1);
341 }
342
343 if (itry == itry_max || EEXS_new < 0.0) {
344 icase = 0;
345 continue;
346 }
347
349 G4cout <<
" particle " << ptype <<
" escape " <<
G4endl;
350
351 EPART /= GeV;
352
355
356
358 G4double pmod = std::sqrt(EPART * (2.0 * mass + EPART));
360
361
363
364
367
370
371 if (ptype == 1) {
372 QPP_new--;
373 Z_new--;
374 };
375
376 if (ptype == 2) QNP_new--;
377
381 <<
" evaporate px " << mom.
px() <<
" py " << mom.
py()
382 <<
" pz " << mom.
pz() <<
" E " << mom.
e() <<
G4endl;
383 }
384
385
387
388 EEXS_new = ((
PEX-mom).m() - mass_new)*GeV;
389 if (EEXS_new < 0.) continue;
390
393
396
399
400 NEX--;
401 QEX--;
402 QP--;
403 QPP = QPP_new;
404 QNP = QNP_new;
405
406 particle.setMomentum(mom);
408 ppout += mom;
411 <<
" ppout px " << ppout.
px() <<
" py " << ppout.
py()
412 <<
" pz " << ppout.
pz() <<
" E " << ppout.
e() <<
G4endl;
413 }
414
415 bad = false;
416 }
417
418 if (itry1 == itry_max) icase = 0;
419 }
420 }
421 }
422 }
423
424 if (icase == 0 && try_again) {
426
429 G4double XNUN = 1.0 / (1.6 + ESP / EFN);
430 G4double XNUP = 1.0 / (1.6 + ESP / EFP);
435 G4double PP = (QPP * SNN1 + QNP * SPN1) * ZR;
436 G4double PN = (QPP * SPN2 + QNP * SNN2) * (AR - ZR);
438 NEX += 2;
439 QEX += 2;
440 QP++;
441 QH++;
442 AR--;
443
444 if (AR > 1) {
446
447 if (SL > PP) {
448 QNP++;
449 QNH++;
450 } else {
451 QPP++;
452 QPH++;
453 ZR--;
454 if (ZR < 2) try_again = false;
455 }
456 } else try_again = false;
457 }
458 }
459 } else try_again = false;
460 } else try_again = false;
461 } else try_again = false;
462 }
463
464
465
468 } else {
471
474 }
475
477 return;
478}
G4double B(G4double temperature)
G4double D(G4double temp)
G4GLOB_DLL std::ostream G4cout
void setVectM(const Hep3Vector &spatial, double mass)
void getTargetData(const G4Fragment &target)
const G4Fragment & makeFragment(G4LorentzVector mom, G4int A, G4int Z, G4double EX=0.)
virtual G4bool validateOutput(const G4Fragment &target, G4CollisionOutput &output)
G4int numberOfOutgoingParticles() const
void addRecoilFragment(const G4Fragment *aFragment)
void addOutgoingParticle(const G4InuclElementaryParticle &particle)
const G4Fragment & getRecoilFragment(G4int index=0) const
G4double getNucleiMass() const
void getTruncated(G4double Z, std::pair< G4double, G4double > &parms)
void toTheTargetRestFrame()
void setBullet(const G4InuclParticle *bullet)
G4LorentzVector backToTheLab(const G4LorentzVector &mom) const
void setTarget(const G4InuclParticle *target)
G4double powN(G4double x, G4int n) const
G4double powA(G4double A, G4double y) const
G4double bindingEnergy(G4int A, G4int Z)
G4LorentzVector generateWithRandomAngles(G4double p, G4double mass=0.)
G4double csNN(G4double e)
G4double FermiEnergy(G4int A, G4int Z, G4int ntype)
G4double csPN(G4double e)
G4double G4cbrt(G4double x)