Geant4  10.00.p04
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Particle Class Reference
Inheritance diagram for Particle:
Cluster Nucleus ProjectileRemnant

Public Member Functions

 Particle ()
 
 Particle (ParticleType t, G4double energy, ThreeVector const &momentum, ThreeVector const &position)
 
 Particle (ParticleType t, ThreeVector const &momentum, ThreeVector const &position)
 
virtual ~Particle ()
 
 Particle (const Particle &rhs)
 Copy constructor. More...
 
Particleoperator= (const Particle &rhs)
 Assignment operator. More...
 
G4INCL::ParticleType getType () const
 
virtual G4INCL::ParticleSpecies getSpecies () const
 Get the particle species. More...
 
void setType (ParticleType t)
 
G4bool isNucleon () const
 
ParticipantType getParticipantType () const
 
void setParticipantType (ParticipantType const p)
 
G4bool isParticipant () const
 
G4bool isTargetSpectator () const
 
G4bool isProjectileSpectator () const
 
virtual void makeParticipant ()
 
virtual void makeTargetSpectator ()
 
virtual void makeProjectileSpectator ()
 
G4bool isPion () const
 Is this a pion? More...
 
G4bool isResonance () const
 Is it a resonance? More...
 
G4bool isDelta () const
 Is it a Delta? More...
 
G4int getA () const
 Returns the baryon number. More...
 
G4int getZ () const
 Returns the charge number. More...
 
G4double getBeta () const
 
ThreeVector boostVector () const
 
void boost (const ThreeVector &aBoostVector)
 
void lorentzContract (const ThreeVector &aBoostVector, const ThreeVector &refPos)
 Lorentz-contract the particle position around some center. More...
 
G4double getMass () const
 Get the cached particle mass. More...
 
G4double getINCLMass () const
 Get the INCL particle mass. More...
 
virtual G4double getTableMass () const
 Get the tabulated particle mass. More...
 
G4double getRealMass () const
 Get the real particle mass. More...
 
void setRealMass ()
 Set the mass of the Particle to its real mass. More...
 
void setTableMass ()
 Set the mass of the Particle to its table mass. More...
 
void setINCLMass ()
 Set the mass of the Particle to its table mass. More...
 
G4double getEmissionQValueCorrection (const G4int AParent, const G4int ZParent) const
 Computes correction on the emission Q-value. More...
 
G4double getTransferQValueCorrection (const G4int AFrom, const G4int ZFrom, const G4int ATo, const G4int ZTo) const
 Computes correction on the transfer Q-value. More...
 
G4double getInvariantMass () const
 Get the the particle invariant mass. More...
 
G4double getKineticEnergy () const
 Get the particle kinetic energy. More...
 
G4double getPotentialEnergy () const
 Get the particle potential energy. More...
 
void setPotentialEnergy (G4double v)
 Set the particle potential energy. More...
 
G4double getEnergy () const
 
void setMass (G4double mass)
 
void setEnergy (G4double energy)
 
const G4INCL::ThreeVectorgetMomentum () const
 
virtual G4INCL::ThreeVector getAngularMomentum () const
 
virtual void setMomentum (const G4INCL::ThreeVector &momentum)
 
const G4INCL::ThreeVectorgetPosition () const
 
virtual void setPosition (const G4INCL::ThreeVector &position)
 
G4double getHelicity ()
 
void setHelicity (G4double h)
 
void propagate (G4double step)
 
G4int getNumberOfCollisions () const
 Return the number of collisions undergone by the particle. More...
 
void setNumberOfCollisions (G4int n)
 Set the number of collisions undergone by the particle. More...
 
void incrementNumberOfCollisions ()
 Increment the number of collisions undergone by the particle. More...
 
G4int getNumberOfDecays () const
 Return the number of decays undergone by the particle. More...
 
void setNumberOfDecays (G4int n)
 Set the number of decays undergone by the particle. More...
 
void incrementNumberOfDecays ()
 Increment the number of decays undergone by the particle. More...
 
void setOutOfWell ()
 Mark the particle as out of its potential well. More...
 
G4bool isOutOfWell () const
 Check if the particle is out of its potential well. More...
 
void setEmissionTime (G4double t)
 
G4double getEmissionTime ()
 
ThreeVector getTransversePosition () const
 Transverse component of the position w.r.t. the momentum. More...
 
ThreeVector getLongitudinalPosition () const
 Longitudinal component of the position w.r.t. the momentum. More...
 
const ThreeVectoradjustMomentumFromEnergy ()
 Rescale the momentum to match the total energy. More...
 
G4double adjustEnergyFromMomentum ()
 Recompute the energy to match the momentum. More...
 
