Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4INCL::StandardPropagationModel Class Reference

#include <G4INCLStandardPropagationModel.hh>

+ Inheritance diagram for G4INCL::StandardPropagationModel:

Public Member Functions

 StandardPropagationModel (LocalEnergyType localEnergyType, LocalEnergyType localEnergyDeltaType, const G4double hTime=0.0)
 
virtual ~StandardPropagationModel ()
 
G4double getCurrentTime ()
 
void setNucleus (G4INCL::Nucleus *nucleus)
 
G4INCL::NucleusgetNucleus ()
 
G4double shoot (ParticleSpecies const &projectileSpecies, const G4double kineticEnergy, const G4double impactParameter, const G4double phi)
 
G4double shootParticle (ParticleType const t, const G4double kineticEnergy, const G4double impactParameter, const G4double phi)
 
G4double shootComposite (ParticleSpecies const &s, const G4double kineticEnergy, const G4double impactParameter, const G4double phi)
 
G4double shootAtrest (ParticleType const t, const G4double kineticEnergy)
 
void setStoppingTime (G4double)
 
G4double getStoppingTime ()
 
void registerAvatar (G4INCL::IAvatar *anAvatar)
 
IAvatargenerateBinaryCollisionAvatar (Particle *const p1, Particle *const p2)
 Generate a two-particle avatar.
 
G4double getReflectionTime (G4INCL::Particle const *const aParticle)
 Get the reflection time.
 
G4double getTime (G4INCL::Particle const *const particleA, G4INCL::Particle const *const particleB, G4double *minDistOfApproach) const
 
void generateUpdatedCollisions (const ParticleList &updatedParticles, const ParticleList &particles)
 Generate and register collisions between a list of updated particles and all the other particles.
 
void generateCollisions (const ParticleList &particles)
 Generate and register collisions among particles in a list, except between those in another list.
 
void generateCollisions (const ParticleList &particles, const ParticleList &except)
 Generate and register collisions among particles in a list, except between those in another list.
 
void generateDecays (const ParticleList &particles)
 Generate decays for particles that can decay.
 
void updateAvatars (const ParticleList &particles)
 
void generateAllAvatars ()
 (Re)Generate all possible avatars.
 
G4INCL::IAvatarpropagate (FinalState const *const fs)
 
- Public Member Functions inherited from G4INCL::IPropagationModel
 IPropagationModel ()
 
virtual ~IPropagationModel ()
 

Additional Inherited Members

- Protected Member Functions inherited from G4INCL::IPropagationModel

Detailed Description

Standard INCL4 particle propagation and avatar prediction

This class implements the standard INCL4 avatar prediction and particle propagation logic. The main idea is to predict all collisions between particles and their reflections from the potential wall. After this we select the avatar with the smallest time, propagate all particles to their positions at that time and return the avatar to the INCL kernel

See also
G4INCL::Kernel.

The particle trajectories in this propagation model are straight lines and all particles are assumed to move with constant velocity.

Definition at line 69 of file G4INCLStandardPropagationModel.hh.

Constructor & Destructor Documentation

◆ StandardPropagationModel()

G4INCL::StandardPropagationModel::StandardPropagationModel ( LocalEnergyType localEnergyType,
LocalEnergyType localEnergyDeltaType,
const G4double hTime = 0.0 )

Definition at line 67 of file G4INCLStandardPropagationModel.cc.

68 :theNucleus(0), maximumTime(70.0), currentTime(0.0),
69 hadronizationTime(hTime),
70 firstAvatar(true),
71 theLocalEnergyType(localEnergyType),
72 theLocalEnergyDeltaType(localEnergyDeltaType)
73 {
74 }

◆ ~StandardPropagationModel()

G4INCL::StandardPropagationModel::~StandardPropagationModel ( )
virtual

Definition at line 76 of file G4INCLStandardPropagationModel.cc.

77 {
78 delete theNucleus;
79 }

Member Function Documentation

◆ generateAllAvatars()

void G4INCL::StandardPropagationModel::generateAllAvatars ( )

(Re)Generate all possible avatars.

Definition at line 531 of file G4INCLStandardPropagationModel.cc.

