143 using namespace G4InuclParticleNames;
144 using namespace G4InuclSpecialFunctions;
148 const G4int G4IntraNucleiCascader::itry_max = 100;
149 const G4int G4IntraNucleiCascader::reflection_cut = 50;
150 const G4double G4IntraNucleiCascader::small_ekin = 0.001*
MeV;
151 const G4double G4IntraNucleiCascader::quasielast_cut = 1*
MeV;
160 tnuclei(0), bnuclei(0), bparticle(0),
161 minimum_recoil_A(0.), coulombBarrier(0.),
170 delete theElementaryParticleCollider;
171 delete theRecoilMaker;
172 delete theClusterMaker;
173 delete nucleusTarget;
179 model->setVerboseLevel(verbose);
200 finalize(itry, bullet, target, globalOutput);
211 G4cout <<
" >>> G4IntraNucleiCascader::rescatter " <<
G4endl;
223 finalize(itry, bullet, target, globalOutput);
230 G4cout <<
" >>> G4IntraNucleiCascader::initialize " <<
G4endl;
246 if (!bnuclei && !bparticle) {
247 G4cerr <<
" G4IntraNucleiCascader: projectile is not a valid particle."
256 G4cerr <<
" Target is not a nucleus. Abandoning." <<
G4endl;
260 model->generateModel(tnuclei);
261 coulombBarrier = 0.00126*tnuclei->
getZ() / (1.+
G4cbrt(tnuclei->
getA()));
265 minimum_recoil_A = 0.;
269 G4cout <<
" intitial momentum E " << momentum_in.
e() <<
" Px "
270 << momentum_in.
x() <<
" Py " << momentum_in.
y() <<
" Pz "
281 G4cout <<
" IntraNucleiCascader itry " << itry <<
" inter_case "
287 new_cascad_particles.clear();
288 theExitonConfiguration.
clear();
290 cascad_particles.clear();
298 G4cout <<
" >>> G4IntraNucleiCascader::setupCascade" <<
G4endl;
305 cascad_particles.push_back(
model->initializeCascad(bparticle));
311 model->initializeCascad(bnuclei, tnuclei, all_particles);
313 cascad_particles = all_particles.first;
316 if (cascad_particles.size() == 0) {
319 for (i = 0; i < ab; i++) {
320 G4int knd = i < zb ? 1 : 2;
327 for (i = 0; i < ihn; i++) theExitonConfiguration.
incrementHoles(2);
328 for (i = 0; i < ihz; i++) theExitonConfiguration.
incrementHoles(1);
340 while (!cascad_particles.empty() && !
model->empty()) {
344 G4cout <<
" Iteration " << iloop <<
": Number of cparticles "
345 << cascad_particles.size() <<
" last one: \n"
346 << cascad_particles.back() <<
G4endl;
349 model->generateParticleFate(cascad_particles.back(),
350 theElementaryParticleCollider,
351 new_cascad_particles);
354 G4cout <<
" After generate fate: New particles "
355 << new_cascad_particles.size() << G4endl
356 <<
" Discarding last cparticle from list " <<
G4endl;
359 cascad_particles.pop_back();
363 if (new_cascad_particles.size() == 1) {
366 if (
model->stillInside(currentCParticle)) {
371 model->worthToPropagate(currentCParticle)) {
373 cascad_particles.push_back(currentCParticle);
389 G4cout <<
" KE " << KE <<
" barrier " << Q*coulombBarrier <<
G4endl;
391 if (KE < Q*coulombBarrier) {
397 if (KE > 0.0001) CBP = std::exp(-0.0181*0.5*tnuclei->
getZ()*
398 (1./KE - 1./coulombBarrier)*
399 std::sqrt(mass*(coulombBarrier-KE)) );
422 cascad_particles.insert(cascad_particles.end(),
423 new_cascad_particles.begin(),
424 new_cascad_particles.end());
426 std::pair<G4int, G4int> holes =
model->getTypesOfNucleonsInvolved();
428 G4cout <<
" adding new exciton holes " << holes.first <<
","
429 << holes.second <<
G4endl;
433 if (holes.second > 0)
439 output, cascad_particles);
443 G4cout <<
" cparticles remaining " << cascad_particles.size()
444 <<
" nucleus (model) has "
445 <<
model->getNumberOfNeutrons() <<
" n, "
446 <<
model->getNumberOfProtons() <<
" p "
447 <<
" residual fragment A " << aresid <<
G4endl;
450 if (aresid <= minimum_recoil_A)
return;
459 G4cout <<
" >>> G4IntraNucleiCascader::finishCascade ?" <<
G4endl;
463 cascad_particles.clear();
472 if (theClusterMaker) {
495 G4cerr <<
" Recoil nucleus is not physical: A=" << afin <<
" Z="
503 G4cout <<
" afin " << afin <<
" zfin " << zfin <<
G4endl;
506 if (afin == 0)
return true;
509 G4int last_type = (zfin==1) ? 1 : 2;
515 if (mres-mass < -small_ekin) {
520 if (mres-mass > small_ekin) {
522 G4cerr <<
" extra energy with recoil nucleon" <<
G4endl;
532 G4cout <<
" adding recoiling nucleon to output list\n"
533 << last_particle <<
G4endl;
546 if (std::abs(Eex) < quasielast_cut) {
548 G4cout <<
" quasi-elastic scatter with " << Eex <<
" MeV recoil"
565 G4cerr <<
"Got null pointer for recoil fragment!" <<
G4endl;
570 G4cout <<
" adding recoil fragment to output list" <<
G4endl;
590 if (afin <= minimum_recoil_A && minimum_recoil_A < tnuclei->getA()) {
593 G4cout <<
" minimum recoil fragment increased to A " << minimum_recoil_A
609 if (itry >= itry_max) {
611 G4cout <<
" IntraNucleiCascader-> no inelastic interaction after "
612 << itry <<
" attempts " <<
G4endl;
617 G4cout <<
" IntraNucleiCascader output after trials " << itry <<
G4endl;
621 globalOutput.
add(output);
632 if (theNucleusA > 1) {
634 nucleusTarget->
fill(0., theNucleusA, theNucleusZ, 0.);
635 return nucleusTarget;
651 G4cout <<
" >>> G4IntraNucleiCascader::preloadCascade" <<
G4endl;
659 G4cout <<
" >>> G4IntraNucleiCascader::copyWoundedNucleus" <<
G4endl;
662 theExitonConfiguration.
clear();
678 <<
" neutrons hit, " << theExitonConfiguration.
protonHoles
679 <<
" protons hit" <<
G4endl;
689 G4cout <<
" >>> G4IntraNucleiCascader::copySecondaries" <<
G4endl;
691 for (
size_t i=0; i<secondaries->size(); i++) {
698 std::sort(cascad_particles.begin(), cascad_particles.end(),
702 G4cout <<
" Original list of " << secondaries->size() <<
" secondaries"
703 <<
" produced " << cascad_particles.size() <<
" cascade, "
726 G4cout <<
" >>> G4IntraNucleiCascader::processSecondary "
731 cascad_particles.resize(cascad_particles.size()+1);
747 G4cout <<
" Created cascade particle \n" << cpart <<
G4endl;
757 G4cout <<
" >>> G4IntraNucleiCascader::releaseSecondary "
762 if (dynamic_cast<G4Ions*>(kpd)) {
770 G4cout <<
" Created pre-cascade fragment\n" << inucl <<
G4endl;
779 G4cout <<
" Created invalid pre-cascade particle\n" << ipart <<
G4endl;
806 G4cout <<
" non-standard should be absorbed, now released\n"
819 G4cout <<
" unstable must be decayed in flight" <<
G4endl;
826 G4cerr <<
" no decay table! Releasing trapped particle" <<
G4endl;
836 G4cerr <<
" no daughters! Releasing trapped particle" <<
G4endl;
848 daughters->
Boost(decayEnergy, decayDir);