34 #define INCLXX_IN_GEANT4_MODE 1
64 :theNucleus(0), maximumTime(70.0), currentTime(0.0),
65 hadronizationTime(hTime),
67 theLocalEnergyType(localEnergyType),
68 theLocalEnergyDeltaType(localEnergyDeltaType)
84 return shootComposite(projectileSpecies, kineticEnergy, impactParameter, phi);
96 G4double momentumZ = std::sqrt(energy*energy - projectileMass*projectileMass);
112 temfin *= (5.8E4-TLab)/5.6E4;
120 const G4double traversalTime = distance / projectileVelocity;
129 INCL_DEBUG(
"impactParameter>CoulombDistortion::maxImpactParameter" <<
'\n');
135 impactParameter * std::sin(phi),
179 const G4double distance = 2.*rMax + 2.725*rms;
181 const G4double traversalTime = distance / projectileVelocity;
190 INCL_DEBUG(
"impactParameter>CoulombDistortion::maxImpactParameter" <<
'\n');
197 impactParameter * std::sin(phi),
214 if(theAvatarList.empty()) {
215 INCL_DEBUG(
"No ParticleEntryAvatar found, transparent event" <<
'\n');
272 G4double minDistOfApproachSquared = 0.0;
287 const G4bool p1HasLocalEnergy = (hasLocalEnergy && !p1->
isPion());
288 const G4bool p2HasLocalEnergy = (hasLocalEnergy && !p2->
isPion());
290 if(p1HasLocalEnergy) {
299 if(p2HasLocalEnergy) {
304 if(p1HasLocalEnergy) {
317 if(p1HasLocalEnergy) {
320 if(p2HasLocalEnergy) {
330 if(
Math::tenPi*minDistOfApproachSquared > totalCrossSection)
return NULL;
346 if(theIntersection.
exists) {
349 INCL_ERROR(
"Imaginary reflection time for particle: " <<
'\n'
350 << aParticle->
print());
367 (*minDistOfApproach) = 100000.0;
372 (*minDistOfApproach) = distance.
mag2() + time * t7;
379 for(
ParticleIter updated=updatedParticles.begin(), e=updatedParticles.end(); updated!=e; ++updated)
382 for(
ParticleIter particle=particles.begin(), end=particles.end(); particle!=end; ++particle)
388 if(updatedParticles.
contains(*particle))
continue;
397 for(
ParticleIter p1=particles.begin(), e=particles.end(); p1!=e; ++p1) {
399 for(
ParticleIter p2 = p1 + 1; p2 != particles.end(); ++p2) {
407 const G4bool haveExcept = !except.empty();
410 for(
ParticleIter p1=particles.begin(), e=particles.end(); p1!=e; ++p1)
414 for(++p2; p2 != particles.end(); ++p2)
427 for(
ParticleIter iter=particles.begin(), e=particles.end(); iter!=e; ++iter) {
439 for(
ParticleIter i=particles.begin(), e=particles.end(); i!=e; ++i) {
447 #ifdef INCL_REGENERATE_AVATARS
448 void StandardPropagationModel::generateAllAvatarsExceptUpdated(
FinalState const *
const fs) {
451 for(
ParticleIter i=particles.begin(), e=particles.end(); i!=e; ++i) {
457 except.insert(except.end(), entering.begin(), entering.end());
464 for(
ParticleIter i=particles.begin(), e=particles.end(); i!=e; ++i) {
465 if((*i)->isDelta()) {
480 #ifdef INCL_REGENERATE_AVATARS
481 #warning "The INCL_REGENERATE_AVATARS code has not been tested in a while. Use it at your peril."
487 generateAllAvatarsExceptUpdated(fs);
503 if(created.empty() && entering.empty())
507 updatedParticlesCopy.insert(updatedParticlesCopy.end(), entering.begin(), entering.end());
508 updatedParticlesCopy.insert(updatedParticlesCopy.end(), created.begin(), created.end());
516 if(theAvatar == 0)
return 0;
G4int getA() const
Returns the baryon number.
G4double shootComposite(ParticleSpecies const &s, const G4double kineticEnergy, const G4double impactParameter, const G4double phi)
G4double shoot(ParticleSpecies const &projectileSpecies, const G4double kineticEnergy, const G4double impactParameter, const G4double phi)
void clearAvatars()
Clear avatars only.
void registerAvatar(G4INCL::IAvatar *anAvatar)
Add an avatar to the storage.
ParticleEntryAvatar * bringToSurface(Particle *p, Nucleus *const n)
Modify the momentum of an incoming particle and position it on the surface of the nucleus...
G4bool isResonance() const
Is it a resonance?
FinalStateValidity getValidity() const
void generateAllAvatars()
(Re)Generate all possible avatars.
G4double getMass() const
Get the cached particle mass.
void setIncomingAngularMomentum(const ThreeVector &j)
Set the incoming angular-momentum vector.
void setIncomingMomentum(const ThreeVector &p)
Set the incoming momentum vector.
G4ThreadLocal ParticleMassFn getTableParticleMass
Static pointer to the mass function for particles.
G4double dot(const ThreeVector &v) const
Dot product.
ParticleList const & getParticles() const
Return the list of "active" particles (i.e.
void transformToLocalEnergyFrame(Nucleus const *const n, Particle *const p)
G4int getAcceptedCollisions() const
ThreeVector getPropagationVelocity() const
Get the propagation velocity of the particle.
void setInitialEnergy(const G4double e)
Set the initial energy.
G4double squareTotalEnergyInCM(Particle const *const p1, Particle const *const p2)
ParticleList const & getModifiedParticles() const
void generateCollisions(const ParticleList &particles)
Generate and register collisions among particles in a list, except between those in another list...
IAvatar * findSmallestTime()
Find the avatar that has the smallest time.
const G4INCL::ThreeVector & getMomentum() const
Get the momentum vector.
G4INCL::IAvatar * propagate(FinalState const *const fs)
Propagate all particles and return the first avatar.
void setParticleNucleusCollision()
Set a particle-nucleus collision.
std::string print() const
void add(Particle *p)
Add one particle to the store.
G4double getReflectionTime(G4INCL::Particle const *const aParticle)
Get the reflection time.
void updateAvatars(const ParticleList &particles)
Update all avatars related to a particle.
void storeComponents()
Store the projectile components.
G4double getEnergy() const
Get the energy of the particle in MeV.
void setINCLMass()
Set the mass of the Particle to its table mass.
G4INCL::Nucleus * theNucleus
virtual void makeProjectileSpectator()
void propagate(G4double step)
G4double maxImpactParameter(ParticleSpecies const &p, const G4double kinE, Nucleus const *const n)
Return the maximum impact parameter for Coulomb-distorted trajectories.
void setNucleus(G4INCL::Nucleus *nucleus)
Set the nucleus for this propagation model.
G4double getSurfaceRadius(Particle const *const particle) const
Get the maximum allowed radius for a given particle.
G4bool isParticipant() const
ThreeVector boostVector() const
Returns a three vector we can give to the boost() -method.
void setStoppingTime(G4double)
Set the stopping time of the simulation.
G4double mag2() const
Get the square of the length.
G4double getTime(G4INCL::Particle const *const particleA, G4INCL::Particle const *const particleB, G4double *minDistOfApproach) const
Get the predicted time of the collision between two particles.
void setEnergy(G4double energy)
Set the energy of the particle in MeV.
Intersection getLaterTrajectoryIntersection(const ThreeVector &x0, const ThreeVector &p, const G4double r)
Compute the second intersection of a straight particle trajectory with a sphere.
G4INCL::ThreeVector getAngularMomentum() const
Get the total angular momentum (orbital + spin)
static G4double computeDecayTime(Particle *p)
void addParticleEntryAvatars(IAvatarList const &al)
Add one ParticleEntry avatar.
ParticleList const & getCreatedParticles() const
Static class for selecting Coulomb distortion.
Final state of an interaction.
Book & getBook()
Return the pointer to the Book object which keeps track of various counters.
LocalEnergyType theLocalEnergyDeltaType
ParticipantType getParticipantType() const
G4double getLargestNuclearRadius(const G4int A, const G4int Z)
static G4double getCutNNSquared()
virtual G4INCL::ThreeVector getAngularMomentum() const
Get the angular momentum w.r.t.
virtual void setPosition(const G4INCL::ThreeVector &position)
G4double getCurrentTime()
Returns the current global time of the system.
G4int getZ() const
Returns the charge number.
ThreeVector getTransversePosition() const
Transverse component of the position w.r.t.
IAvatar * generateBinaryCollisionAvatar(Particle *const p1, Particle *const p2)
Generate a two-particle avatar.
void generateDecays(const ParticleList &particles)
Generate decays for particles that can decay.
void addParticleEntryAvatar(IAvatar *a)
Add one ParticleEntry avatar.
G4INCL::Nucleus * getNucleus()
Get the nucleus.
G4double total(Particle const *const p1, Particle const *const p2)
G4double hadronizationTime
G4double energy(const ThreeVector &p, const G4double m)
G4ThreadLocal NuclearMassFn getTableMass
Static pointer to the mass function for nuclei.
StandardPropagationModel(LocalEnergyType localEnergyType, LocalEnergyType localEnergyDeltaType, const G4double hTime=0.0)
void setProjectileRemnant(ProjectileRemnant *const c)
Set the projectile remnant.
ParticleList const & getEnteringParticles() const
const G4INCL::ThreeVector & getPosition() const
Set the position vector.
G4bool isNucleon() const
Is this a nucleon?
void setCurrentTime(G4double t)
G4double getKineticEnergy() const
Get the particle kinetic energy.
virtual G4INCL::ParticleSpecies getSpecies() const
Get the particle species.
G4double getUniverseRadius() const
Getter for theUniverseRadius.
G4bool contains(const T &t) const
Intersection-point structure.
G4double mag() const
Get the length of the vector.
virtual ~StandardPropagationModel()
G4double shootParticle(ParticleType const t, const G4double kineticEnergy, const G4double impactParameter, const G4double phi)
void generateUpdatedCollisions(const ParticleList &updatedParticles, const ParticleList &particles)
Generate and register collisions between a list of updated particles and all the other particles...
G4bool isPion() const
Is this a pion?
const ThreeVector & adjustMomentumFromEnergy()
Rescale the momentum to match the total energy.
void setNucleusNucleusCollision()
Set a nucleus-nucleus collision.
G4double getStoppingTime()
Get the current stopping time.
void timeStep(G4double step)
Make one time step: propagate particles and subtract the length of the step from the avatar times...
void setPosition(const ThreeVector &position)
Set the position of the cluster.
ParticleList::const_iterator ParticleIter
Simple class for computing intersections between a straight line and a sphere.
LocalEnergyType theLocalEnergyType