367 while (!cascad_particles.empty() && !
model->empty()) {
371 G4cout <<
" Iteration " << iloop <<
": Number of cparticles "
372 << cascad_particles.size() <<
" last one: \n"
373 << cascad_particles.back() <<
G4endl;
377 if (theCascadeHistory) {
378 theCascadeHistory->
AddEntry(cascad_particles.back());
380 G4cout <<
" active cparticle got history ID "
381 << cascad_particles.back().getHistoryId() <<
G4endl;
388 G4cout <<
" particle is non-interacting; moving to output" <<
G4endl;
391 cascad_particles.pop_back();
396 model->generateParticleFate(cascad_particles.back(),
397 theElementaryParticleCollider,
398 new_cascad_particles);
401 if (theCascadeHistory && new_cascad_particles.size()>1)
402 theCascadeHistory->
AddVertex(cascad_particles.back(), new_cascad_particles);
405 G4cout <<
" After generate fate: New particles "
406 << new_cascad_particles.size() << G4endl
407 <<
" Discarding last cparticle from list " <<
G4endl;
410 cascad_particles.pop_back();
414 if (new_cascad_particles.size() == 1) {
417 if (
model->stillInside(currentCParticle)) {
422 model->worthToPropagate(currentCParticle)) {
424 cascad_particles.push_back(currentCParticle);
440 G4cout <<
" KE " << KE <<
" barrier " << Q*coulombBarrier <<
G4endl;
442 if (KE < Q*coulombBarrier) {
448 if (KE > 0.0001) CBP =
G4Exp(-0.0181*0.5*tnuclei->
getZ()*
449 (1./KE - 1./coulombBarrier)*
450 std::sqrt(mass*(coulombBarrier-KE)) );
473 cascad_particles.insert(cascad_particles.end(),
474 new_cascad_particles.begin(),
475 new_cascad_particles.end());
477 std::pair<G4int, G4int> holes =
model->getTypesOfNucleonsInvolved();
479 G4cout <<
" adding new exciton holes " << holes.first <<
","
480 << holes.second <<
G4endl;
484 if (holes.second > 0)
490 output, cascad_particles);
494 G4cout <<
" cparticles remaining " << cascad_particles.size()
495 <<
" nucleus (model) has "
496 <<
model->getNumberOfNeutrons() <<
" n, "
497 <<
model->getNumberOfProtons() <<
" p "
498 <<
" residual fragment A " << aresid <<
G4endl;
501 if (aresid <= minimum_recoil_A)
return;
void processTrappedParticle(const G4CascadParticle &trapped)
void addOutgoingParticle(const G4InuclElementaryParticle &particle)
G4bool particleCanInteract(const G4CascadParticle &cpart) const
const G4InuclElementaryParticle & getParticle() const
G4double getKineticEnergy() const
void incrementHoles(G4int ip)
void collide(G4InuclParticle *bullet, G4InuclParticle *target, G4CollisionOutput &output)
G4GLOB_DLL std::ostream G4cout
G4InteractionCase interCase
G4int AddEntry(G4CascadParticle &cpart)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
const std::vector< G4InuclElementaryParticle > & getOutgoingParticles() const
G4double getCharge() const
G4InuclParticle * getBullet() const
G4InuclParticle * getTarget() const
const XML_Char XML_Content * model
G4int getNumberOfReflections() const
G4int AddVertex(G4CascadParticle &cpart, std::vector< G4CascadParticle > &daug)