Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4INCL::Cluster Class Reference

#include <G4INCLCluster.hh>

+ Inheritance diagram for G4INCL::Cluster:

Public Member Functions

 Cluster (const G4int Z, const G4int A, const G4int S, const G4bool createParticleSampler=true)
 Standard Cluster constructor.
 
template<class Iterator >
 Cluster (Iterator begin, Iterator end)
 
virtual ~Cluster ()
 
 Cluster (const Cluster &rhs)
 Copy constructor.
 
Clusteroperator= (const Cluster &rhs)
 Assignment operator.
 
void swap (Cluster &rhs)
 Helper method for the assignment operator.
 
ParticleSpecies getSpecies () const
 Get the particle species.
 
void deleteParticles ()
 
void clearParticles ()
 
void setZ (const G4int Z)
 Set the charge number of the cluster.
 
void setA (const G4int A)
 Set the mass number of the cluster.
 
void setS (const G4int S)
 Set the strangess number of the cluster.
 
G4double getExcitationEnergy () const
 Get the excitation energy of the cluster.
 
void setExcitationEnergy (const G4double e)
 Set the excitation energy of the cluster.
 
virtual G4double getTableMass () const
 Get the real particle mass.
 
ParticleList const & getParticles () const
 
void removeParticle (Particle *const p)
 Remove a particle from the cluster components.
 
void addParticle (Particle *const p)
 
void updateClusterParameters ()
 Set total cluster mass, energy, size, etc. from the particles.
 
void addParticles (ParticleList const &pL)
 Add a list of particles to the cluster.
 
ParticleList getParticleList () const
 Returns the list of particles that make up the cluster.
 
std::string print () const
 
virtual void initializeParticles ()
 Initialise the NuclearDensity pointer and sample the particles.
 
void internalBoostToCM ()
 Boost to the CM of the component particles.
 
void putParticlesOffShell ()
 Put the cluster components off shell.
 
void setPosition (const ThreeVector &position)
 Set the position of the cluster.
 
void boost (const ThreeVector &aBoostVector)
 Boost the cluster with the indicated velocity.
 
void freezeInternalMotion ()
 Freeze the internal motion of the particles.
 
virtual void rotatePosition (const G4double angle, const ThreeVector &axis)
 Rotate position of all the particles.
 
virtual void rotateMomentum (const G4double angle, const ThreeVector &axis)
 Rotate momentum of all the particles.
 
virtual void makeProjectileSpectator ()
 Make all the components projectile spectators, too.
 
virtual void makeTargetSpectator ()
 Make all the components target spectators, too.
 
virtual void makeParticipant ()
 Make all the components participants, too.
 
ThreeVector const & getSpin () const
 Get the spin of the nucleus.
 
void setSpin (const ThreeVector &j)
 Set the spin of the nucleus.
 
G4INCL::ThreeVector getAngularMomentum () const
 Get the total angular momentum (orbital + spin)
 
- Public Member Functions inherited from G4INCL::Particle
 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.
 
Particleoperator= (const Particle &rhs)
 Assignment operator.
 
G4INCL::ParticleType getType () const
 
virtual G4INCL::ParticleSpecies getSpecies () const
 Get the particle species.
 
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?
 
G4bool isEta () const
 Is this an eta?
 
G4bool isOmega () const
 Is this an omega?
 
G4bool isEtaPrime () const
 Is this an etaprime?
 
G4bool isPhoton () const
 Is this a photon?
 
G4bool isResonance () const
 Is it a resonance?
 
G4bool isDelta () const
 Is it a Delta?
 
G4bool isSigma () const
 Is this a Sigma?
 
G4bool isKaon () const
 Is this a Kaon?
 
G4bool isAntiKaon () const
 Is this an antiKaon?
 
G4bool isLambda () const
 Is this a Lambda?
 
G4bool isNucleonorLambda () const
 Is this a Nucleon or a Lambda?
 
G4bool isHyperon () const
 Is this an Hyperon?
 
G4bool isMeson () const
 Is this a Meson?
 
G4bool isBaryon () const
 Is this a Baryon?
 
G4bool isStrange () const
 Is this an Strange?
 
G4int getA () const
 Returns the baryon number.
 