G4bool isInList (ParticleList const &l) const
 Check if the particle belongs to a given list. More...
 
G4bool isCluster () const
 
void setFrozenMomentum (const ThreeVector &momentum)
 Set the frozen particle momentum. More...
 
void setFrozenEnergy (const G4double energy)
 Set the frozen particle momentum. More...
 
ThreeVector getFrozenMomentum () const
 Get the frozen particle momentum. More...
 
G4double getFrozenEnergy () const
 Get the frozen particle momentum. More...
 
ThreeVector getPropagationVelocity () const
 Get the propagation velocity of the particle. More...
 
void freezePropagation ()
 Freeze particle propagation. More...
 
void thawPropagation ()
 Unfreeze particle propagation. More...
 
virtual void rotate (const G4double angle, const ThreeVector &axis)
 Rotate the particle position and momentum. More...
 
std::string print () const
 
std::string dump () const
 
long getID () const
 
ParticleList constgetParticles () const
 
G4double getReflectionMomentum () const
 Return the reflection momentum. More...
 
void setUncorrelatedMomentum (const G4double p)
 Set the uncorrelated momentum. More...
 
void rpCorrelate ()
 Make the particle follow a strict r-p correlation. More...
 
void rpDecorrelate ()
 Make the particle not follow a strict r-p correlation. More...
 
G4double getCosRPAngle () const
 Get the cosine of the angle between position and momentum. More...
 

Protected Member Functions

void swap (Particle &rhs)
 Helper method for the assignment operator. More...
 

Protected Attributes

G4int theZ
 
G4int theA
 
ParticipantType theParticipantType
 
G4INCL::ParticleType theType
 
G4double theEnergy
 
G4doublethePropagationEnergy
 
G4double theFrozenEnergy
 
G4INCL::ThreeVector theMomentum
 
G4INCL::ThreeVectorthePropagationMomentum
 
G4INCL::ThreeVector theFrozenMomentum
 
G4INCL::ThreeVector thePosition
 
G4int nCollisions
 
G4int nDecays
 
G4double thePotentialEnergy
 
long ID
 
G4bool rpCorrelated
 
G4double uncorrelatedMomentum
 

Private Attributes

G4double theHelicity
 
G4double emissionTime
 
G4bool outOfWell
 
G4double theMass
 

Static Private Attributes

static G4ThreadLocal long nextID
 

Constructor & Destructor Documentation

Particle ( ParticleType  t,
G4double  energy,
ThreeVector const momentum,
ThreeVector const position 
)
Particle ( ParticleType  t,
ThreeVector const momentum,
ThreeVector const position 
)
virtual ~Particle ( )
virtual

Member Function Documentation

Particle& operator= ( const Particle rhs)

Assignment operator.

Does not copy the particle ID.

References Particle::swap().

Referenced by Cluster::operator=().

virtual G4INCL::ParticleSpecies getSpecies ( ) const
virtual

Get the particle species.

Reimplemented in Cluster.

References Particle::theType.

Referenced by CoulombDistortion::maxImpactParameter(), and CoulombNonRelativistic::minimumDistance().

G4bool isNucleon ( ) const
ParticipantType getParticipantType ( ) const
void setParticipantType ( ParticipantType const  p)
G4bool isParticipant ( ) const
G4bool isTargetSpectator ( ) const
G4bool isProjectileSpectator ( ) const
virtual void makeParticipant ( )
virtual

Reimplemented in Cluster.

References G4INCL::Participant, and Particle::theParticipantType.

Referenced by Cluster::makeParticipant().

virtual void makeTargetSpectator ( )
virtual
virtual void makeProjectileSpectator ( )
virtual
G4bool isPion ( ) const
G4bool isResonance ( ) const

Is it a resonance?

References Particle::isDelta().

Referenced by CDPP::processOneParticle(), and Particle::setType().

ThreeVector boostVector ( ) const

Returns a three vector we can give to the boost() -method.

In order to go to the particle rest frame you need to multiply the boost vector by -1.0.

References Particle::theEnergy, and Particle::theMomentum.

void boost ( const ThreeVector aBoostVector)

Boost the particle using a boost vector.

Example (go to the particle rest frame): particle->boost(particle->boostVector());

References G4InuclParticleNames::alpha, ThreeVector::dot(), ThreeVector::mag2(), Particle::theEnergy, and Particle::theMomentum.

Referenced by Cluster::boost().

void lorentzContract ( const ThreeVector aBoostVector,
const ThreeVector refPos 
)

Lorentz-contract the particle position around some center.

Apply Lorentz contraction to the position component along the direction of the boost vector.