531 {
532 ParticleList const &particles = theNucleus->getStore()->getParticles();
533// assert(!particles.empty());
534 G4double time;
535 for(ParticleIter i=particles.begin(), e=particles.end(); i!=e; ++i) {
536 time = this->getReflectionTime(*i);
537 if(time <= maximumTime) registerAvatar(new SurfaceAvatar(*i, time, theNucleus));
538 }
539 generateCollisions(particles);
540 generateDecays(particles);
541 }
double G4double
Definition G4Types.hh:83
Store * getStore() const
G4double getReflectionTime(G4INCL::Particle const *const aParticle)
Get the reflection time.
void generateCollisions(const ParticleList &particles)
Generate and register collisions among particles in a list, except between those in another list.
void registerAvatar(G4INCL::IAvatar *anAvatar)
void generateDecays(const ParticleList &particles)
Generate decays for particles that can decay.
ParticleList const & getParticles() const
ParticleList::const_iterator ParticleIter

Referenced by shootAtrest(), shootComposite(), and shootParticle().

◆ generateBinaryCollisionAvatar()

IAvatar * G4INCL::StandardPropagationModel::generateBinaryCollisionAvatar ( Particle *const p1,
Particle *const p2 )

Generate a two-particle avatar.

Generate a two-particle avatar, if all the appropriate conditions are met.

Definition at line 355 of file G4INCLStandardPropagationModel.cc.

355 {
356 // Is either particle a participant?
357 if(!p1->isParticipant() && !p2->isParticipant() && p1->getParticipantType()==p2->getParticipantType()) return NULL;
358
359 // Is it a pi-resonance collision (we don't treat them)?
360 if((p1->isResonance() && p2->isPion()) || (p1->isPion() && p2->isResonance()))
361 return NULL;
362
363 // Is it a photon collision (we don't treat them)?
364 if(p1->isPhoton() || p2->isPhoton())
365 return NULL;
366
367 // Will the avatar take place between now and the end of the cascade?
368 G4double minDistOfApproachSquared = 0.0;
369 G4double t = getTime(p1, p2, &minDistOfApproachSquared);
370 if(t>maximumTime || t<currentTime+hadronizationTime) return NULL;
371
372 // Local energy. Jump through some hoops to calculate the cross section
373 // at the collision point, and clean up after yourself afterwards.
374 G4bool hasLocalEnergy;
375 if(p1->isPion() || p2->isPion())
376 hasLocalEnergy = ((theLocalEnergyDeltaType == FirstCollisionLocalEnergy &&
377 theNucleus->getStore()->getBook().getAcceptedCollisions()==0) ||
378 theLocalEnergyDeltaType == AlwaysLocalEnergy);
379 else
380 hasLocalEnergy = ((theLocalEnergyType == FirstCollisionLocalEnergy &&
381 theNucleus->getStore()->getBook().getAcceptedCollisions()==0) ||
382 theLocalEnergyType == AlwaysLocalEnergy);
383 const G4bool p1HasLocalEnergy = (hasLocalEnergy && !p1->isMeson() && !p1->isAntiNucleon());
384 const G4bool p2HasLocalEnergy = (hasLocalEnergy && !p2->isMeson() && !p2->isAntiNucleon());
385
386 if(p1HasLocalEnergy) {
387 backupParticle1 = *p1;
388 p1->propagate(t - currentTime);
389 if(p1->getPosition().mag() > theNucleus->getSurfaceRadius(p1)) {
390 *p1 = backupParticle1;
391 return NULL;
392 }
394 }
395 if(p2HasLocalEnergy) {
396 backupParticle2 = *p2;
397 p2->propagate(t - currentTime);
398 if(p2->getPosition().mag() > theNucleus->getSurfaceRadius(p2)) {
399 *p2 = backupParticle2;
400 if(p1HasLocalEnergy) {
401 *p1 = backupParticle1;
402 }
403 return NULL;
404 }
406 }
407
408 // Compute the total cross section
409 const G4double totalCrossSection = CrossSections::total(p1, p2);
411
412 // Restore particles to their state before the local-energy tweak
413 if(p1HasLocalEnergy) {
414 *p1 = backupParticle1;
415 }
416 if(p2HasLocalEnergy) {
417 *p2 = backupParticle2;
418 }
419
420 // Is the CM energy > cutNN? (no cutNN on the first collision)
421 if(theNucleus->getStore()->getBook().getAcceptedCollisions()>0
422 && p1->isNucleon() && p2->isNucleon()
423 && squareTotalEnergyInCM < BinaryCollisionAvatar::getCutNNSquared()) return NULL;
424
425 // Do the particles come close enough to each other?
426 if(Math::tenPi*minDistOfApproachSquared > totalCrossSection) return NULL;
427
428 // Bomb out if the two collision partners are the same particle
429// assert(p1->getID() != p2->getID());
430
431 // Return a new avatar, then!
432 return new G4INCL::BinaryCollisionAvatar(t, totalCrossSection, theNucleus, p1, p2);
433 }
bool G4bool
Definition G4Types.hh:86
G4int getAcceptedCollisions() const
G4double getSurfaceRadius(Particle const *const particle) const
Get the maximum allowed radius for a given particle.
void propagate(G4double step)
G4double getTime(G4INCL::Particle const *const particleA, G4INCL::Particle const *const particleB, G4double *minDistOfApproach) const
Book & getBook()
G4double total(Particle const *const p1, Particle const *const p2)
G4double squareTotalEnergyInCM(Particle const *const p1, Particle const *const p2)
void transformToLocalEnergyFrame(Nucleus const *const n, Particle *const p)
const G4double tenPi
@ FirstCollisionLocalEnergy

