34 #define INCLXX_IN_GEANT4_MODE 1
99 theHelicity(rhs.theHelicity),
100 emissionTime(rhs.emissionTime),
101 outOfWell(rhs.outOfWell),
141 std::swap(theHelicity, rhs.theHelicity);
142 std::swap(emissionTime, rhs.emissionTime);
143 std::swap(outOfWell, rhs.outOfWell);
145 std::swap(theMass, rhs.theMass);
158 swap(temporaryParticle);
221 INCL_ERROR(
"Trying to set particle type to Unknown!" <<
'\n');
321 const G4double gamma = 1.0 / std::sqrt(1.0 - beta2);
339 const G4double gamma = 1.0 / std::sqrt(1.0 - beta2);
341 const ThreeVector transversePosition = theRelativePosition - aBoostVector * (theRelativePosition.
dot(aBoostVector) / aBoostVector.
mag2());
342 const ThreeVector longitudinalPosition = theRelativePosition - transversePosition;
344 thePosition = refPos + transversePosition + longitudinalPosition / gamma;
377 INCL_ERROR(
"Particle::getINCLMass: Unknown particle type." <<
'\n');
410 INCL_ERROR(
"Particle::getTableMass: Unknown particle type." <<
'\n');
443 INCL_ERROR(
"Particle::getRealMass: Unknown particle type." <<
'\n');
481 theQValue = massTableParent - massTableDaughter - massTableParticle;
489 return theQValue - (massINCLParent-massINCLDaughter-massINCLParticle);
508 const G4int AFromDaughter = AFrom -
theA;
509 const G4int ZFromDaughter = ZFrom -
theZ;
524 return theQValue - (massINCLToDaughter-massINCLTo-massINCLParticle);
538 return std::sqrt(mass);
564 this->theMass = mass;
614 thePosition += ((*thePropagationMomentum)*(step/(*thePropagationEnergy)));
738 std::stringstream ss;
739 ss <<
"Particle (ID = " <<
ID <<
") type = ";
753 std::stringstream ss;
754 ss <<
"(particle " <<
ID <<
" ";
771 INCL_WARN(
"Particle::getParticles() method was called on a Particle object" <<
'\n');
G4bool isEta() const
Is this a eta?
G4int getA() const
Returns the baryon number.
ParticipantType theParticipantType
void rotatePosition(const G4double angle, const ThreeVector &axis) const
#define INCL_DECLARE_ALLOCATION_POOL(T)
void setParticipantType(ParticipantType const p)
G4double getCosRPAngle() const
Get the cosine of the angle between position and momentum.
G4int getNumberOfCollisions() const
Return the number of collisions undergone by the particle.
void setMass(G4double mass)
G4bool isResonance() const
Is it a resonance?
virtual void makeTargetSpectator()
G4double getReflectionMomentum() const
Return the reflection momentum.
G4double getMass() const
Get the cached particle mass.
G4double * thePropagationEnergy
G4ThreadLocal ParticleMassFn getTableParticleMass
Static pointer to the mass function for particles.
G4double dot(const ThreeVector &v) const
void rotate(const G4double angle, const ThreeVector &axis)
Rotate the vector by a given angle around a given axis.
G4double getEmissionTime()
ThreeVector getPropagationVelocity() const
Get the propagation velocity of the particle.
void setEmissionTime(G4double t)
G4INCL::ThreeVector theFrozenMomentum
G4double getTableQValue(const G4int A1, const G4int Z1, const G4int A2, const G4int Z2)
Get Q-value (in MeV/c^2)
G4bool isTargetSpectator() const
virtual void rotatePosition(const G4double angle, const ThreeVector &axis)
Rotate the particle position.
void boost(const ThreeVector &aBoostVector)
const G4INCL::ThreeVector & getMomentum() const
G4double adjustEnergyFromMomentum()
Recompute the energy to match the momentum.
G4bool isDelta() const
Is it a Delta?
std::string print() const
static G4double angle[DIM]
G4double getEnergy() const
G4bool isEtaPrime() const
Is this a etaprime?
void setINCLMass()
Set the mass of the Particle to its table mass.
void thawPropagation()
Unfreeze particle propagation.
virtual void makeProjectileSpectator()
void propagate(G4double step)
Singleton for recycling allocation of instances of a given class.
void setOutOfWell()
Mark the particle as out of its potential well.
G4double getINCLMass() const
Get the INCL particle mass.
void incrementNumberOfCollisions()
Increment the number of collisions undergone by the particle.
virtual void rotateMomentum(const G4double angle, const ThreeVector &axis)
Rotate the particle momentum.
G4bool isParticipant() const
void setUncorrelatedMomentum(const G4double p)
Set the uncorrelated momentum.
G4double uncorrelatedMomentum
ThreeVector boostVector() const
ThreeVector vector(const ThreeVector &v) const
G4double getPotentialEnergy() const
Get the particle potential energy.
ParticleList const * getParticles() const
void incrementNumberOfDecays()
Increment the number of decays undergone by the particle.
G4double getInvariantMass() const
Get the the particle invariant mass.
void rpCorrelate()
Make the particle follow a strict r-p correlation.
void setEnergy(G4double energy)
void boost(const ThreeVector &b) const
G4double getRealMass(const G4INCL::ParticleType t)
Get particle mass (in MeV/c^2)
G4bool isOmega() const
Is this a omega?
void rpDecorrelate()
Make the particle not follow a strict r-p correlation.
void setNumberOfDecays(G4int n)
Set the number of decays undergone by the particle.
G4double getTransferQValueCorrection(const G4int AFrom, const G4int ZFrom, const G4int ATo, const G4int ZTo) const
Computes correction on the transfer Q-value.
ParticipantType getParticipantType() const
void lorentzContract(const ThreeVector &aBoostVector, const ThreeVector &refPos)
Lorentz-contract the particle position around some center.
virtual G4INCL::ThreeVector getAngularMomentum() const
virtual void setPosition(const G4INCL::ThreeVector &position)
G4int getZ() const
Returns the charge number.
void setPotentialEnergy(G4double v)
Set the particle potential energy.
G4bool isOutOfWell() const
Check if the particle is out of its potential well.
G4INCL::ThreeVector thePosition
ThreeVector getFrozenMomentum() const
Get the frozen particle momentum.
ThreeVector getTransversePosition() const
Transverse component of the position w.r.t. the momentum.
Particle(const Particle &rhs)
Copy constructor.
G4INCL::ParticleType theType
void setFrozenMomentum(const ThreeVector &momentum)
Set the frozen particle momentum.
G4double getINCLMass(const G4int A, const G4int Z)
Get INCL nuclear mass (in MeV/c^2)
G4int getNumberOfDecays() const
Return the number of decays undergone by the particle.
G4INCL::ParticleType getType() const
G4double energy(const ThreeVector &p, const G4double m)
G4ThreadLocal NuclearMassFn getTableMass
Static pointer to the mass function for nuclei.
void setTableMass()
Set the mass of the Particle to its table mass.
const G4INCL::ThreeVector & getPosition() const
void setRealMass()
Set the mass of the Particle to its real mass.
void swap(Particle &rhs)
Helper method for the assignment operator.
G4bool isProjectileSpectator() const
void setType(ParticleType t)
void setNumberOfCollisions(G4int n)
Set the number of collisions undergone by the particle.
Particle & operator=(const Particle &rhs)
Assignment operator.
void rotatePositionAndMomentum(const G4double angle, const ThreeVector &axis) const
G4INCL::ThreeVector theMomentum
virtual G4double getTableMass() const
Get the tabulated particle mass.
std::string print() const
G4double getKineticEnergy() const
Get the particle kinetic energy.
virtual G4INCL::ParticleSpecies getSpecies() const
Get the particle species.
G4double getRealMass() const
Get the real particle mass.
virtual void makeParticipant()
G4double getEmissionQValueCorrection(const G4int AParent, const G4int ZParent) const
Computes correction on the emission Q-value.
void rotateMomentum(const G4double angle, const ThreeVector &axis) const
G4INCL::ThreeVector * thePropagationMomentum
static const G4double alpha
G4bool isPion() const
Is this a pion?
const ThreeVector & adjustMomentumFromEnergy()
Rescale the momentum to match the total energy.
ParticleList::iterator ParticleMutableIter
virtual void rotatePositionAndMomentum(const G4double angle, const ThreeVector &axis)
Rotate the particle position and momentum.
G4double thePotentialEnergy
ThreeVector getLongitudinalPosition() const
Longitudinal component of the position w.r.t. the momentum.
ParticleList::const_iterator ParticleIter
std::string getName(const ParticleType t)
Get the native INCL name of the particle.
void setHelicity(G4double h)
virtual void setMomentum(const G4INCL::ThreeVector &momentum)
void setFrozenEnergy(const G4double energy)
Set the frozen particle momentum.
void freezePropagation()
Freeze particle propagation.
G4double getFrozenEnergy() const
Get the frozen particle momentum.