Parameters
aBoostVectorthe boost vector (velocity) [c]
refPosthe reference position

References ThreeVector::dot(), ThreeVector::mag2(), and Particle::thePosition.

void setRealMass ( )

Set the mass of the Particle to its real mass.

References Particle::getRealMass(), and Particle::setMass().

void setTableMass ( )

Set the mass of the Particle to its table mass.

References Particle::getTableMass(), and Particle::setMass().

Referenced by ProjectileRemnant::ProjectileRemnant().

void setINCLMass ( )

Set the mass of the Particle to its table mass.

References Particle::getINCLMass(), and Particle::setMass().

Referenced by Cluster::Cluster(), and Particle::setType().

G4double getEmissionQValueCorrection ( const G4int  AParent,
const G4int  ZParent 
) const

Computes correction on the emission Q-value.

Computes the correction that must be applied to INCL particles in order to obtain the correct Q-value for particle emission from a given nucleus. For absorption, the correction is obviously equal to minus the value returned by this function.

Parameters
AParentthe mass number of the emitting nucleus
ZParentthe charge number of the emitting nucleus
Returns
the correction

References G4INCL::ParticleTable::getINCLMass(), Particle::getINCLMass(), G4INCL::ParticleTable::getTableMass, Particle::getTableMass(), G4INCL::ParticleTable::getTableQValue(), Particle::isCluster(), Particle::theA, and Particle::theZ.

G4double getTransferQValueCorrection ( const G4int  AFrom,
const G4int  ZFrom,
const G4int  ATo,
const G4int  ZTo 
) const

Computes correction on the transfer Q-value.

Computes the correction that must be applied to INCL particles in order to obtain the correct Q-value for particle transfer from a given nucleus to another.

Assumes that the receving nucleus is INCL's target nucleus, with the INCL separation energy.

Parameters
AFromthe mass number of the donating nucleus
ZFromthe charge number of the donating nucleus
ATothe mass number of the receiving nucleus
ZTothe charge number of the receiving nucleus
Returns
the correction

References G4INCL::ParticleTable::getINCLMass(), Particle::getTableMass(), G4INCL::ParticleTable::getTableQValue(), Particle::theA, and Particle::theZ.

G4double getInvariantMass ( ) const

Get the the particle invariant mass.

Uses the relativistic invariant

\[ m = \sqrt{E^2 - {\vec p}^2}\]

References ThreeVector::dot(), INCL_ERROR, Particle::theEnergy, and Particle::theMomentum.

G4double getPotentialEnergy ( ) const

Get the particle potential energy.

References Particle::thePotentialEnergy.

Referenced by Cluster::addParticle(), and CDPP::processOneParticle().

void setPotentialEnergy ( G4double  v)

Set the particle potential energy.

References Particle::thePotentialEnergy.

Referenced by Nucleus::updatePotentialEnergy().

G4double getEnergy ( ) const

Get the energy of the particle in MeV.

References Particle::theEnergy.

Referenced by Cluster::addParticle().

void setMass ( G4double  mass)

Set the mass of the particle in MeV/c^2.

References Particle::theMass.

Referenced by Particle::setINCLMass(), Particle::setRealMass(), and Particle::setTableMass().

void setEnergy ( G4double  energy)
virtual G4INCL::ThreeVector getAngularMomentum ( ) const
virtual

Get the angular momentum w.r.t. the origin

Reimplemented in Cluster.

References Particle::theMomentum, Particle::thePosition, and ThreeVector::vector().

Referenced by Cluster::getAngularMomentum().

virtual void setMomentum ( const G4INCL::ThreeVector momentum)
virtual
const G4INCL::ThreeVector& getPosition ( ) const

Set the position vector.

References Particle::thePosition.

Referenced by Cluster::addParticle().

virtual void setPosition ( const G4INCL::ThreeVector position)
virtual

Reimplemented in Cluster.

References Particle::thePosition.

Referenced by Cluster::setPosition().

G4double getHelicity ( )

References Particle::theHelicity.

void setHelicity ( G4double  h)

References Particle::theHelicity.

void propagate ( G4double  step)

References Particle::thePosition.

G4int getNumberOfCollisions ( ) const

Return the number of collisions undergone by the particle.

References Particle::nCollisions.

Referenced by Cluster::addParticle().

void setNumberOfCollisions ( G4int  n)

Set the number of collisions undergone by the particle.

References Particle::nCollisions.

void incrementNumberOfCollisions ( )

Increment the number of collisions undergone by the particle.

References Particle::nCollisions.

G4int getNumberOfDecays ( ) const