G4int getZ () const
 Returns the charge number.
 
G4int getS () const
 Returns the strangeness number.
 
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.
 
G4double getMass () const
 Get the cached particle mass.
 
G4double getINCLMass () const
 Get the INCL particle mass.
 
virtual G4double getTableMass () const
 Get the tabulated particle mass.
 
G4double getRealMass () const
 Get the real particle mass.
 
void setRealMass ()
 Set the mass of the Particle to its real mass.
 
void setTableMass ()
 Set the mass of the Particle to its table mass.
 
void setINCLMass ()
 Set the mass of the Particle to its table mass.
 
G4double getEmissionQValueCorrection (const G4int AParent, const G4int ZParent) const
 Computes correction on the emission Q-value.
 
G4double getTransferQValueCorrection (const G4int AFrom, const G4int ZFrom, const G4int ATo, const G4int ZTo) const
 Computes correction on the transfer Q-value.
 
G4double getEmissionQValueCorrection (const G4int AParent, const G4int ZParent, const G4int SParent) const
 Computes correction on the emission Q-value for hypernuclei.
 
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 getInvariantMass () const
 Get the the particle invariant mass.
 
G4double getKineticEnergy () const
 Get the particle kinetic energy.
 
G4double getPotentialEnergy () const
 Get the particle potential energy.
 
void setPotentialEnergy (G4double v)
 Set the particle potential energy.
 
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.
 
void setNumberOfCollisions (G4int n)
 Set the number of collisions undergone by the particle.
 
void incrementNumberOfCollisions ()
 Increment the number of collisions undergone by the particle.
 
G4int getNumberOfDecays () const
 Return the number of decays undergone by the particle.
 
void setNumberOfDecays (G4int n)
 Set the number of decays undergone by the particle.
 
void incrementNumberOfDecays ()
 Increment the number of decays undergone by the particle.
 
void setOutOfWell ()
 Mark the particle as out of its potential well.
 
G4bool isOutOfWell () const
 Check if the particle is out of its potential well.
 
void setEmissionTime (G4double t)
 
G4double getEmissionTime ()
 
ThreeVector getTransversePosition () const
 Transverse component of the position w.r.t. the momentum.
 
ThreeVector getLongitudinalPosition () const
 Longitudinal component of the position w.r.t. the momentum.
 
const ThreeVectoradjustMomentumFromEnergy ()
 Rescale the momentum to match the total energy.
 
G4double adjustEnergyFromMomentum ()
 Recompute the energy to match the momentum.
 
G4bool isCluster () const
 
void setFrozenMomentum (const ThreeVector &momentum)
 Set the frozen particle momentum.
 
void setFrozenEnergy (const G4double energy)
 Set the frozen particle momentum.
 
ThreeVector getFrozenMomentum () const
 Get the frozen particle momentum.
 
G4double getFrozenEnergy () const
 Get the frozen particle momentum.
 
ThreeVector getPropagationVelocity () const
 Get the propagation velocity of the particle.
 
void freezePropagation ()
 Freeze particle propagation.
 
void thawPropagation ()
 Unfreeze particle propagation.
 
virtual void rotatePositionAndMomentum (const G4double angle, const ThreeVector &axis)
 Rotate the particle position and momentum.
 
virtual void rotatePosition (const G4double angle, const ThreeVector &axis)
 Rotate the particle position.
 
virtual void rotateMomentum (const G4double angle, const ThreeVector &axis)
 Rotate the particle momentum.
 
std::string print () const
 
std::string dump () const
 
long getID () const
 
ParticleList const * getParticles () const
 
G4double getReflectionMomentum () const
 Return the reflection momentum.
 
void setUncorrelatedMomentum (const G4double p)
 Set the uncorrelated momentum.
 
void rpCorrelate ()
 Make the particle follow a strict r-p correlation.
 
void rpDecorrelate ()
 Make the particle not follow a strict r-p correlation.
 
G4double getCosRPAngle () const
 Get the cosine of the angle between position and momentum.
 
G4double getParticleBias () const
 Get the particle bias.
 
void setParticleBias (G4double ParticleBias)
 Set the particle bias.
 
std::vector< G4intgetBiasCollisionVector () const
 Get the vector list of biased vertices on the particle path.
 