Referenced by generateCollisions(), generateCollisions(), and generateUpdatedCollisions().

◆ generateCollisions() [1/2]

void G4INCL::StandardPropagationModel::generateCollisions ( const ParticleList & particles)

Generate and register collisions among particles in a list, except between those in another list.

This method generates all possible collisions among the particles. Each collision is generated only once.

Parameters
particleslist of particles

Definition at line 491 of file G4INCLStandardPropagationModel.cc.

491 {
492 // Loop over all the particles
493 for(ParticleIter p1=particles.begin(), e=particles.end(); p1!=e; ++p1) {
494 // Loop over the rest of the particles
495 for(ParticleIter p2 = p1 + 1; p2 != particles.end(); ++p2) {
497 }
498 }
499 }
IAvatar * generateBinaryCollisionAvatar(Particle *const p1, Particle *const p2)
Generate a two-particle avatar.

Referenced by generateAllAvatars().

◆ generateCollisions() [2/2]

void G4INCL::StandardPropagationModel::generateCollisions ( const ParticleList & particles,
const ParticleList & except )

Generate and register collisions among particles in a list, except between those in another list.

This method generates all possible collisions among the particles. Each collision is generated only once. The collision is NOT generated if BOTH collision partners belong to the except list.

You should pass an empty list as the except parameter if you want to generate all possible collisions among particles.

Parameters
particleslist of particles
exceptlist of excluded particles

Definition at line 501 of file G4INCLStandardPropagationModel.cc.

501 {
502
503 const G4bool haveExcept = !except.empty();
504
505 // Loop over all the particles
506 for(ParticleIter p1=particles.begin(), e=particles.end(); p1!=e; ++p1)
507 {
508 // Loop over the rest of the particles
509 ParticleIter p2 = p1;
510 for(++p2; p2 != particles.end(); ++p2)
511 {
512 // Skip the collision if both particles must be excluded
513 if(haveExcept && except.contains(*p1) && except.contains(*p2)) continue;
514
516 }
517 }
518
519 }

◆ generateDecays()

void G4INCL::StandardPropagationModel::generateDecays ( const ParticleList & particles)

Generate decays for particles that can decay.

The list of particles given as an argument is allowed to contain also stable particles.

Parameters
particleslist of particles to (possibly) generate decays for

Definition at line 559 of file G4INCLStandardPropagationModel.cc.

559 {
560 for(ParticleIter i=particles.begin(), e=particles.end(); i!=e; ++i) {
561 if((*i)->isDelta()) {
562 G4double decayTime = DeltaDecayChannel::computeDecayTime((*i)); // time in fm/c
563 G4double time = currentTime + decayTime;
564 if(time <= maximumTime) {
565 registerAvatar(new DecayAvatar((*i), time, theNucleus));
566 }
567 }
568 else if((*i)->getType() == SigmaZero) {
569 G4double decayTime = SigmaZeroDecayChannel::computeDecayTime((*i)); // time in fm/c
570 G4double time = currentTime + decayTime;
571 if(time <= maximumTime) {
572 registerAvatar(new DecayAvatar((*i), time, theNucleus));
573 }
574 }
575 if((*i)->isOmega()) {
577 G4double timeOmega = currentTime + decayTimeOmega;
578 if(timeOmega <= maximumTime) {
579 registerAvatar(new DecayAvatar((*i), timeOmega, theNucleus));
580 }
581 }
582 }
583 }
static G4double computeDecayTime(Particle *p)
static G4double computeDecayTime(Particle *p)

Referenced by generateAllAvatars(), and propagate().

◆ generateUpdatedCollisions()

void G4INCL::StandardPropagationModel::generateUpdatedCollisions ( const ParticleList & updatedParticles,
const ParticleList & particles )

Generate and register collisions between a list of updated particles and all the other particles.

This method does not generate collisions among the particles in updatedParticles; in other words, it generates a collision between one of the updatedParticles and one of the particles ONLY IF the latter does not belong to updatedParticles.

If you intend to generate all possible collisions among particles in a list, use generateCollisions().

