68 {
69
71 G4cout <<
" >>> G4NonEquilibriumEvaporator::collide" <<
G4endl;
72 }
73
74
76 if (!nuclei_target) {
77 G4cerr <<
" NonEquilibriumEvaporator -> target is not nuclei " <<
G4endl;
78 return;
79 }
80
82
83 const G4int a_cut = 5;
84 const G4int z_cut = 3;
85
87
89 const G4int itry_max = 1000;
92
95
98
100
102
107
108 G4int QP = QPP + QNP;
109 G4int QH = QPH + QNH;
111
114
115 toTheExitonSystemRestFrame.
setBullet(dummy);
116
119
124 G4bool try_again = (NEX > 0);
125
126
127 std::pair<G4double, G4double> parms;
128
129 while (try_again) {
130 if (A >= a_cut && Z >= z_cut && EEXS > eexs_cut) {
131
134 toTheExitonSystemRestFrame.
setTarget(PEX);
136
138 G4cout <<
" A " << A <<
" Z " << Z <<
" mass " << nuc_mass
139 <<
" EEXS " << EEXS <<
G4endl;
140 }
141
147
148 if (QEX < std::sqrt(2.0 * EG)) {
150 G4cout <<
" QEX " << QEX <<
" < sqrt(2*EG) " << std::sqrt(2.*EG)
151 <<
" NEX " << NEX <<
G4endl;
152
155 const G4double& CPA1 = parms.second;
156
158 (1.0 + EEXS / E0);
163 G4double EMP = EEXS - BP - VP * A / (A-1);
165
167 G4cout <<
" AK1 " << AK1 <<
" CPA1 " <<
" VP " << VP
168 << "\n bind(A,Z) " << DM1 << " dBind(N) " << BN
169 << " dBind(P) " << BP
170 <<
"\n EMN " << EMN <<
" EMP " << EMP <<
G4endl;
171 }
172
173 if (EMN > eexs_cut) {
175
176 if (NEX > 1) {
177 G4double APH = 0.25 * (QP * QP + QH * QH + QP - 3 * QH);
178 G4double APH1 = APH + 0.5 * (QP + QH);
179 ESP = EEXS / QEX;
180 G4double MELE = MEL / ESP / (A*A*A);
181
183 G4cout <<
" APH " << APH <<
" APH1 " << APH1 <<
" ESP " << ESP
185
186 if (ESP > 15.0) {
187 MELE *= std::sqrt(15.0 / ESP);
188 } else if(ESP < 7.0) {
189 MELE *= std::sqrt(ESP / 7.0);
190 if (ESP < 2.0) MELE *= std::sqrt(ESP / 2.0);
191 };
192
195
197 G4cout <<
" MELE " << MELE <<
" F1 " << F1 <<
" F2 " << F2
199
200 if (F1 > 0.0 && F2 > 0.0) {
204 D[0] = M1 * F2 * F2 * std::pow(F, NEX-1) / (QEX+1);
205
206 if (D[0] > 0.0) {
207
208 if (NEX >= 2) {
209 D[1] = 0.0462 / parlev /
G4cbrt(A) * QP * EEXS / QEX;
210
211 if (EMP > eexs_cut)
212 D[2] = D[1] * std::pow(EMP / EEXS, NEX) * (1.0 + CPA1);
213 D[1] *= std::pow(EMN / EEXS, NEX) *
getAL(A);
214
215 if (QNP < 1) D[1] = 0.0;
216 if (QPP < 1) D[2] = 0.0;
217
218 try_again = NEX > 1 && (D[1] > width_cut * D[0] ||
219 D[2] > width_cut * D[0]);
220
221 if (try_again) {
225
228
229 for (
G4int i = 0; i < 3; i++) {
230 S1 += D[i];
231 if (SL <= S1) {
232 icase = i;
233 break;
234 }
235 }
236
239 }
240 }
241 } else try_again = false;
242 } else try_again = false;
243 }
244
245 if (try_again) {
246 if (icase > 0) {
249
253
254 if (A < 3.0) try_again = false;
255
256 if (try_again) {
257
258 if (icase == 1) {
261
262 if (QNP < 1) icase = 0;
263 else {
264 B = BN;
265 V = 0.0;
266 ptype = 2;
267 };
268 } else {
271
272 if (QPP < 1) icase = 0;
273 else {
274 B = BP;
275 V = VP;
276 ptype = 1;
277
278 if (Z-1 < 1) try_again = false;
279 };
280 };
281
282 if (try_again && icase != 0) {
284 G4cout <<
" ptype " << ptype <<
" B " << B <<
" V " << V
286
289
290 if (E < 0.0) icase = 0;
291 else {
297
298 while (itry1 < itry_max && icase > 0 && bad) {
299 itry1++;
301
302 while (EEXS_new < 0.0 && itry < itry_max) {
303 itry++;
306
307 if (NEX == 2) {
308 X = 1.0 - std::sqrt(R);
309
310 } else {
313 X = std::pow(0.5 * R, QEX2);
314
315 for (
G4int i = 0; i < 1000; i++) {
317 (1.0 + QEX2 * X * (1.0 - R / std::pow(X, NEX)) / (1.0 - X));
318 X -= DX;
319
320 if (std::fabs(DX / X) < 0.01) break;
321
322 };
323 };
324 EPART = EB - X * E1;
325 EEXS_new = EB - EPART * A / (A-1);
326 }
327
328 if (itry == itry_max || EEXS_new < 0.0) {
329 icase = 0;
330 continue;
331 }
332
334 G4cout <<
" particle " << ptype <<
" escape " <<
G4endl;
335
336 EPART /= GeV;
337
340
341
343 G4double pmod = std::sqrt(EPART * (2.0 * mass + EPART));
345
346
348
349
352
355
356 if (ptype == 1) {
357 QPP_new--;
358 Z_new--;
359 };
360
361 if (ptype == 2) QNP_new--;
362
364 G4cout <<
" nucleus px " << PEX.
px() <<
" py " << PEX.
py()
365 <<
" pz " << PEX.
pz() <<
" E " << PEX.
e() <<
G4endl
366 <<
" evaporate px " << mom.
px() <<
" py " << mom.
py()
367 <<
" pz " << mom.
pz() <<
" E " << mom.
e() <<
G4endl;
368 }
369
370
372
373 EEXS_new = ((PEX-mom).m() - mass_new)*GeV;
374 if (EEXS_new < 0.) continue;
375
378
379 PEX -= mom;
380 EEXS = EEXS_new;
381
382 A = A_new;
383 Z = Z_new;
384
385 NEX--;
386 QEX--;
387 QP--;
388 QPP = QPP_new;
389 QNP = QNP_new;
390
391 particle.setMomentum(mom);
393 ppout += mom;
396 <<
" ppout px " << ppout.
px() <<
" py " << ppout.
py()
397 <<
" pz " << ppout.
pz() <<
" E " << ppout.
e() <<
G4endl;
398 }
399
400 bad = false;
401 }
402
403 if (itry1 == itry_max) icase = 0;
404 }
405 }
406 }
407 }
408
409 if (icase == 0 && try_again) {
411
414 G4double XNUN = 1.0 / (1.6 + ESP / EFN);
415 G4double XNUP = 1.0 / (1.6 + ESP / EFP);
420 G4double PP = (QPP * SNN1 + QNP * SPN1) * ZR;
421 G4double PN = (QPP * SPN2 + QNP * SNN2) * (AR - ZR);
423 NEX += 2;
424 QEX += 2;
425 QP++;
426 QH++;
427 AR--;
428
429 if (AR > 1) {
431
432 if (SL > PP) {
433 QNP++;
434 QNH++;
435 } else {
436 QPP++;
437 QPH++;
438 ZR--;
439 if (ZR < 2) try_again = false;
440 }
441 } else try_again = false;
442 }
443 }
444 } else try_again = false;
445 } else try_again = false;
446 } else try_again = false;
447 }
448
449
450
453 } else {
456
459 }
460
462 return;
463}
G4DLLIMPORT std::ostream G4cerr
G4DLLIMPORT std::ostream G4cout
void setVectM(const Hep3Vector &spatial, double mass)
virtual G4bool validateOutput(G4InuclParticle *bullet, G4InuclParticle *target, G4CollisionOutput &output)
G4int numberOfOutgoingParticles() const
void addOutgoingParticle(const G4InuclElementaryParticle &particle)
void addOutgoingNucleus(const G4InuclNuclei &nuclei)
const G4ExitonConfiguration & getExitonConfiguration() const
G4double getNucleiMass() const
G4double getExitationEnergy() const
G4LorentzVector getMomentum() const
void toTheTargetRestFrame()
void setBullet(const G4InuclParticle *bullet)
G4LorentzVector backToTheLab(const G4LorentzVector &mom) const
void setTarget(const G4InuclParticle *target)
G4double bindingEnergy(G4int A, G4int Z)
void paraMakerTruncated(G4double Z, std::pair< G4double, G4double > &parms)
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)