void setBiasCollisionVector (std::vector< G4int > BiasCollisionVector)
 Set the vector list of biased vertices on the particle path.
 
G4int getNumberOfKaon () const
 Number of Kaon inside de nucleus.
 
void setNumberOfKaon (const G4int NK)
 

Protected Attributes

ParticleList particles
 
G4double theExcitationEnergy
 
ThreeVector theSpin
 
ParticleSamplertheParticleSampler
 
- Protected Attributes inherited from G4INCL::Particle
G4int theZ
 
G4int theA
 
G4int theS
 
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
 
G4double theParticleBias
 
G4int theNKaon
 The number of Kaons inside the nucleus (update during the cascade)
 

Additional Inherited Members

- Static Public Member Functions inherited from G4INCL::Particle
static G4double getTotalBias ()
 General bias vector function.
 
static void setINCLBiasVector (std::vector< G4double > NewVector)
 
static void FillINCLBiasVector (G4double newBias)
 
static G4double getBiasFromVector (std::vector< G4int > VectorBias)
 
static std::vector< G4intMergeVectorBias (Particle const *const p1, Particle const *const p2)
 
static std::vector< G4intMergeVectorBias (std::vector< G4int > p1, Particle const *const p2)
 
- Static Public Attributes inherited from G4INCL::Particle
static std::vector< G4doubleINCLBiasVector
 Time ordered vector of all bias applied.
 
static G4ThreadLocal G4int nextBiasedCollisionID = 0
 
- Protected Member Functions inherited from G4INCL::Particle
void swap (Particle &rhs)
 Helper method for the assignment operator.
 

Detailed Description

Cluster is a particle (inherits from the Particle class) that is actually a collection of elementary particles.

Definition at line 52 of file G4INCLCluster.hh.

Constructor & Destructor Documentation

◆ Cluster() [1/3]

G4INCL::Cluster::Cluster ( const G4int  Z,
const G4int  A,
const G4int  S,
const G4bool  createParticleSampler = true 
)
inline

Standard Cluster constructor.

This constructor should mainly be used when constructing Nucleus or when constructing Clusters to be used as composite projectiles.

Definition at line 60 of file G4INCLCluster.hh.

60 :
61 Particle(),
63 theSpin(0.,0.,0.),
65 {
67 theZ = Z;
68 theA = A;
69 theS = S;
71 if(createParticleSampler)
72 theParticleSampler = new ParticleSampler(A,Z);
73 }
double S(double temp)
double A(double temperature)
ParticleSampler * theParticleSampler
ThreeVector theSpin
G4double theExcitationEnergy
void setINCLMass()
Set the mass of the Particle to its table mass.
void setType(ParticleType t)

◆ Cluster() [2/3]

template<class Iterator >
G4INCL::Cluster::Cluster ( Iterator  begin,
Iterator  end 
)
inline

A cluster can be directly built from a list of particles.

Definition at line 79 of file G4INCLCluster.hh.

79 :
80 Particle(),
82 theSpin(0.,0.,0.),
84 {
86 for(Iterator i = begin; i != end; ++i) {
87 addParticle(*i);
88 }
92 }
void addParticle(Particle *const p)
const ThreeVector & adjustMomentumFromEnergy()
Rescale the momentum to match the total energy.
G4INCL::ThreeVector thePosition

◆ ~Cluster()

virtual G4INCL::Cluster::~Cluster ( )
inlinevirtual

Definition at line 94 of file G4INCLCluster.hh.

94 {
95 delete theParticleSampler;
96 }

◆ Cluster() [3/3]

G4INCL::Cluster::Cluster ( const Cluster rhs)
inline

Copy constructor.

Definition at line 99 of file G4INCLCluster.hh.

99 :
100 Particle(rhs),
101 theExcitationEnergy(rhs.theExcitationEnergy),
102 theSpin(rhs.theSpin)
103 {
104 for(ParticleIter p=rhs.particles.begin(), e=rhs.particles.end(); p!=e; ++p) {
105 particles.push_back(new Particle(**p));
106 }
107 if(rhs.theParticleSampler)
108 theParticleSampler = new ParticleSampler(rhs.theA,rhs.theZ);
109 else
110 theParticleSampler = NULL;
111 }
ParticleList particles
ParticleList::const_iterator ParticleIter