Parameters
updatedParticleslist of updated particles
particleslist of particles

Definition at line 472 of file G4INCLStandardPropagationModel.cc.

472 {
473
474 // Loop over all the updated particles
475 for(ParticleIter updated=updatedParticles.begin(), e=updatedParticles.end(); updated!=e; ++updated)
476 {
477 // Loop over all the particles
478 for(ParticleIter particle=particles.begin(), end=particles.end(); particle!=end; ++particle)
479 {
480 /* Consider the generation of a collision avatar only if (*particle)
481 * is not one of the updated particles.
482 * The criterion makes sure that you don't generate avatars between
483 * updated particles. */
484 if(updatedParticles.contains(*particle)) continue;
485
487 }
488 }
489 }

Referenced by updateAvatars().

◆ getCurrentTime()

G4double G4INCL::StandardPropagationModel::getCurrentTime ( )
virtual

Returns the current global time of the system.

Implements G4INCL::IPropagationModel.

Definition at line 341 of file G4INCLStandardPropagationModel.cc.

341 {
342 return currentTime;
343 }

◆ getNucleus()

G4INCL::Nucleus * G4INCL::StandardPropagationModel::getNucleus ( )
virtual

Get the nucleus.

Implements G4INCL::IPropagationModel.

Definition at line 81 of file G4INCLStandardPropagationModel.cc.

82 {
83 return theNucleus;
84 }

◆ getReflectionTime()

G4double G4INCL::StandardPropagationModel::getReflectionTime ( G4INCL::Particle const *const aParticle)

Get the reflection time.

Returns the reflection time of a particle on the potential wall.

Parameters
aParticlepointer to the particle

Definition at line 435 of file G4INCLStandardPropagationModel.cc.

435 {
436 Intersection theIntersection(
438 aParticle->getPosition(),
439 aParticle->getPropagationVelocity(),
440 theNucleus->getSurfaceRadius(aParticle)));
441 G4double time;
442 if(theIntersection.exists) {
443 time = currentTime + theIntersection.time;
444 } else {
445 INCL_ERROR("Imaginary reflection time for particle: " << '\n'
446 << aParticle->print());
447 time = 10000.0;
448 }
449 return time;
450 }
#define INCL_ERROR(x)
Intersection getLaterTrajectoryIntersection(const ThreeVector &x0, const ThreeVector &p, const G4double r)
Compute the second intersection of a straight particle trajectory with a sphere.

Referenced by generateAllAvatars(), and updateAvatars().

◆ getStoppingTime()

G4double G4INCL::StandardPropagationModel::getStoppingTime ( )
virtual

Get the current stopping time.

Implements G4INCL::IPropagationModel.

Definition at line 332 of file G4INCLStandardPropagationModel.cc.

332 {
333 return maximumTime;
334 }

◆ getTime()

G4double G4INCL::StandardPropagationModel::getTime ( G4INCL::Particle const *const particleA,
G4INCL::Particle const *const particleB,
G4double * minDistOfApproach ) const

Get the predicted time of the collision between two particles.

Definition at line 452 of file G4INCLStandardPropagationModel.cc.

454 {
455 G4double time;
456 G4INCL::ThreeVector t13 = particleA->getPropagationVelocity();
457 t13 -= particleB->getPropagationVelocity();
458 G4INCL::ThreeVector distance = particleA->getPosition();
459 distance -= particleB->getPosition();
460 const G4double t7 = t13.dot(distance);
461 const G4double dt = t13.mag2();
462 if(dt <= 1.0e-10) {
463 (*minDistOfApproach) = 100000.0;
464 return currentTime + 100000.0;
465 } else {
466 time = -t7/dt;
467 }
468 (*minDistOfApproach) = distance.mag2() + time * t7;
469 return currentTime + time;
470 }
G4double dot(const ThreeVector &v) const
G4double mag2() const

Referenced by generateBinaryCollisionAvatar().

◆ propagate()

G4INCL::IAvatar * G4INCL::StandardPropagationModel::propagate ( FinalState const *const fs)
virtual

Propagate all particles and return the first avatar.

Implements G4INCL::IPropagationModel.

Definition at line 585 of file G4INCLStandardPropagationModel.cc.

