34 #define INCLXX_IN_GEANT4_MODE 1
163 swap(temporaryParticle);
285 INCL_ERROR(
"Trying to set particle type to Unknown!" <<
'\n');
417 const G4double gamma = 1.0 / std::sqrt(1.0 - beta2);
435 const G4double gamma = 1.0 / std::sqrt(1.0 - beta2);
437 const ThreeVector transversePosition = theRelativePosition - aBoostVector * (theRelativePosition.
dot(aBoostVector) / aBoostVector.
mag2());
438 const ThreeVector longitudinalPosition = theRelativePosition - transversePosition;
440 thePosition = refPos + transversePosition + longitudinalPosition / gamma;
483 INCL_ERROR(
"Particle::getINCLMass: Unknown particle type." <<
'\n');
526 INCL_ERROR(
"Particle::getTableMass: Unknown particle type." <<
'\n');
569 INCL_ERROR(
"Particle::getRealMass: Unknown particle type." <<
'\n');
607 theQValue = massTableParent - massTableDaughter - massTableParticle;
615 return theQValue - (massINCLParent-massINCLDaughter-massINCLParticle);
634 const G4int AFromDaughter = AFrom -
theA;
635 const G4int ZFromDaughter = ZFrom -
theZ;
650 return theQValue - (massINCLToDaughter-massINCLTo-massINCLParticle);
664 return std::sqrt(mass);
740 thePosition += ((*thePropagationMomentum)*(step/(*thePropagationEnergy)));
864 std::stringstream
ss;
865 ss <<
"Particle (ID = " <<
ID <<
") type = ";
879 std::stringstream
ss;
880 ss <<
"(particle " <<
ID <<
" ";
897 INCL_WARN(
"Particle::getParticles() method was called on a Particle object" <<
'\n');
970 #ifdef INCLXX_IN_GEANT4_MODE
std::vector< G4int > getBiasCollisionVector() const
Get the vector list of biased vertices on the particle path.
ParticleList::const_iterator ParticleIter
void rotatePositionAndMomentum(const G4double angle, const ThreeVector &axis) const
virtual G4double getTableMass() const
Get the tabulated particle mass.
G4bool isNucleonorLambda() const
Is this a Nucleon or a Lambda?
void propagate(G4double step)
const G4INCL::ThreeVector & getPosition() const
void thawPropagation()
Unfreeze particle propagation.
virtual G4INCL::ParticleSpecies getSpecies() const
Get the particle species.
G4double * thePropagationEnergy
G4double getCosRPAngle() const
Get the cosine of the angle between position and momentum.
void incrementNumberOfCollisions()
Increment the number of collisions undergone by the particle.
ThreeVector vector(const ThreeVector &v) const
G4double getEnergy() const
const ThreeVector & adjustMomentumFromEnergy()
Rescale the momentum to match the total energy.
ThreeVector getFrozenMomentum() const
Get the frozen particle momentum.
void freezePropagation()
Freeze particle propagation.
void rpDecorrelate()
Make the particle not follow a strict r-p correlation.
void setTableMass()
Set the mass of the Particle to its table mass.
static std::vector< G4double > INCLBiasVector
Time ordered vector of all bias applied.
#define INCL_DECLARE_ALLOCATION_POOL(T)
G4double getKineticEnergy() const
Get the particle kinetic energy.
static void FillINCLBiasVector(G4double newBias)
void setMass(G4double mass)
G4bool isOmega() const
Is this an omega?
const G4INCL::ThreeVector & getMomentum() const
G4int getS() const
Returns the strangeness number.
G4INCL::ThreeVector theMomentum
G4INCL::ThreeVector theFrozenMomentum
void setNumberOfCollisions(G4int n)
Set the number of collisions undergone by the particle.
G4double dot(const ThreeVector &v) const
ParticleList const * getParticles() const
ParticipantType theParticipantType
ThreeVector getPropagationVelocity() const
Get the propagation velocity of the particle.
void setINCLMass()
Set the mass of the Particle to its table mass.
G4double uncorrelatedMomentum
G4bool isHyperon() const
Is this an Hyperon?
G4double getMass() const
Get the cached particle mass.
G4bool isSigma() const
Is this a Sigma?
virtual void makeTargetSpectator()
void setParticipantType(ParticipantType const p)
void setBiasCollisionVector(std::vector< G4int > BiasCollisionVector)
Set the vector list of biased vertices on the particle path.
G4bool isResonance() const
Is it a resonance?
static G4double getBiasFromVector(std::vector< G4int > VectorBias)
void setHelicity(G4double h)
void boost(const ThreeVector &b) const
G4bool isOutOfWell() const
Check if the particle is out of its potential well.
G4bool isLambda() const
Is this a Lambda?
G4double getRealMass(const G4INCL::ParticleType t)
Get particle mass (in MeV/c^2)
G4double getTransferQValueCorrection(const G4int AFrom, const G4int ZFrom, const G4int ATo, const G4int ZTo) const
Computes correction on the transfer Q-value.
static G4double getTotalBias()
General bias vector function.
G4bool isBaryon() const
Is this a Baryon?
void rotatePosition(const G4double angle, const ThreeVector &axis) const
G4double getEmissionTime()
G4INCL::ParticleType theType
G4double getPotentialEnergy() const
Get the particle potential energy.
G4bool isDelta() const
Is it a Delta?
G4ThreadLocal NuclearMassFn getTableMass
Static pointer to the mass function for nuclei.
std::string print() const
virtual void rotatePositionAndMomentum(const G4double angle, const ThreeVector &axis)
Rotate the particle position and momentum.
G4int getNumberOfDecays() const
Return the number of decays undergone by the particle.
virtual void setPosition(const G4INCL::ThreeVector &position)
void rotate(const G4double angle, const ThreeVector &axis)
Rotate the vector by a given angle around a given axis.
G4double getInvariantMass() const
Get the the particle invariant mass.
static std::vector< G4int > MergeVectorBias(Particle const *const p1, Particle const *const p2)
G4double getReflectionMomentum() const
Return the reflection momentum.
G4double getINCLMass(const G4int A, const G4int Z)
Get INCL nuclear mass (in MeV/c^2)
G4bool isPhoton() const
Is this a photon?
static const G4double alpha
virtual void rotateMomentum(const G4double angle, const ThreeVector &axis)
Rotate the particle momentum.
G4INCL::ThreeVector thePosition
G4double thePotentialEnergy
void setPotentialEnergy(G4double v)
Set the particle potential energy.
std::string print() const
G4int getZ() const
Returns the charge number.
void setRealMass()
Set the mass of the Particle to its real mass.
void setFrozenEnergy(const G4double energy)
Set the frozen particle momentum.
Singleton for recycling allocation of instances of a given class.
G4int getA() const
Returns the baryon number.
void rpCorrelate()
Make the particle follow a strict r-p correlation.
void setType(ParticleType t)
G4bool isParticipant() const
G4bool isTargetSpectator() const
std::string getName(const ParticleType t)
Get the native INCL name of the particle.
G4double getINCLMass() const
Get the INCL particle mass.
virtual void rotatePosition(const G4double angle, const ThreeVector &axis)
Rotate the particle position.
virtual void setMomentum(const G4INCL::ThreeVector &momentum)
void swap(Particle &rhs)
Helper method for the assignment operator.
void incrementNumberOfDecays()
Increment the number of decays undergone by the particle.
void setParticleBias(G4double ParticleBias)
Set the particle bias.
std::vector< G4int > theBiasCollisionVector
Time ordered vector of all biased vertices on the particle path.
Particle(const Particle &rhs)
Copy constructor.
static void setINCLBiasVector(std::vector< G4double > NewVector)
virtual void makeParticipant()
G4double getRealMass() const
Get the real particle mass.
G4double getTableQValue(const G4int A1, const G4int Z1, const G4int A2, const G4int Z2)
Get Q-value (in MeV/c^2)
ThreeVector getLongitudinalPosition() const
Longitudinal component of the position w.r.t. the momentum.
virtual void makeProjectileSpectator()
G4int getNumberOfCollisions() const
Return the number of collisions undergone by the particle.
void lorentzContract(const ThreeVector &aBoostVector, const ThreeVector &refPos)
Lorentz-contract the particle position around some center.
G4bool isMeson() const
Is this a Meson?
void setUncorrelatedMomentum(const G4double p)
Set the uncorrelated momentum.
G4INCL::ParticleType getType() const
void boost(const ThreeVector &aBoostVector)
G4bool isKaon() const
Is this a Kaon?
G4double getEmissionQValueCorrection(const G4int AParent, const G4int ZParent) const
Computes correction on the emission Q-value.
void setEnergy(G4double energy)
G4bool isEta() const
Is this an eta?
G4double adjustEnergyFromMomentum()
Recompute the energy to match the momentum.
void setNumberOfDecays(G4int n)
Set the number of decays undergone by the particle.
G4bool isPion() const
Is this a pion?
static G4ThreadLocal long nextID
static G4ThreadLocal G4int nextBiasedCollisionID
G4INCL::ThreeVector * thePropagationMomentum
G4bool isAntiKaon() const
Is this an antiKaon?
Particle & operator=(const Particle &rhs)
Assignment operator.
virtual G4INCL::ThreeVector getAngularMomentum() const
void setEmissionTime(G4double t)
G4bool isStrange() const
Is this an Strange?
void setFrozenMomentum(const ThreeVector &momentum)
Set the frozen particle momentum.
G4bool isProjectileSpectator() const
G4ThreadLocal ParticleMassFn getTableParticleMass
Static pointer to the mass function for particles.
G4double getParticleBias() const
Get the particle bias.
void setOutOfWell()
Mark the particle as out of its potential well.
ThreeVector getTransversePosition() const
Transverse component of the position w.r.t. the momentum.
G4double getFrozenEnergy() const
Get the frozen particle momentum.
G4bool isEtaPrime() const
Is this an etaprime?
ThreeVector boostVector() const
G4double getParticleListBias() const
ParticleList::iterator ParticleMutableIter
ParticipantType getParticipantType() const
std::vector< G4int > getParticleListBiasVector() const
void rotateMomentum(const G4double angle, const ThreeVector &axis) const