34#define INCLXX_IN_GEANT4_MODE 1
109 theHelicity(rhs.theHelicity),
110 emissionTime(rhs.emissionTime),
111 outOfWell(rhs.outOfWell),
112 theSrcPartner(rhs.theSrcPartner),
126 theBiasCollisionVector = rhs.theBiasCollisionVector;
156#ifdef INCLXX_IN_GEANT4_MODE
161 std::swap(theHelicity, rhs.theHelicity);
162 std::swap(emissionTime, rhs.emissionTime);
163 std::swap(outOfWell, rhs.outOfWell);
164 std::swap(theSrcPartner, rhs.theSrcPartner);
166 std::swap(theMass, rhs.theMass);
171 std::swap(theBiasCollisionVector, rhs.theBiasCollisionVector);
183 swap(temporaryParticle);
360 INCL_ERROR(
"Trying to set particle type to Unknown!" <<
'\n');
519 const G4double gamma = 1.0 / std::sqrt(1.0 - beta2);
521 const G4double alpha = (gamma*gamma)/(1.0 + gamma);
537 const G4double gamma = 1.0 / std::sqrt(1.0 - beta2);
539 const ThreeVector transversePosition = theRelativePosition - aBoostVector * (theRelativePosition.
dot(aBoostVector) / aBoostVector.
mag2());
540 const ThreeVector longitudinalPosition = theRelativePosition - transversePosition;
542 thePosition = refPos + transversePosition + longitudinalPosition / gamma;
598 INCL_ERROR(
"Particle::getINCLMass: Unknown particle type." <<
'\n');
654 INCL_ERROR(
"Particle::getTableMass: Unknown particle type." <<
'\n');
710 INCL_ERROR(
"Particle::getRealMass: Unknown particle type." <<
'\n');
737 const G4int SParent = 0;
740 const G4int SDaughter = 0;
750 theQValue = massTableParent - massTableDaughter - massTableParticle;
758 return theQValue - (massINCLParent-massINCLDaughter-massINCLParticle);
777 const G4int SFrom = 0;
779 const G4int AFromDaughter = AFrom -
theA;
780 const G4int ZFromDaughter = ZFrom -
theZ;
781 const G4int SFromDaughter = 0;
784 const G4int SToDaughter = 0;
797 return theQValue - (massINCLToDaughter-massINCLTo-massINCLParticle);
825 theQValue = massTableParent - massTableDaughter - massTableParticle;
833 return theQValue - (massINCLParent-massINCLDaughter-massINCLParticle);
854 const G4int AFromDaughter = AFrom -
theA;
855 const G4int ZFromDaughter = ZFrom -
theZ;
856 const G4int SFromDaughter = SFrom -
theS;
872 return theQValue - (massINCLToDaughter-massINCLTo-massINCLParticle);
888 return std::sqrt(mass);
914 this->theMass = mass;
964 thePosition += ((*thePropagationMomentum)*(step/(*thePropagationEnergy)));
1098 std::stringstream ss;
1099 ss <<
"Particle (ID = " <<
ID <<
") type = ";
1115 std::stringstream ss;
1116 ss <<
"(particle " <<
ID <<
" ";
1134 INCL_WARN(
"Particle::getParticles() method was called on a Particle object" <<
'\n');
1189 this->theBiasCollisionVector = BiasCollisionVector;
1203#ifdef INCLXX_IN_GEANT4_MODE
1224#ifdef INCLXX_IN_GEANT4_MODE
1257#ifdef INCLXX_IN_GEANT4_MODE
1269 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 setNumberOfSrcPair(int n)
Set the number of srcpairs.
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?
G4int getSrcPair() const
Returns the strangeness number.
void incrementNumberOfDecays()
Increment the number of decays undergone by the particle.
G4bool isEtaPrime() const
Is this an etaprime?
void setSrcPartner()
Set and reset src partner.
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?
G4bool isSrcPartner() const
Check if the particle is a src partner.
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.
G4double dot(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
const axis_t axis_to_type< N >::axis