586 {
587 if(fs) {
588 // We update only the information related to particles that were updated
589 // by the previous avatar.
590#ifdef INCL_REGENERATE_AVATARS
591#warning "The INCL_REGENERATE_AVATARS code has not been tested in a while. Use it at your peril."
592 if(!fs->getModifiedParticles().empty() || !fs->getEnteringParticles().empty() || !fs->getCreatedParticles().empty()) {
593 // Regenerates the entire avatar list, skipping collisions between
594 // updated particles
595 theNucleus->getStore()->clearAvatars();
596 theNucleus->getStore()->initialiseParticleAvatarConnections();
597 generateAllAvatarsExceptUpdated(fs);
598 }
599#else
600 ParticleList const &updatedParticles = fs->getModifiedParticles();
601 if(fs->getValidity()==PauliBlockedFS) {
602 // This final state might represents the outcome of a Pauli-blocked delta
603 // decay
604// assert(updatedParticles.empty() || (updatedParticles.size()==1 && updatedParticles.front()->isResonance()));
605// assert(fs->getEnteringParticles().empty() && fs->getCreatedParticles().empty() && fs->getOutgoingParticles().empty() && fs->getDestroyedParticles().empty());
606 generateDecays(updatedParticles);
607 } else {
608 ParticleList const &entering = fs->getEnteringParticles();
609 generateDecays(updatedParticles);
610 generateDecays(entering);
611
612 ParticleList const &created = fs->getCreatedParticles();
613 if(created.empty() && entering.empty())
614 updateAvatars(updatedParticles);
615 else {
616 ParticleList updatedParticlesCopy = updatedParticles;
617 updatedParticlesCopy.insert(updatedParticlesCopy.end(), entering.begin(), entering.end());
618 updatedParticlesCopy.insert(updatedParticlesCopy.end(), created.begin(), created.end());
619 updateAvatars(updatedParticlesCopy);
620 }
621 }
622#endif
623 }
624
625 G4INCL::IAvatar *theAvatar = theNucleus->getStore()->findSmallestTime();
626 if(theAvatar == 0) return 0; // Avatar list is empty
627 // theAvatar->dispose();
628
629 if(theAvatar->getTime() < currentTime) {
630 INCL_ERROR("Avatar time = " << theAvatar->getTime() << ", currentTime = " << currentTime << '\n');
631 return 0;
632 } else if(theAvatar->getTime() > currentTime) {
633 theNucleus->getStore()->timeStep(theAvatar->getTime() - currentTime);
634
635 currentTime = theAvatar->getTime();
636 theNucleus->getStore()->getBook().setCurrentTime(currentTime);
637 }
638
639 return theAvatar;
640 }
void setCurrentTime(G4double t)
Definition G4INCLBook.hh:97
G4double getTime() const
void updateAvatars(const ParticleList &particles)
void clearAvatars()
void timeStep(G4double step)
IAvatar * findSmallestTime()

◆ registerAvatar()

void G4INCL::StandardPropagationModel::registerAvatar ( G4INCL::IAvatar * anAvatar)

Add an avatar to the storage.

Definition at line 350 of file G4INCLStandardPropagationModel.cc.

351 {
352 if(anAvatar) theNucleus->getStore()->add(anAvatar);
353 }
void add(Particle *p)

Referenced by generateAllAvatars(), generateCollisions(), generateCollisions(), generateDecays(), generateUpdatedCollisions(), and updateAvatars().

◆ setNucleus()

void G4INCL::StandardPropagationModel::setNucleus ( G4INCL::Nucleus * nucleus)
virtual

Set the nucleus for this propagation model.

Implements G4INCL::IPropagationModel.

Definition at line 345 of file G4INCLStandardPropagationModel.cc.

346 {
347 theNucleus = nucleus;
348 }

◆ setStoppingTime()

void G4INCL::StandardPropagationModel::setStoppingTime ( G4double time)
virtual

Set the stopping time of the simulation.

Implements G4INCL::IPropagationModel.

Definition at line 336 of file G4INCLStandardPropagationModel.cc.

336 {
337// assert(time>0.0);
338 maximumTime = time;
339 }

◆ shoot()

G4double G4INCL::StandardPropagationModel::shoot ( ParticleSpecies const & projectileSpecies,
const G4double kineticEnergy,
const G4double impactParameter,
const G4double phi )
virtual

Implements G4INCL::IPropagationModel.

Definition at line 88 of file G4INCLStandardPropagationModel.cc.

88 {
89 if(projectileSpecies.theType==Composite){
90 return shootComposite(projectileSpecies, kineticEnergy, impactParameter, phi);
91 }
92 else if(projectileSpecies.theType==antiProton && theNucleus->getAnnihilationType()!=Def){
93 return shootAtrest(projectileSpecies.theType, kineticEnergy);
94 }
95 else{
96 return shootParticle(projectileSpecies.theType, kineticEnergy, impactParameter, phi);
97 }
98 }
AnnihilationType getAnnihilationType() const
Getter for theAnnihilationType.
G4double shootAtrest(ParticleType const t, const G4double kineticEnergy)
G4double shootComposite(ParticleSpecies const &s, const G4double kineticEnergy, const G4double impactParameter, const G4double phi)
G4double shootParticle(ParticleType const t, const G4double kineticEnergy, const G4double impactParameter, const G4double phi)

