34#define INCLXX_IN_GEANT4_MODE 1
108 theHelicity(rhs.theHelicity),
109 emissionTime(rhs.emissionTime),
110 outOfWell(rhs.outOfWell),
124 theBiasCollisionVector = rhs.theBiasCollisionVector;
153#ifdef INCLXX_IN_GEANT4_MODE
158 std::swap(theHelicity, rhs.theHelicity);
159 std::swap(emissionTime, rhs.emissionTime);
160 std::swap(outOfWell, rhs.outOfWell);
162 std::swap(theMass, rhs.theMass);
167 std::swap(theBiasCollisionVector, rhs.theBiasCollisionVector);
179 swap(temporaryParticle);
351 INCL_ERROR(
"Trying to set particle type to Unknown!" <<
'\n');
507 const G4double gamma = 1.0 / std::sqrt(1.0 - beta2);
509 const G4double alpha = (gamma*gamma)/(1.0 + gamma);
525 const G4double gamma = 1.0 / std::sqrt(1.0 - beta2);
527 const ThreeVector transversePosition = theRelativePosition - aBoostVector * (theRelativePosition.
dot(aBoostVector) / aBoostVector.
mag2());
528 const ThreeVector longitudinalPosition = theRelativePosition - transversePosition;
530 thePosition = refPos + transversePosition + longitudinalPosition / gamma;
583 INCL_ERROR(
"Particle::getINCLMass: Unknown particle type." <<
'\n');
636 INCL_ERROR(
"Particle::getTableMass: Unknown particle type." <<
'\n');
689 INCL_ERROR(
"Particle::getRealMass: Unknown particle type." <<
'\n');
716 const G4int SParent = 0;
719 const G4int SDaughter = 0;
729 theQValue = massTableParent - massTableDaughter - massTableParticle;
737 return theQValue - (massINCLParent-massINCLDaughter-massINCLParticle);
743 G4int ADaughter = AParent - 1;
747 ZDaughter = ZParent - 1;
758 theQValue = massTableParent - massTableDaughter - massTableParticle;
764 return theQValue - (massINCLParent-massINCLDaughter-massINCLParticle);
783 const G4int SFrom = 0;
785 const G4int AFromDaughter = AFrom -
theA;
786 const G4int ZFromDaughter = ZFrom -
theZ;
787 const G4int SFromDaughter = 0;
790 const G4int SToDaughter = 0;
803 return theQValue - (massINCLToDaughter-massINCLTo-massINCLParticle);
831 theQValue = massTableParent - massTableDaughter - massTableParticle;
839 return theQValue - (massINCLParent-massINCLDaughter-massINCLParticle);
860 const G4int AFromDaughter = AFrom -
theA;
861 const G4int ZFromDaughter = ZFrom -
theZ;
862 const G4int SFromDaughter = SFrom -
theS;
878 return theQValue - (massINCLToDaughter-massINCLTo-massINCLParticle);
894 return std::sqrt(mass);
920 this->theMass = mass;
970 thePosition += ((*thePropagationMomentum)*(step/(*thePropagationEnergy)));
1094 std::stringstream ss;
1095 ss <<
"Particle (ID = " <<
ID <<
") type = ";
1109 std::stringstream ss;
1110 ss <<
"(particle " <<
ID <<
" ";
1127 INCL_WARN(
"Particle::getParticles() method was called on a Particle object" <<
'\n');
1182 this->theBiasCollisionVector = BiasCollisionVector;
1196#ifdef INCLXX_IN_GEANT4_MODE
1217#ifdef INCLXX_IN_GEANT4_MODE
1249#ifdef INCLXX_IN_GEANT4_MODE
1260 std::vector<G4int> theBiasCollisionVector;
Singleton for recycling allocation of instances of a given class.
#define INCL_DECLARE_ALLOCATION_POOL(T)
#define INCLXX_IN_GEANT4_MODE
G4double getParticleListBias() const
std::vector< G4int > getParticleListBiasVector() const
void rotateMomentum(const G4double angle, const ThreeVector &axis) const
void boost(const ThreeVector &b) const
void rotatePosition(const G4double angle, const ThreeVector &axis) const
void rotatePositionAndMomentum(const G4double angle, const ThreeVector &axis) const
ThreeVector boostVector() const
G4double getINCLMass() const
Get the INCL particle mass.
G4bool isBaryon() const
Is this a Baryon?
G4bool isAntiBaryon() const
Is this an antiBaryon?
virtual G4INCL::ParticleSpecies getSpecies() const
Get the particle species.
void setPotentialEnergy(G4double v)
Set the particle potential energy.
ParticleList const * getParticles() const
G4bool isPhoton() const
Is this a photon?
G4INCL::ThreeVector * thePropagationMomentum
G4bool isLambda() const
Is this a Lambda?
G4int getS() const
Returns the strangeness number.
G4bool isAntiSigma() const
Is this an antiSigma?
G4bool isOutOfWell() const
Check if the particle is out of its potential well.
G4double getEmissionQValueCorrection(const G4int AParent, const G4int ZParent) const
Computes correction on the emission Q-value.
G4INCL::ThreeVector theMomentum
void setBiasCollisionVector(std::vector< G4int > BiasCollisionVector)
Set the vector list of biased vertices on the particle path.
void setNumberOfKaon(const G4int NK)
G4int theParentResonancePDGCode
void setParentResonancePDGCode(const G4int parentPDGCode)
G4bool isMeson() const
Is this a Meson?
virtual G4INCL::ThreeVector getAngularMomentum() const
void setFrozenMomentum(const ThreeVector &momentum)
Set the frozen particle momentum.
G4double getFrozenEnergy() const
Get the frozen particle momentum.
void setUncorrelatedMomentum(const G4double p)
Set the uncorrelated momentum.
G4double getEnergy() const
G4double getPotentialEnergy() const
Get the particle potential energy.
G4bool isStrange() const
Is this a Strange?
void incrementNumberOfDecays()
Increment the number of decays undergone by the particle.
G4bool isEtaPrime() const
Is this an etaprime?
static std::vector< G4double > INCLBiasVector
Time ordered vector of all bias applied.
void rpCorrelate()
Make the particle follow a strict r-p correlation.
void setMass(G4double mass)
G4bool isNucleonorLambda() const
Is this a Nucleon or a Lambda?
G4int theParentResonanceID
G4bool isOmega() const
Is this an omega?
void lorentzContract(const ThreeVector &aBoostVector, const ThreeVector &refPos)
Lorentz-contract the particle position around some center.
virtual void makeTargetSpectator()
ParticipantType getParticipantType() const
void setHelicity(G4double h)
void setFrozenEnergy(const G4double energy)
Set the frozen particle momentum.
G4bool isAntiHyperon() const
Is this an antiHyperon?
ThreeVector getPropagationVelocity() const
Get the propagation velocity of the particle.
G4double thePotentialEnergy
virtual void rotatePositionAndMomentum(const G4double angle, const ThreeVector &axis)
Rotate the particle position and momentum.
void setParticipantType(ParticipantType const p)
ParticipantType theParticipantType
void propagate(G4double step)
G4int getZ() const
Returns the charge number.
static void FillINCLBiasVector(G4double newBias)
G4bool isSigma() const
Is this a Sigma?
const G4INCL::ThreeVector & getPosition() const
void setParticleBias(G4double ParticleBias)
Set the particle bias.
G4bool isParticipant() const
void setParentResonanceID(const G4int parentID)
G4double getKineticEnergy() const
Get the particle kinetic energy.
G4bool isAntiXi() const
Is this an antiXi?
G4INCL::ParticleType theType
Particle(const Particle &rhs)
Copy constructor.
G4double getReflectionMomentum() const
Return the reflection momentum.
G4bool isTargetSpectator() const
static std::vector< G4int > MergeVectorBias(Particle const *const p1, Particle const *const p2)
virtual void rotateMomentum(const G4double angle, const ThreeVector &axis)
Rotate the particle momentum.
G4bool isAntiNucleon() const
Is this an antinucleon?
G4int theNKaon
The number of Kaons inside the nucleus (update during the cascade)
G4double getCosRPAngle() const
Get the cosine of the angle between position and momentum.
std::vector< G4int > getBiasCollisionVector() const
Get the vector list of biased vertices on the particle path.
void setEmissionTime(G4double t)
ThreeVector getLongitudinalPosition() const
Longitudinal component of the position w.r.t. the momentum.
G4int getNumberOfCollisions() const
Return the number of collisions undergone by the particle.
G4bool isEta() const
Is this an eta?
G4double getEmissionPbarQvalueCorrection(const G4int AParent, const G4int ZParent, const G4bool Victim) const
virtual void makeProjectileSpectator()
G4double adjustEnergyFromMomentum()
Recompute the energy to match the momentum.
static void setINCLBiasVector(std::vector< G4double > NewVector)
static G4double getTotalBias()
General bias vector function.
virtual void rotatePosition(const G4double angle, const ThreeVector &axis)
Rotate the particle position.
G4double getParticleBias() const
Get the particle bias.
void setNumberOfDecays(G4int n)
Set the number of decays undergone by the particle.
G4int getNumberOfDecays() const
Return the number of decays undergone by the particle.
G4bool isXi() const
Is this a Xi?
const ThreeVector & adjustMomentumFromEnergy()
Rescale the momentum to match the total energy.
G4bool isPion() const
Is this a pion?
void setINCLMass()
Set the mass of the Particle to its table mass.
G4bool isAntiNucleonorAntiLambda() const
Is this an antiNucleon or an antiLambda?
void incrementNumberOfCollisions()
Increment the number of collisions 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.
ThreeVector getFrozenMomentum() const
Get the frozen particle momentum.
G4double getRealMass() const
Get the real particle mass.
G4double uncorrelatedMomentum
G4bool isProjectileSpectator() const
G4bool isAntiKaon() const
Is this an antiKaon?
const G4INCL::ThreeVector & getMomentum() const
void rpDecorrelate()
Make the particle not follow a strict r-p correlation.
Particle & operator=(const Particle &rhs)
Assignment operator.
virtual void setMomentum(const G4INCL::ThreeVector &momentum)
G4bool isAntiLambda() const
Is this an antiLambda?
G4INCL::ParticleType getType() const
G4bool isKaon() const
Is this a Kaon?
G4int getNumberOfKaon() const
Number of Kaon inside de nucleus.
void thawPropagation()
Unfreeze particle propagation.
virtual G4double getTableMass() const
Get the tabulated particle mass.
G4double getEmissionQValueCorrection(const G4int AParent, const G4int ZParent, const G4int SParent) const
Computes correction on the emission Q-value for hypernuclei.
G4double getInvariantMass() const
Get the the particle invariant mass.
G4double getEmissionTime()
virtual void makeParticipant()
G4bool isResonance() const
Is it a resonance?
void setEnergy(G4double energy)
void setType(ParticleType t)
std::string print() const
ThreeVector getTransversePosition() const
Transverse component of the position w.r.t. the momentum.
G4double getMass() const
Get the cached particle mass.
void boost(const ThreeVector &aBoostVector)
static G4ThreadLocal G4int nextBiasedCollisionID
virtual void setPosition(const G4INCL::ThreeVector &position)
void setTableMass()
Set the mass of the Particle to its table mass.
void setOutOfWell()
Mark the particle as out of its potential well.
void swap(Particle &rhs)
Helper method for the assignment operator.
G4double * thePropagationEnergy
G4bool isDelta() const
Is it a Delta?
void freezePropagation()
Freeze particle propagation.
G4int getParentResonancePDGCode() const
void setRealMass()
Set the mass of the Particle to its real mass.
static G4double getBiasFromVector(std::vector< G4int > VectorBias)
G4int getA() const
Returns the baryon number.
G4bool isHyperon() const
Is this an Hyperon?
G4int getParentResonanceID() const
G4INCL::ThreeVector thePosition
G4INCL::ThreeVector theFrozenMomentum
void setNumberOfCollisions(G4int n)
Set the number of collisions undergone by the particle.
G4double getTransferQValueCorrection(const G4int AFrom, const G4int ZFrom, const G4int SFrom, const G4int ATo, const G4int ZTo, const G4int STo) const
Computes correction on the transfer Q-value for hypernuclei.
std::string print() const
void rotate(const G4double angle, const ThreeVector &axis)
Rotate the vector by a given angle around a given axis.
G4double dot(const ThreeVector &v) const
ThreeVector vector(const ThreeVector &v) const
G4ThreadLocal NuclearMassFn getTableMass
Static pointer to the mass function for nuclei.
G4double getTableQValue(const G4int A1, const G4int Z1, const G4int S1, const G4int A2, const G4int Z2, const G4int S2)
Get Q-value (in MeV/c^2)
G4ThreadLocal ParticleMassFn getTableParticleMass
Static pointer to the mass function for particles.
G4double getRealMass(const G4INCL::ParticleType t)
Get particle mass (in MeV/c^2)
G4double getINCLMass(const G4int A, const G4int Z, const G4int S)
Get INCL nuclear mass (in MeV/c^2)
std::string getName(const ParticleType t)
Get the native INCL name of the particle.
ParticleList::iterator ParticleMutableIter
ParticleList::const_iterator ParticleIter