148const G4int G4IntraNucleiCascader::itry_max = 100;
149const G4int G4IntraNucleiCascader::reflection_cut = 50;
150const G4double G4IntraNucleiCascader::small_ekin = 0.001*MeV;
151const 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;
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;
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;
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;
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) {
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());
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 "
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);
std::vector< G4InuclElementaryParticle >::iterator particleIterator
G4DLLIMPORT std::ostream G4cerr
G4DLLIMPORT std::ostream G4cout
G4int getGeneration() const
void updateZone(G4int izone)
const G4InuclElementaryParticle & getParticle() const
void setGeneration(G4int gen)
void updatePosition(const G4ThreeVector &pos)
void setMovingInsideNuclei(G4bool isMovingIn=true)
G4int getNumberOfReflections() const
void initializePath(G4double npath)
G4int getCurrentZone() const
const G4ThreeVector & getPosition() const
static const G4CascadeChannel * GetTable(G4int initialState)
void FindClusters(G4CollisionOutput &finalState)
void setVerboseLevel(G4int verbose)
virtual void setVerboseLevel(G4int verbose=0)
G4InteractionCase interCase
static G4bool doCoalescence()
G4bool wholeEvent() const
void addExcitonConfiguration(const G4ExitonConfiguration exciton)
void setTolerance(G4double tolerance)
const G4LorentzVector & getRecoilMomentum() const
void collide(G4InuclParticle *bullet, G4InuclParticle *target, G4CollisionOutput &output)
G4double getRecoilExcitation() const
G4bool goodNucleus() const
void setRecoilExcitation(G4double Eexc)
G4Fragment * makeRecoilFragment()
G4bool goodFragment() const
G4int numberOfOutgoingParticles() const
void addRecoilFragment(const G4Fragment *aFragment)
const std::vector< G4InuclNuclei > & getOutgoingNuclei() const
void printCollisionOutput(std::ostream &os=G4cout) const
void addOutgoingParticle(const G4InuclElementaryParticle &particle)
const std::vector< G4InuclElementaryParticle > & getOutgoingParticles() const
void setOnShell(G4InuclParticle *bullet, G4InuclParticle *target)
void setVerboseLevel(G4int verbose)
G4int numberOfOutgoingNuclei() const
G4bool acceptable() const
void add(const G4CollisionOutput &right)
void trivialise(G4InuclParticle *bullet, G4InuclParticle *target)
void addOutgoingParticles(const std::vector< G4InuclElementaryParticle > &particles)
void Boost(G4double totalEnergy, const G4ThreeVector &momentumDirection)
G4VDecayChannel * SelectADecayChannel()
void incrementQP(G4int ip)
void incrementHoles(G4int ip)
G4InuclParticle * getBullet() const
void set(G4InuclParticle *part1, G4InuclParticle *part2)
G4bool hadNucleus() const
G4InuclParticle * getTarget() const
void processTrappedParticle(const G4CascadParticle &trapped)
void releaseSecondary(const G4KineticTrack *aSecondary)
void copyWoundedNucleus(G4V3DNucleus *theNucleus)
void rescatter(G4InuclParticle *bullet, G4KineticTrackVector *theSecondaries, G4V3DNucleus *theNucleus, G4CollisionOutput &globalOutput)
void setVerboseLevel(G4int verbose=0)
void decayTrappedParticle(const G4CascadParticle &trapped)
void collide(G4InuclParticle *bullet, G4InuclParticle *target, G4CollisionOutput &globalOutput)
G4bool initialize(G4InuclParticle *bullet, G4InuclParticle *target)
virtual ~G4IntraNucleiCascader()
G4InuclParticle * createTarget(G4V3DNucleus *theNucleus)
void preloadCascade(G4V3DNucleus *theNucleus, G4KineticTrackVector *theSecondaries)
void copySecondaries(G4KineticTrackVector *theSecondaries)
void processSecondary(const G4KineticTrack *aSecondary)
void newCascade(G4int itry)
void finalize(G4int itry, G4InuclParticle *bullet, G4InuclParticle *target, G4CollisionOutput &globalOutput)
void fill(G4int ityp, Model model=DefaultModel)
static G4double getParticleMass(G4int type)
void fill(G4int a, G4int z, G4double exc=0., Model model=DefaultModel)
G4ParticleDefinition * getDefinition() const
G4double getKineticEnergy() const
G4LorentzVector getMomentum() const
G4double getEnergy() const
G4double getCharge() const
const G4ThreeVector & GetPosition() const
G4ParticleDefinition * GetDefinition() const
const G4LorentzVector & Get4Momentum() const
G4int getZone(G4double r) const
G4int getNumberOfNeutrons() const
G4CascadParticle initializeCascad(G4InuclElementaryParticle *particle)
G4bool worthToPropagate(const G4CascadParticle &cparticle) const
G4int getNumberOfProtons() const
void generateParticleFate(G4CascadParticle &cparticle, G4ElementaryParticleCollider *theEPCollider, std::vector< G4CascadParticle > &cascade)
void reset(G4int nHitNeutrons=0, G4int nHitProtons=0, const std::vector< G4ThreeVector > *hitPoints=0)
G4bool stillInside(const G4CascadParticle &cparticle)
void generateModel(G4InuclNuclei *nuclei)
std::pair< std::vector< G4CascadParticle >, std::vector< G4InuclElementaryParticle > > modelLists
std::pair< G4int, G4int > getTypesOfNucleonsInvolved() const
G4double getRadiusUnits() const
void setVerboseLevel(G4int verbose)
G4ParticleDefinition * GetParticleType() const
virtual const G4ThreeVector & GetPosition() const
G4int GetAtomicNumber() const
G4double GetPDGMass() const
G4int GetAtomicMass() const
G4DecayTable * GetDecayTable() const
const G4String & GetParticleName() const
virtual G4Nucleon * GetNextNucleon()=0
virtual G4int GetCharge()=0
virtual G4bool StartLoop()=0
virtual G4int GetMassNumber()=0
virtual void setVerboseLevel(G4int verbose=0)
virtual G4DecayProducts * DecayIt(G4double parentMass=-1.0)=0
G4double G4cbrt(G4double x)