◆ shootAtrest()

G4double G4INCL::StandardPropagationModel::shootAtrest ( ParticleType const t,
const G4double kineticEnergy )
virtual

Implements G4INCL::IPropagationModel.

Definition at line 102 of file G4INCLStandardPropagationModel.cc.

102 {
103 theNucleus->setParticleNucleusCollision();
104 currentTime = 0.0;
105
106 // Create final state particles
107 const G4double projectileMass = ParticleTable::getTableParticleMass(t);
108 G4double energy = kineticEnergy + projectileMass;
109 G4double momentumZ = std::sqrt(energy*energy - projectileMass*projectileMass);
110 ThreeVector momentum(0.0, 0.0, momentumZ);
111 Particle *pb = new G4INCL::Particle(t, energy, momentum, ThreeVector());
112 PbarAtrestEntryChannel *obj = new PbarAtrestEntryChannel(theNucleus, pb);
113 ParticleList fslist = obj->makeMesonStar();
114 const G4bool isProton = obj->ProtonIsTheVictim();
115 delete pb;
116
117 //set Stopping time according to highest meson energy of the star
118 G4double temfin;
119 G4double TLab;
120 std::vector<G4double> energies;
121 std::vector<G4double> projections;
122 ThreeVector ab, cd;
123
124 for(ParticleIter pit = fslist.begin(), e = fslist.end(); pit!=e; ++pit){
125 energies.push_back((*pit)->getKineticEnergy());
126 ab = (*pit)->boostVector();
127 cd = (*pit)->getPosition();
128 projections.push_back(ab.dot(cd)); //projection length
129 }// make vector of energies
130
131 temfin = 30.18 * std::pow(theNucleus->getA(), 0.17);
132 TLab = *max_element(energies.begin(), energies.end()); //choose max energy
133
134 // energy-dependent stopping time above 2 AGeV
135 if(TLab>2000.)
136 temfin *= (5.8E4-TLab)/5.6E4;
137
138 maximumTime = temfin;
139
140 // If the incoming particle is slow, use a larger stopping time
141 const G4double rMax = theNucleus->getUniverseRadius();
142 const G4double distance = 2.*rMax;
143 const G4double maxMesonVelocityProjection = *max_element(energies.begin(), energies.end());
144 const G4double traversalTime = distance / maxMesonVelocityProjection;
145 if(maximumTime < traversalTime)
146 maximumTime = traversalTime;
147 INCL_DEBUG("Cascade stopping time is " << maximumTime << '\n');
148
149
150 // Fill in the relevant kinematic variables
151 theNucleus->setIncomingAngularMomentum(G4INCL::ThreeVector(0., 0., 0.));
152 theNucleus->setIncomingMomentum(G4INCL::ThreeVector(0., 0., 0.));
153 if(isProton){
154 theNucleus->setInitialEnergy(pb->getMass()
155 + ParticleTable::getTableMass(theNucleus->getA() + 1,theNucleus->getZ() + 1,theNucleus->getS()));
156 }
157 else{
158 theNucleus->setInitialEnergy(pb->getMass()
159 + ParticleTable::getTableMass(theNucleus->getA() + 1,theNucleus->getZ(),theNucleus->getS()));
160 }
161 //kinetic energy excluded from the balance
162
163 for(ParticleIter p = fslist.begin(), e = fslist.end(); p!=e; ++p){
164 (*p)->makeProjectileSpectator();
165 }
166
168 firstAvatar = false;
169
170 // Get the entry avatars for mesons
171 IAvatarList theAvatarList = obj->bringMesonStar(fslist, theNucleus);
172 delete obj;
173 theNucleus->getStore()->addParticleEntryAvatars(theAvatarList);
174 INCL_DEBUG("Avatars added" << '\n');
175
176 return 99.;
177 }
#define INCL_DEBUG(x)
void setIncomingAngularMomentum(const ThreeVector &j)
Set the incoming angular-momentum vector.
void setInitialEnergy(const G4double e)
Set the initial energy.
void setIncomingMomentum(const ThreeVector &p)
Set the incoming momentum vector.
void setParticleNucleusCollision()
Set a particle-nucleus collision.
G4double getUniverseRadius() const
Getter for theUniverseRadius.
G4int getS() const
Returns the strangeness number.
G4int getZ() const
Returns the charge number.
G4int getA() const
Returns the baryon number.
void generateAllAvatars()
(Re)Generate all possible avatars.
void addParticleEntryAvatars(IAvatarList const &al)
Add one ParticleEntry avatar.
G4double energy(const ThreeVector &p, const G4double m)
G4ThreadLocal NuclearMassFn getTableMass
Static pointer to the mass function for nuclei.
G4ThreadLocal ParticleMassFn getTableParticleMass
Static pointer to the mass function for particles.
UnorderedVector< IAvatar * > IAvatarList