Member Function Documentation

◆ addParticle()

void G4INCL::Cluster::addParticle ( Particle *const  p)
inline

Add one particle to the cluster. This updates the cluster mass, energy, size, etc.

Definition at line 178 of file G4INCLCluster.hh.

178 {
179 particles.push_back(p);
180 theEnergy += p->getEnergy();
181 thePotentialEnergy += p->getPotentialEnergy();
182 theMomentum += p->getMomentum();
183 thePosition += p->getPosition();
184 theA += p->getA();
185 theZ += p->getZ();
186 theS += p->getS();
187 nCollisions += p->getNumberOfCollisions();
188 }
G4INCL::ThreeVector theMomentum
G4double thePotentialEnergy

Referenced by Cluster(), and G4INCL::ProjectileRemnant::reset().

◆ addParticles()

void G4INCL::Cluster::addParticles ( ParticleList const &  pL)
inline

Add a list of particles to the cluster.

Definition at line 213 of file G4INCLCluster.hh.

213 {
214 particles = pL;
216 }
void updateClusterParameters()
Set total cluster mass, energy, size, etc. from the particles.

◆ boost()

void G4INCL::Cluster::boost ( const ThreeVector aBoostVector)
inline

Boost the cluster with the indicated velocity.

The Cluster is boosted as a whole, just like any Particle object; moreover, the internal components (particles list) are also boosted, according to Alain Boudard's off-shell recipe.

Parameters
aBoostVectorthe velocity to boost to [c]

Definition at line 344 of file G4INCLCluster.hh.

344 {
345 Particle::boost(aBoostVector);
346 for(ParticleIter p=particles.begin(), e=particles.end(); p!=e; ++p) {
347 (*p)->boost(aBoostVector);
348 // Apply Lorentz contraction to the particle position
349 (*p)->lorentzContract(aBoostVector,thePosition);
350 (*p)->rpCorrelate();
351 }
352
353 INCL_DEBUG("Cluster was boosted with (bx,by,bz)=("
354 << aBoostVector.getX() << ", " << aBoostVector.getY() << ", " << aBoostVector.getZ() << "):"
355 << '\n' << print());
356
357 }
#define INCL_DEBUG(x)
std::string print() const
void boost(const ThreeVector &aBoostVector)

Referenced by G4INCL::ProjectileRemnant::ProjectileRemnant().

◆ clearParticles()

void G4INCL::Cluster::clearParticles ( )
inline

Definition at line 143 of file G4INCLCluster.hh.

143{ particles.clear(); }

Referenced by deleteParticles().

◆ deleteParticles()

void G4INCL::Cluster::deleteParticles ( )
inline

Definition at line 136 of file G4INCLCluster.hh.

136 {
137 for(ParticleIter p=particles.begin(), e=particles.end(); p!=e; ++p) {
138 delete (*p);
139 }
141 }

Referenced by G4INCL::Store::clearOutgoing(), G4INCL::Nucleus::decayOutgoingClusters(), G4INCL::ProjectileRemnant::reset(), and G4INCL::ProjectileRemnant::~ProjectileRemnant().

◆ freezeInternalMotion()

void G4INCL::Cluster::freezeInternalMotion ( )
inline

Freeze the internal motion of the particles.

Each particle is assigned a frozen momentum four-vector determined by the collective cluster velocity. This is used for propagation, but not for dynamics. Normal propagation is restored by calling the Particle::thawPropagation() method, which should be done in InteractionAvatar::postInteraction.

Definition at line 367 of file G4INCLCluster.hh.

367 {
368 const ThreeVector &normMomentum = theMomentum / getMass();
369 for(ParticleIter p=particles.begin(), e=particles.end(); p!=e; ++p) {
370 const G4double pMass = (*p)->getMass();
371 const ThreeVector frozenMomentum = normMomentum * pMass;
372 const G4double frozenEnergy = std::sqrt(frozenMomentum.mag2()+pMass*pMass);
373 (*p)->setFrozenMomentum(frozenMomentum);
374 (*p)->setFrozenEnergy(frozenEnergy);
375 (*p)->freezePropagation();
376 }
377 }
double G4double
Definition: G4Types.hh:83
G4double getMass() const
Get the cached particle mass.

Referenced by G4INCL::ProjectileRemnant::ProjectileRemnant().

◆ getAngularMomentum()

G4INCL::ThreeVector G4INCL::Cluster::getAngularMomentum ( ) const
inlinevirtual

Get the total angular momentum (orbital + spin)

Reimplemented from G4INCL::Particle.

Definition at line 428 of file G4INCLCluster.hh.

428 {
430 }
ThreeVector const & getSpin() const
Get the spin of the nucleus.
virtual G4INCL::ThreeVector getAngularMomentum() const

Referenced by G4INCL::Nucleus::computeRecoilKinematics(), and G4INCL::StandardPropagationModel::shootComposite().

◆ getExcitationEnergy()

G4double G4INCL::Cluster::getExcitationEnergy ( ) const
inline

Get the excitation energy of the cluster.

Definition at line 155 of file G4INCLCluster.hh.

155{ return theExcitationEnergy; }

Referenced by G4INCL::Nucleus::fillEventInfo(), and G4INCL::Nucleus::getConservationBalance().

◆ getParticleList()

ParticleList G4INCL::Cluster::getParticleList ( ) const
inline

Returns the list of particles that make up the cluster.

Definition at line 219 of file G4INCLCluster.hh.

219{ return particles; }

◆ getParticles()

ParticleList const & G4INCL::Cluster::getParticles ( ) const
inline

Get the list of particles in the cluster.

Definition at line 169 of file G4INCLCluster.hh.

169{ return particles; }

Referenced by G4INCL::Nucleus::applyFinalState(), G4INCL::CoulombNone::bringToSurface(), and G4INCL::SurfaceAvatar::postInteraction().

◆ getSpecies()

ParticleSpecies G4INCL::Cluster::getSpecies ( ) const
inlinevirtual

Get the particle species.

Reimplemented from G4INCL::Particle.

Definition at line 132 of file G4INCLCluster.hh.

132 {
133 return ParticleSpecies(theA, theZ, theS);
134 }

◆ getSpin()

ThreeVector const & G4INCL::Cluster::getSpin ( ) const
inline

Get the spin of the nucleus.

Definition at line 422 of file G4INCLCluster.hh.

422{ return theSpin; }

Referenced by G4INCL::Nucleus::fillEventInfo(), and getAngularMomentum().

◆ getTableMass()

virtual G4double G4INCL::Cluster::getTableMass ( ) const
inlinevirtual

Get the real particle mass.

Overloads the Particle method.

Reimplemented from G4INCL::Particle.

Definition at line 164 of file G4INCLCluster.hh.

164{ return getRealMass(); }
G4double getRealMass() const
Get the real particle mass.

Referenced by G4INCL::Nucleus::useFusionKinematics().

◆ initializeParticles()

void G4INCL::Cluster::initializeParticles ( )
virtual

Initialise the NuclearDensity pointer and sample the particles.

Reimplemented in G4INCL::Nucleus.

Definition at line 43 of file G4INCLCluster.cc.

43 {
44// assert(theA>=2);
45 const ThreeVector oldPosition = thePosition;
47#if !defined(NDEBUG) && !defined(INCLXX_IN_GEANT4_MODE)
48 const G4int theMassNumber = theA;
49 const G4int theChargeNumber = theZ;
50#endif
52 thePosition = oldPosition;
53// assert(theMassNumber==theA && theChargeNumber==theZ);
54 INCL_DEBUG("Cluster initialized:" << '\n' << print());
55 }
int G4int
Definition: G4Types.hh:85
void sampleParticlesIntoList(ThreeVector const &position, ParticleList &theList)

Referenced by G4INCL::Nucleus::initializeParticles(), and G4INCL::ProjectileRemnant::ProjectileRemnant().

◆ internalBoostToCM()

void G4INCL::Cluster::internalBoostToCM ( )
inline

Boost to the CM of the component particles.

The position of all particles in the particles list is shifted so that their centre of mass is in the origin and their total momentum is zero.

Definition at line 254 of file G4INCLCluster.hh.

254 {
255
256 // First compute the current CM position and total momentum
257 ThreeVector theCMPosition, theTotalMomentum;
258 G4double theTotalEnergy = 0.0;
259 for(ParticleIter p=particles.begin(), e=particles.end(); p!=e; ++p) {
260 theCMPosition += (*p)->getPosition();
261 theTotalMomentum += (*p)->getMomentum();
262 theTotalEnergy += (*p)->getEnergy();
263 }
264 theCMPosition /= theA;
265// assert((unsigned int)theA==particles.size());
266
267 // Now determine the CM velocity of the particles
268 // commented out because currently unused, see below
269 // ThreeVector betaCM = theTotalMomentum / theTotalEnergy;
270
271 // The new particle positions and momenta are scaled by a factor of
272 // \f$\sqrt{A/(A-1)}\f$, so that the resulting density distributions in
273 // the CM have the same variance as the one we started with.
274 const G4double rescaling = std::sqrt(((G4double)theA)/((G4double)(theA-1)));
275
276 // Loop again to boost and reposition
277 for(ParticleIter p=particles.begin(), e=particles.end(); p!=e; ++p) {
278 // \bug{We should do the following, but the Fortran version actually
279 // does not!
280 // (*p)->boost(betaCM);
281 // Here is what the Fortran version does:}
282 (*p)->setMomentum(((*p)->getMomentum()-theTotalMomentum/theA)*rescaling);
283
284 // Set the CM position of the particles
285 (*p)->setPosition(((*p)->getPosition()-theCMPosition)*rescaling);
286 }
287
288 // Set the global cluster kinematic variables
289 thePosition.setX(0.0);
290 thePosition.setY(0.0);
291 thePosition.setZ(0.0);
292 theMomentum.setX(0.0);
293 theMomentum.setY(0.0);
294 theMomentum.setZ(0.0);
295 theEnergy = getMass();
296
297 INCL_DEBUG("Cluster boosted to internal CM:" << '\n' << print());
298
299 }
void setY(G4double ay)
Set the y coordinate.
void setZ(G4double az)
Set the z coordinate.
void setX(G4double ax)
Set the x coordinate.

Referenced by G4INCL::ProjectileRemnant::ProjectileRemnant().

◆ makeParticipant()

virtual void G4INCL::Cluster::makeParticipant ( )
inlinevirtual

Make all the components participants, too.

Reimplemented from G4INCL::Particle.

Definition at line 414 of file G4INCLCluster.hh.

414 {
416 for(ParticleIter p=particles.begin(), e=particles.end(); p!=e; ++p) {
417 (*p)->makeParticipant();
418 }
419 }
virtual void makeParticipant()

◆ makeProjectileSpectator()

virtual void G4INCL::Cluster::makeProjectileSpectator ( )
inlinevirtual

Make all the components projectile spectators, too.

Reimplemented from G4INCL::Particle.

Definition at line 398 of file G4INCLCluster.hh.

398 {
400 for(ParticleIter p=particles.begin(), e=particles.end(); p!=e; ++p) {
401 (*p)->makeProjectileSpectator();
402 }
403 }
virtual void makeProjectileSpectator()

Referenced by G4INCL::ProjectileRemnant::ProjectileRemnant().

◆ makeTargetSpectator()

virtual void G4INCL::Cluster::makeTargetSpectator ( )
inlinevirtual

Make all the components target spectators, too.

Reimplemented from G4INCL::Particle.

Definition at line 406 of file G4INCLCluster.hh.

406 {
408 for(ParticleIter p=particles.begin(), e=particles.end(); p!=e; ++p) {
409 (*p)->makeTargetSpectator();
410 }
411 }
virtual void makeTargetSpectator()

◆ operator=()

Cluster & G4INCL::Cluster::operator= ( const Cluster rhs)
inline

Assignment operator.

Definition at line 114 of file G4INCLCluster.hh.

114 {
115 Cluster temporaryCluster(rhs);
116 Particle::operator=(temporaryCluster);
117 swap(temporaryCluster);
118 return *this;
119 }
Cluster(const G4int Z, const G4int A, const G4int S, const G4bool createParticleSampler=true)
Standard Cluster constructor.
void swap(Cluster &rhs)
Helper method for the assignment operator.
Particle & operator=(const Particle &rhs)
Assignment operator.

◆ print()

std::string G4INCL::Cluster::print ( ) const
inline

Definition at line 221 of file G4INCLCluster.hh.

221 {
222 std::stringstream ss;
223 ss << "Cluster (ID = " << ID << ") type = ";
225 ss << '\n'
226 << " A = " << theA << '\n'
227 << " Z = " << theZ << '\n'
228 << " S = " << theS << '\n'
229 << " mass = " << getMass() << '\n'
230 << " energy = " << theEnergy << '\n'
231 << " momentum = "
232 << theMomentum.print()
233 << '\n'
234 << " position = "
235 << thePosition.print()
236 << '\n'
237 << "Contains the following particles:"
238 << '\n';
239 for(ParticleIter i=particles.begin(), e=particles.end(); i!=e; ++i)
240 ss << (*i)->print();
241 ss << '\n';
242 return ss.str();
243 }
G4INCL::ParticleType theType
std::string print() const
std::string getName(const ParticleType t)
Get the native INCL name of the particle.

Referenced by boost(), G4INCL::SurfaceAvatar::getChannel(), initializeParticles(), internalBoostToCM(), putParticlesOffShell(), G4INCL::ProjectileRemnant::removeParticle(), and G4INCL::ProjectileRemnant::reset().

◆ putParticlesOffShell()

void G4INCL::Cluster::putParticlesOffShell ( )
inline

Put the cluster components off shell.

The Cluster components are put off shell in such a way that their total energy equals the cluster mass.

Definition at line 306 of file G4INCLCluster.hh.

306 {
307 // Compute the dynamical potential
308 const G4double theDynamicalPotential = computeDynamicalPotential();
309 INCL_DEBUG("The dynamical potential is " << theDynamicalPotential << " MeV" << '\n');
310
311 for(ParticleIter p=particles.begin(), e=particles.end(); p!=e; ++p) {
312 const G4double energy = (*p)->getEnergy() - theDynamicalPotential;
313 const ThreeVector &momentum = (*p)->getMomentum();
314 // Here particles are put off-shell so that we can satisfy the energy-
315 // and momentum-conservation laws
316 (*p)->setEnergy(energy);
317 (*p)->setMass(std::sqrt(energy*energy - momentum.mag2()));
318 }
319 INCL_DEBUG("Cluster components are now off shell:" << '\n'
320 << print());
321 }
G4double energy(const ThreeVector &p, const G4double m)

Referenced by G4INCL::ProjectileRemnant::ProjectileRemnant().

◆ removeParticle()

void G4INCL::Cluster::removeParticle ( Particle *const  p)
inline

Remove a particle from the cluster components.

Definition at line 172 of file G4INCLCluster.hh.

172{ particles.remove(p); }

Referenced by G4INCL::ProjectileRemnant::removeParticle().

◆ rotateMomentum()

void G4INCL::Cluster::rotateMomentum ( const G4double  angle,
const ThreeVector axis 
)
virtual

Rotate momentum of all the particles.

This includes the cluster components. Overloads Particle::rotateMomentum().

Parameters
anglethe rotation angle
axisa unit vector representing the rotation axis

Reimplemented from G4INCL::Particle.

Definition at line 64 of file G4INCLCluster.cc.

64 {
65 Particle::rotateMomentum(angle, axis);
66 for(ParticleIter p=particles.begin(), e=particles.end(); p!=e; ++p) {
67 (*p)->rotateMomentum(angle, axis);
68 }
69 }
virtual void rotateMomentum(const G4double angle, const ThreeVector &axis)
Rotate the particle momentum.

◆ rotatePosition()

void G4INCL::Cluster::rotatePosition ( const G4double  angle,
const ThreeVector axis 
)
virtual

Rotate position of all the particles.

This includes the cluster components. Overloads Particle::rotateMomentum().

Parameters
anglethe rotation angle
axisa unit vector representing the rotation axis

Reimplemented from G4INCL::Particle.

Definition at line 57 of file G4INCLCluster.cc.

57 {
58 Particle::rotatePosition(angle, axis);
59 for(ParticleIter p=particles.begin(), e=particles.end(); p!=e; ++p) {
60 (*p)->rotatePosition(angle, axis);
61 }
62 }
virtual void rotatePosition(const G4double angle, const ThreeVector &axis)
Rotate the particle position.

◆ setA()

void G4INCL::Cluster::setA ( const G4int  A)
inline

Set the mass number of the cluster.

Definition at line 149 of file G4INCLCluster.hh.

149{ theA = A; }

◆ setExcitationEnergy()

void G4INCL::Cluster::setExcitationEnergy ( const G4double  e)
inline

Set the excitation energy of the cluster.

Definition at line 158 of file G4INCLCluster.hh.

Referenced by G4INCL::Nucleus::finalizeProjectileRemnant().

◆ setPosition()

void G4INCL::Cluster::setPosition ( const ThreeVector position)
inlinevirtual

Set the position of the cluster.

This overloads the Particle method to take into account that the positions of the cluster members must be updated as well.

Reimplemented from G4INCL::Particle.

Definition at line 328 of file G4INCLCluster.hh.

328 {
329 ThreeVector shift(position-thePosition);
331 for(ParticleIter p=particles.begin(), e=particles.end(); p!=e; ++p) {
332 (*p)->setPosition((*p)->getPosition()+shift);
333 }
334 }
virtual void setPosition(const G4INCL::ThreeVector &position)

Referenced by G4INCL::StandardPropagationModel::shootComposite().

◆ setS()

void G4INCL::Cluster::setS ( const G4int  S)
inline

Set the strangess number of the cluster.

Definition at line 152 of file G4INCLCluster.hh.

152{ theS = S; }

◆ setSpin()

void G4INCL::Cluster::setSpin ( const ThreeVector j)
inline

Set the spin of the nucleus.

Definition at line 425 of file G4INCLCluster.hh.

425{ theSpin = j; }

Referenced by G4INCL::Nucleus::finalizeProjectileRemnant(), and G4INCL::Nucleus::useFusionKinematics().

◆ setZ()

void G4INCL::Cluster::setZ ( const G4int  Z)
inline

Set the charge number of the cluster.

Definition at line 146 of file G4INCLCluster.hh.

146{ theZ = Z; }

◆ swap()

void G4INCL::Cluster::swap ( Cluster rhs)
inline

Helper method for the assignment operator.

Definition at line 122 of file G4INCLCluster.hh.

122 {
123 Particle::swap(rhs);
124 std::swap(theExcitationEnergy, rhs.theExcitationEnergy);
125 std::swap(theSpin, rhs.theSpin);
126 // std::swap is overloaded by std::list and guaranteed to operate in
127 // constant time
128 std::swap(particles, rhs.particles);
129 std::swap(theParticleSampler, rhs.theParticleSampler);
130 }
void swap(Particle &rhs)
Helper method for the assignment operator.

Referenced by operator=().

◆ updateClusterParameters()

void G4INCL::Cluster::updateClusterParameters ( )
inline

Set total cluster mass, energy, size, etc. from the particles.

Definition at line 191 of file G4INCLCluster.hh.

191 {
192 theEnergy = 0.;
194 theMomentum = ThreeVector();
195 thePosition = ThreeVector();
196 theA = 0;
197 theZ = 0;
198 theS = 0;
199 nCollisions = 0;
200 for(ParticleIter p=particles.begin(), e=particles.end(); p!=e; ++p) {
201 theEnergy += (*p)->getEnergy();
202 thePotentialEnergy += (*p)->getPotentialEnergy();
203 theMomentum += (*p)->getMomentum();
204 thePosition += (*p)->getPosition();
205 theA += (*p)->getA();
206 theZ += (*p)->getZ();
207 theS += (*p)->getS();
208 nCollisions += (*p)->getNumberOfCollisions();
209 }
210 }

Referenced by addParticles(), and initializeParticles().

Member Data Documentation

◆ particles

◆ theExcitationEnergy

◆ theParticleSampler

ParticleSampler* G4INCL::Cluster::theParticleSampler
protected

◆ theSpin

ThreeVector G4INCL::Cluster::theSpin
protected

Definition at line 453 of file G4INCLCluster.hh.

Referenced by G4INCL::Nucleus::computeRecoilKinematics(), getSpin(), setSpin(), and swap().


The documentation for this class was generated from the following files: