34 #define INCLXX_IN_GEANT4_MODE 1
66 :theNucleus(0), maximumTime(70.0), currentTime(0.0),
67 hadronizationTime(hTime),
69 theLocalEnergyType(localEnergyType),
70 theLocalEnergyDeltaType(localEnergyDeltaType)
86 return shootComposite(projectileSpecies, kineticEnergy, impactParameter, phi);
98 G4double momentumZ = std::sqrt(energy*energy - projectileMass*projectileMass);
114 temfin *= (5.8E4-TLab)/5.6E4;
122 const G4double traversalTime = distance / projectileVelocity;
131 INCL_DEBUG(
"impactParameter>CoulombDistortion::maxImpactParameter" <<
'\n');
137 impactParameter * std::sin(phi),
181 const G4double distance = 2.*rMax + 2.725*rms;
183 const G4double traversalTime = distance / projectileVelocity;
192 INCL_DEBUG(
"impactParameter>CoulombDistortion::maxImpactParameter" <<
'\n');
199 impactParameter * std::sin(phi),
216 if(theAvatarList.empty()) {
217 INCL_DEBUG(
"No ParticleEntryAvatar found, transparent event" <<
'\n');
274 G4double minDistOfApproachSquared = 0.0;
289 const G4bool p1HasLocalEnergy = (hasLocalEnergy && !p1->
isMeson());
290 const G4bool p2HasLocalEnergy = (hasLocalEnergy && !p2->
isMeson());
292 if(p1HasLocalEnergy) {
301 if(p2HasLocalEnergy) {
306 if(p1HasLocalEnergy) {
319 if(p1HasLocalEnergy) {
322 if(p2HasLocalEnergy) {
332 if(
Math::tenPi*minDistOfApproachSquared > totalCrossSection)
return NULL;
348 if(theIntersection.
exists) {
351 INCL_ERROR(
"Imaginary reflection time for particle: " <<
'\n'
352 << aParticle->
print());
369 (*minDistOfApproach) = 100000.0;
374 (*minDistOfApproach) = distance.
mag2() + time * t7;
381 for(
ParticleIter updated=updatedParticles.begin(),
e=updatedParticles.end(); updated!=
e; ++updated)
384 for(
ParticleIter particle=particles.begin(), end=particles.end(); particle!=end; ++particle)
390 if(updatedParticles.
contains(*particle))
continue;
399 for(
ParticleIter p1=particles.begin(),
e=particles.end(); p1!=
e; ++p1) {
401 for(
ParticleIter p2 = p1 + 1; p2 != particles.end(); ++p2) {
409 const G4bool haveExcept = !except.empty();
412 for(
ParticleIter p1=particles.begin(),
e=particles.end(); p1!=
e; ++p1)
416 for(++p2; p2 != particles.end(); ++p2)
429 for(
ParticleIter iter=particles.begin(),
e=particles.end(); iter!=
e; ++iter) {
441 for(
ParticleIter i=particles.begin(),
e=particles.end(); i!=
e; ++i) {
449 #ifdef INCL_REGENERATE_AVATARS
450 void StandardPropagationModel::generateAllAvatarsExceptUpdated(
FinalState const *
const fs) {
453 for(
ParticleIter i=particles.begin(),
e=particles.end(); i!=
e; ++i) {
459 except.insert(except.end(), entering.begin(), entering.end());
466 for(
ParticleIter i=particles.begin(),
e=particles.end(); i!=
e; ++i) {
467 if((*i)->isDelta()) {
481 if((*i)->isOmega()) {
496 #ifdef INCL_REGENERATE_AVATARS
497 #warning "The INCL_REGENERATE_AVATARS code has not been tested in a while. Use it at your peril."
503 generateAllAvatarsExceptUpdated(fs);
519 if(created.empty() && entering.empty())
523 updatedParticlesCopy.insert(updatedParticlesCopy.end(), entering.begin(), entering.end());
524 updatedParticlesCopy.insert(updatedParticlesCopy.end(), created.begin(), created.end());
532 if(theAvatar == 0)
return 0;
G4double getLargestNuclearRadius(const G4int A, const G4int Z)
void setProjectileRemnant(ProjectileRemnant *const c)
Set the projectile remnant.
ParticleList::const_iterator ParticleIter
G4double total(Particle const *const p1, Particle const *const p2)
Intersection-point structure.
virtual ~StandardPropagationModel()
G4INCL::Nucleus * getNucleus()
void propagate(G4double step)
const G4INCL::ThreeVector & getPosition() const
G4double getReflectionTime(G4INCL::Particle const *const aParticle)
Get the reflection time.
virtual G4INCL::ParticleSpecies getSpecies() const
Get the particle species.
ParticleList const & getParticles() const
static G4double computeDecayTime(Particle *p)
G4double getEnergy() const
LocalEnergyType theLocalEnergyType
const ThreeVector & adjustMomentumFromEnergy()
Rescale the momentum to match the total energy.
StandardPropagationModel(LocalEnergyType localEnergyType, LocalEnergyType localEnergyDeltaType, const G4double hTime=0.0)
G4double getKineticEnergy() const
Get the particle kinetic energy.
const G4INCL::ThreeVector & getMomentum() const
static G4double computeDecayTime(Particle *p)
void setIncomingAngularMomentum(const ThreeVector &j)
Set the incoming angular-momentum vector.
static G4double getCutNNSquared()
G4double dot(const ThreeVector &v) const
FinalStateValidity getValidity() const
G4double getSurfaceRadius(Particle const *const particle) const
Get the maximum allowed radius for a given particle.
ThreeVector getPropagationVelocity() const
Get the propagation velocity of the particle.
void setINCLMass()
Set the mass of the Particle to its table mass.
G4double squareTotalEnergyInCM(Particle const *const p1, Particle const *const p2)
G4double maxImpactParameter(ParticleSpecies const &p, const G4double kinE, Nucleus const *const n)
Return the maximum impact parameter for Coulomb-distorted trajectories.
G4double getMass() const
Get the cached particle mass.
G4double getTime(G4INCL::Particle const *const particleA, G4INCL::Particle const *const particleB, G4double *minDistOfApproach) const
void addParticleEntryAvatars(IAvatarList const &al)
Add one ParticleEntry avatar.
G4bool isResonance() const
Is it a resonance?
G4double getStoppingTime()
void registerAvatar(G4INCL::IAvatar *anAvatar)
void addParticleEntryAvatar(IAvatar *a)
Add one ParticleEntry avatar.
G4INCL::ThreeVector getAngularMomentum() const
Get the total angular momentum (orbital + spin)
void generateAllAvatars()
(Re)Generate all possible avatars.
G4ThreadLocal NuclearMassFn getTableMass
Static pointer to the mass function for nuclei.
G4double getCurrentTime()
virtual void setPosition(const G4INCL::ThreeVector &position)
void storeComponents()
Store the projectile components.
LocalEnergyType theLocalEnergyDeltaType
void timeStep(G4double step)
ParticleList const & getEnteringParticles() const
void transformToLocalEnergyFrame(Nucleus const *const n, Particle *const p)
std::string print() const
IAvatar * findSmallestTime()
ParticleList const & getModifiedParticles() const
G4int getZ() const
Returns the charge number.
G4double getUniverseRadius() const
Getter for theUniverseRadius.
void setParticleNucleusCollision()
Set a particle-nucleus collision.
void setCurrentTime(G4double t)
G4double shoot(ParticleSpecies const &projectileSpecies, const G4double kineticEnergy, const G4double impactParameter, const G4double phi)
G4int getA() const
Returns the baryon number.
static G4double computeDecayTime(Particle *p)
ParticleEntryAvatar * bringToSurface(Particle *p, Nucleus *const n)
Modify the momentum of an incoming particle and position it on the surface of the nucleus...
void generateCollisions(const ParticleList &particles)
Generate and register collisions among particles in a list, except between those in another list...
IAvatar * generateBinaryCollisionAvatar(Particle *const p1, Particle *const p2)
Generate a two-particle avatar.
G4bool isParticipant() const
void updateAvatars(const ParticleList &particles)
G4double shootParticle(ParticleType const t, const G4double kineticEnergy, const G4double impactParameter, const G4double phi)
G4int getAcceptedCollisions() const
void setNucleus(G4INCL::Nucleus *nucleus)
Simple class for computing intersections between a straight line and a sphere.
virtual void makeProjectileSpectator()
G4bool isMeson() const
Is this a Meson?
void setIncomingMomentum(const ThreeVector &p)
Set the incoming momentum vector.
G4double hadronizationTime
void setStoppingTime(G4double)
void setEnergy(G4double energy)
G4bool isPion() const
Is this a pion?
G4bool contains(const T &t) const
virtual G4INCL::ThreeVector getAngularMomentum() const
void generateDecays(const ParticleList &particles)
Generate decays for particles that can decay.
Static class for selecting Coulomb distortion.
Intersection getLaterTrajectoryIntersection(const ThreeVector &x0, const ThreeVector &p, const G4double r)
Compute the second intersection of a straight particle trajectory with a sphere.
void setInitialEnergy(const G4double e)
Set the initial energy.
ParticleList const & getCreatedParticles() const
G4ThreadLocal ParticleMassFn getTableParticleMass
Static pointer to the mass function for particles.
G4INCL::IAvatar * propagate(FinalState const *const fs)
void setNucleusNucleusCollision()
Set a nucleus-nucleus collision.
ThreeVector getTransversePosition() const
Transverse component of the position w.r.t. the momentum.
G4double shootComposite(ParticleSpecies const &s, const G4double kineticEnergy, const G4double impactParameter, const G4double phi)
ThreeVector boostVector() 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 setPosition(const ThreeVector &position)
Set the position of the cluster.
G4INCL::Nucleus * theNucleus
ParticipantType getParticipantType() const