Return the number of decays undergone by the particle.

References Particle::nDecays.

void setNumberOfDecays ( G4int  n)

Set the number of decays undergone by the particle.

References Particle::nDecays.

void incrementNumberOfDecays ( )

Increment the number of decays undergone by the particle.

References Particle::nDecays.

void setOutOfWell ( )

Mark the particle as out of its potential well.

This flag is used to control pions created outside their potential well in delta decay. The pion potential checks it and returns zero if it is true (necessary in order to correctly enforce energy conservation). The Nucleus::applyFinalState() method uses it to determine whether new avatars should be generated for the particle.

References Particle::outOfWell.

G4bool isOutOfWell ( ) const

Check if the particle is out of its potential well.

References Particle::outOfWell.

Referenced by INuclearPotential::computePionPotentialEnergy().

void setEmissionTime ( G4double  t)
G4double getEmissionTime ( )
ThreeVector getTransversePosition ( ) const

Transverse component of the position w.r.t. the momentum.

References Particle::getLongitudinalPosition(), and Particle::thePosition.

ThreeVector getLongitudinalPosition ( ) const

Longitudinal component of the position w.r.t. the momentum.

References ThreeVector::dot(), ThreeVector::mag2(), Particle::thePosition, and Particle::thePropagationMomentum.

Referenced by Particle::getTransversePosition().

const ThreeVector& adjustMomentumFromEnergy ( )

Rescale the momentum to match the total energy.

Referenced by Cluster::Cluster().

G4double adjustEnergyFromMomentum ( )

Recompute the energy to match the momentum.

G4bool isInList ( ParticleList const l) const

Check if the particle belongs to a given list.

G4bool isCluster ( ) const
void setFrozenMomentum ( const ThreeVector momentum)

Set the frozen particle momentum.

References Particle::theFrozenMomentum.

void setFrozenEnergy ( const G4double  energy)

Set the frozen particle momentum.

References G4INCL::KinematicsUtils::energy(), and Particle::theFrozenEnergy.

ThreeVector getFrozenMomentum ( ) const

Get the frozen particle momentum.

References Particle::theFrozenMomentum.

G4double getFrozenEnergy ( ) const

Get the frozen particle momentum.

References Particle::theFrozenEnergy.

ThreeVector getPropagationVelocity ( ) const

Get the propagation velocity of the particle.

References Particle::thePropagationMomentum.

void freezePropagation ( )

Freeze particle propagation.

Make the particle use theFrozenMomentum and theFrozenEnergy for propagation. The normal state can be restored by calling the thawPropagation() method.

References Particle::theFrozenEnergy, Particle::theFrozenMomentum, Particle::thePropagationEnergy, and Particle::thePropagationMomentum.

void thawPropagation ( )

Unfreeze particle propagation.

Make the particle use theMomentum and theEnergy for propagation. Call this method to restore the normal propagation if the freezePropagation() method has been called.

References Particle::theEnergy, Particle::theMomentum, Particle::thePropagationEnergy, and Particle::thePropagationMomentum.

virtual void rotate ( const G4double  angle,
const ThreeVector axis 
)
virtual

Rotate the particle position and momentum.

Parameters
anglethe rotation angle
axisa unit vector representing the rotation axis

Reimplemented in Cluster.

References ThreeVector::rotate(), Particle::theFrozenMomentum, Particle::theMomentum, and Particle::thePosition.

Referenced by Cluster::rotate().

long getID ( ) const
ParticleList const* getParticles ( ) const

Return a NULL pointer

References INCL_WARN.

G4double getReflectionMomentum ( ) const

Return the reflection momentum.

The reflection momentum is used by calls to getSurfaceRadius to compute the radius of the sphere where the nucleon moves. It is necessary to introduce fuzzy r-p correlations.

References ThreeVector::mag(), Particle::rpCorrelated, Particle::theMomentum, and Particle::uncorrelatedMomentum.

Referenced by Nucleus::getSurfaceRadius().

void setUncorrelatedMomentum ( const G4double  p)

Set the uncorrelated momentum.

References Particle::uncorrelatedMomentum.

void rpCorrelate ( )

Make the particle follow a strict r-p correlation.

References Particle::rpCorrelated.

void rpDecorrelate ( )

Make the particle not follow a strict r-p correlation.

References Particle::rpCorrelated.

G4double getCosRPAngle ( ) const

Get the cosine of the angle between position and momentum.

References ThreeVector::dot(), ThreeVector::mag2(), Particle::thePosition, and Particle::thePropagationMomentum.

Member Data Documentation

G4ThreadLocal long nextID
staticprivate

Referenced by Particle::Particle().