Referenced by shoot().

◆ shootComposite()

G4double G4INCL::StandardPropagationModel::shootComposite ( ParticleSpecies const & s,
const G4double kineticEnergy,
const G4double impactParameter,
const G4double phi )
virtual

Implements G4INCL::IPropagationModel.

Definition at line 258 of file G4INCLStandardPropagationModel.cc.

258 {
259 theNucleus->setNucleusNucleusCollision();
260 currentTime = 0.0;
261
262 // Create the ProjectileRemnant object
263 ProjectileRemnant *pr = new ProjectileRemnant(species, kineticEnergy);
264
265 // Same stopping time as for nucleon-nucleus
266 maximumTime = 29.8 * std::pow(theNucleus->getA(), 0.16);
267
268 // If the incoming cluster is slow, use a larger stopping time
269 const G4double rms = ParticleTable::getLargestNuclearRadius(pr->getA(), pr->getZ());
270 const G4double rMax = theNucleus->getUniverseRadius();
271 const G4double distance = 2.*rMax + 2.725*rms;
272 const G4double projectileVelocity = pr->boostVector().mag();
273 const G4double traversalTime = distance / projectileVelocity;
274 if(maximumTime < traversalTime)
275 maximumTime = traversalTime;
276 INCL_DEBUG("Cascade stopping time is " << maximumTime << '\n');
277
278 // If Coulomb is activated, do not process events with impact
279 // parameter larger than the maximum impact parameter, taking into
280 // account Coulomb distortion.
281 if(impactParameter>CoulombDistortion::maxImpactParameter(pr,theNucleus)) {
282 INCL_DEBUG("impactParameter>CoulombDistortion::maxImpactParameter" << '\n');
283 delete pr;
284 return -1.;
285 }
286
287 // Position the cluster at the right impact parameter
288 ThreeVector position(impactParameter * std::cos(phi),
289 impactParameter * std::sin(phi),
290 0.);
291 pr->setPosition(position);
292
293 // Fill in the relevant kinematic variables
294 theNucleus->setIncomingAngularMomentum(pr->getAngularMomentum());
295 theNucleus->setIncomingMomentum(pr->getMomentum());
296 theNucleus->setInitialEnergy(pr->getEnergy()
297 + ParticleTable::getTableMass(theNucleus->getA(),theNucleus->getZ(),theNucleus->getS()));
298
300 firstAvatar = false;
301
302 // Get the entry avatars from Coulomb
303 IAvatarList theAvatarList
304 = CoulombDistortion::bringToSurface(pr, theNucleus);
305
306 if(theAvatarList.empty()) {
307 INCL_DEBUG("No ParticleEntryAvatar found, transparent event" << '\n');
308 delete pr;
309 return -1.;
310 }
311
312 /* Store the internal kinematics of the projectile remnant.
313 *
314 * Note that this is at variance with the Fortran version, which stores
315 * the initial kinematics of the particles *after* putting the spectators
316 * on mass shell, but *before* removing the same energy from the
317 * participants. Due to the different code flow, doing so in the C++
318 * version leads to wrong excitation energies for the forced compound
319 * nucleus.
320 */
321 pr->storeComponents();
322
323 // Tell the Nucleus about the ProjectileRemnant
324 theNucleus->setProjectileRemnant(pr);
325
326 // Register the ParticleEntryAvatars
327 theNucleus->getStore()->addParticleEntryAvatars(theAvatarList);
328
329 return pr->getTransversePosition().mag();
330 }
void setNucleusNucleusCollision()
Set a nucleus-nucleus collision.
void setProjectileRemnant(ProjectileRemnant *const c)
Set the projectile remnant.
ParticleEntryAvatar * bringToSurface(Particle *p, Nucleus *const n)
Modify the momentum of an incoming particle and position it on the surface of the nucleus.
G4double maxImpactParameter(ParticleSpecies const &p, const G4double kinE, Nucleus const *const n)
Return the maximum impact parameter for Coulomb-distorted trajectories.
G4double getLargestNuclearRadius(const G4int A, const G4int Z)

Referenced by shoot().

◆ shootParticle()

G4double G4INCL::StandardPropagationModel::shootParticle ( ParticleType const t,
const G4double kineticEnergy,
const G4double impactParameter,
const G4double phi )
virtual

Implements G4INCL::IPropagationModel.

Definition at line 181 of file G4INCLStandardPropagationModel.cc.

181 {
182 theNucleus->setParticleNucleusCollision();
183 currentTime = 0.0;
184
185 // Create the projectile particle
186 const G4double projectileMass = ParticleTable::getTableParticleMass(type);
187 G4double energy = kineticEnergy + projectileMass;
188 G4double momentumZ = std::sqrt(energy*energy - projectileMass*projectileMass);
189 ThreeVector momentum(0.0, 0.0, momentumZ);
190 Particle *p= new G4INCL::Particle(type, energy, momentum, ThreeVector());
191
192 G4double temfin;
193 G4double TLab;
194 if( p->isMeson()) {
195 temfin = 30.18 * std::pow(theNucleus->getA(), 0.17);
196 TLab = p->getKineticEnergy();
197 } else {
198 temfin = 29.8 * std::pow(theNucleus->getA(), 0.16);
199 TLab = p->getKineticEnergy()/p->getA();
200 }
201
202 // energy-dependent stopping time above 2 AGeV
203 if(TLab>2000.)
204 temfin *= (5.8E4-TLab)/5.6E4;
205
206 maximumTime = temfin;
207
208 // If the incoming particle is slow, use a larger stopping time
209 const G4double rMax = theNucleus->getUniverseRadius();
210 const G4double distance = 2.*rMax;
211 const G4double projectileVelocity = p->boostVector().mag();
212 const G4double traversalTime = distance / projectileVelocity;
213 if(maximumTime < traversalTime)
214 maximumTime = traversalTime;
215 INCL_DEBUG("Cascade stopping time is " << maximumTime << '\n');
216
217 // If Coulomb is activated, do not process events with impact
218 // parameter larger than the maximum impact parameter, taking into
219 // account Coulomb distortion.
220 if(impactParameter>CoulombDistortion::maxImpactParameter(p->getSpecies(), kineticEnergy, theNucleus)) {
221 INCL_DEBUG("impactParameter>CoulombDistortion::maxImpactParameter" << '\n');
222 delete p;
223 return -1.;
224 }
225
226 ThreeVector position(impactParameter * std::cos(phi),
227 impactParameter * std::sin(phi),
228 0.);
229 p->setPosition(position);
230
231 // Fill in the relevant kinematic variables
232 theNucleus->setIncomingAngularMomentum(p->getAngularMomentum());
233 theNucleus->setIncomingMomentum(p->getMomentum());
234 theNucleus->setInitialEnergy(p->getEnergy()
235 + ParticleTable::getTableMass(theNucleus->getA(),theNucleus->getZ(),theNucleus->getS()));
236
237 // Reset the particle kinematics to the INCL values
238 p->setINCLMass();
239 p->setEnergy(p->getMass() + kineticEnergy);
240 p->adjustMomentumFromEnergy();
241
242 p->makeProjectileSpectator();
244 firstAvatar = false;
245
246 // Get the entry avatars from Coulomb and put them in the Store
247 ParticleEntryAvatar *theEntryAvatar = CoulombDistortion::bringToSurface(p, theNucleus);
248 if(theEntryAvatar) {
249 theNucleus->getStore()->addParticleEntryAvatar(theEntryAvatar);
250
251 return p->getTransversePosition().mag();
252 } else {
253 delete p;
254 return -1.;
255 }
256 }
void addParticleEntryAvatar(IAvatar *a)
Add one ParticleEntry avatar.

Referenced by shoot().

◆ updateAvatars()

void G4INCL::StandardPropagationModel::updateAvatars ( const ParticleList & particles)

Update all avatars related to a particle.

Definition at line 521 of file G4INCLStandardPropagationModel.cc.

521 {
522
523 for(ParticleIter iter=particles.begin(), e=particles.end(); iter!=e; ++iter) {
524 G4double time = this->getReflectionTime(*iter);
525 if(time <= maximumTime) registerAvatar(new SurfaceAvatar(*iter, time, theNucleus));
526 }
527 ParticleList const &p = theNucleus->getStore()->getParticles();
528 generateUpdatedCollisions(particles, p); // Predict collisions with spectators and participants
529 }
void generateUpdatedCollisions(const ParticleList &updatedParticles, const ParticleList &particles)
Generate and register collisions between a list of updated particles and all the other particles.

Referenced by propagate().


The documentation for this class was generated from the following files: