Geant4 11.2.2
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
 
void setType (ParticleType t)
 
G4bool isNucleon () const
 
ParticipantType getParticipantType () const
 
void setParticipantType (ParticipantType const p)
 
G4bool isParticipant () const
 
G4bool isTargetSpectator () const
 
G4bool isProjectileSpectator () const
 
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 a Strange?
 
G4bool isXi () const
 Is this a Xi?
 
G4bool isAntiNucleon () const
 Is this an antinucleon?
 
G4bool isAntiSigma () const
 Is this an antiSigma?
 
G4bool isAntiXi () const
 Is this an antiXi?
 
G4bool isAntiLambda () const
 Is this an antiLambda?
 
G4bool isAntiHyperon () const
 Is this an antiHyperon?
 
G4bool isAntiBaryon () const
 Is this an antiBaryon?
 
G4bool isAntiNucleonorAntiLambda () const
 Is this an antiNucleon or an antiLambda?
 
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.
 
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 getEmissionPbarQvalueCorrection (const G4int AParent, const G4int ZParent, const G4bool Victim) const
 
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 void setMomentum (const G4INCL::ThreeVector &momentum)
 
const G4INCL::ThreeVectorgetPosition () const
 
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.
 
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)
 
G4int getParentResonancePDGCode () const
 
void setParentResonancePDGCode (const G4int parentPDGCode)
 
G4int getParentResonanceID () const
 
void setParentResonanceID (const G4int parentID)
 

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)
 
G4int theParentResonancePDGCode
 
G4int theParentResonanceID
 

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,S);
73 }
G4double S(G4double temp)
const G4double A[17]
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,rhs.theS);
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 getZ() const

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 343 of file G4INCLCluster.hh.

343 {
344 Particle::boost(aBoostVector);
345 for(ParticleIter p=particles.begin(), e=particles.end(); p!=e; ++p) {
346 (*p)->boost(aBoostVector);
347 // Apply Lorentz contraction to the particle position
348 (*p)->lorentzContract(aBoostVector,thePosition);
349 (*p)->rpCorrelate();
350 }
351
352 INCL_DEBUG("Cluster was boosted with (bx,by,bz)=("
353 << aBoostVector.getX() << ", " << aBoostVector.getY() << ", " << aBoostVector.getZ() << "):"
354 << '\n' << print());
355
356 }
#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 366 of file G4INCLCluster.hh.

366 {
367 const ThreeVector &normMomentum = theMomentum / getMass();
368 for(ParticleIter p=particles.begin(), e=particles.end(); p!=e; ++p) {
369 const G4double pMass = (*p)->getMass();
370 const ThreeVector frozenMomentum = normMomentum * pMass;
371 const G4double frozenEnergy = std::sqrt(frozenMomentum.mag2()+pMass*pMass);
372 (*p)->setFrozenMomentum(frozenMomentum);
373 (*p)->setFrozenEnergy(frozenEnergy);
374 (*p)->freezePropagation();
375 }
376 }
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 427 of file G4INCLCluster.hh.

427 {
429 }
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 421 of file G4INCLCluster.hh.

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

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

◆ makeProjectileSpectator()

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

Make all the components projectile spectators, too.

Reimplemented from G4INCL::Particle.

Definition at line 397 of file G4INCLCluster.hh.

397 {
399 for(ParticleIter p=particles.begin(), e=particles.end(); p!=e; ++p) {
400 (*p)->makeProjectileSpectator();
401 }
402 }
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 405 of file G4INCLCluster.hh.

405 {
407 for(ParticleIter p=particles.begin(), e=particles.end(); p!=e; ++p) {
408 (*p)->makeTargetSpectator();
409 }
410 }
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 305 of file G4INCLCluster.hh.

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

327 {
328 ThreeVector shift(position-thePosition);
330 for(ParticleIter p=particles.begin(), e=particles.end(); p!=e; ++p) {
331 (*p)->setPosition((*p)->getPosition()+shift);
332 }
333 }
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 424 of file G4INCLCluster.hh.

424{ 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 452 of file G4INCLCluster.hh.

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


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