Geant4 9.6.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 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.
 
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 constgetParticles () const
 
void removeParticle (Particle *const p)
 Remove a particle from the cluster components.
 
void addParticle (Particle *const p)
 
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 rotate (const G4double angle, const ThreeVector &axis)
 Rotate position and 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 constgetSpin () 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 momentum, ThreeVector position)
 
 Particle (ParticleType t, ThreeVector momentum, ThreeVector 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 isResonance () const
 Is it a resonance?
 
G4bool isDelta () const
 Is it a Delta?
 
G4int getA () const
 Returns the baryon number.
 
G4int getZ () const
 Returns the charge 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 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 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.
 
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 rotate (const G4double angle, const ThreeVector &axis)
 Rotate the particle position and momentum.
 
std::string print () const
 
std::string dump () const
 
long getID () const
 
ParticleList constgetParticles () const
 

Protected Attributes

ParticleList particles
 
G4double theExcitationEnergy
 
ThreeVector theSpin
 
ParticleSamplertheParticleSampler
 
- Protected Attributes inherited from G4INCL::Particle
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
 

Additional Inherited Members

- 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 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;
70 if(createParticleSampler)
72 }
ParticleSampler * theParticleSampler
ThreeVector theSpin
G4double theExcitationEnergy
static ParticleSampler * createParticleSampler(const G4int A, const G4int Z)
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 78 of file G4INCLCluster.hh.

78 :
79 Particle(),
81 theSpin(0.,0.,0.),
83 {
85 for(Iterator i = begin; i != end; ++i) {
86 addParticle(*i);
87 }
91 }
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 93 of file G4INCLCluster.hh.

93 {
94 delete theParticleSampler;
95 }

◆ Cluster() [3/3]

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

Copy constructor.

Definition at line 98 of file G4INCLCluster.hh.

98 :
99 Particle(rhs),
100 theExcitationEnergy(rhs.theExcitationEnergy)
101 {
103 for(ParticleIter p=rhs.particles.begin(); p!=rhs.particles.end(); ++p) {
104 particles.push_back(new Particle(**p));
105 }
106 }
ParticleList particles
std::list< G4INCL::Particle * >::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 170 of file G4INCLCluster.hh.

170 {
171// assert(p->isNucleon());
172 particles.push_back(p);
173 theEnergy += p->getEnergy();
174 thePotentialEnergy += p->getPotentialEnergy();
175 theMomentum += p->getMomentum();
176 thePosition += p->getPosition();
177 theA += p->getA();
178 theZ += p->getZ();
179 nCollisions += p->getNumberOfCollisions();
180 }
G4INCL::ThreeVector theMomentum
G4double thePotentialEnergy

Referenced by addParticles(), 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 183 of file G4INCLCluster.hh.

183 {
184 for(ParticleIter p=pL.begin(); p!=pL.end(); ++p)
185 addParticle(*p);
186 }

Referenced by initializeParticles().

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

313 {
314 Particle::boost(aBoostVector);
315 for(ParticleIter p=particles.begin(); p!=particles.end(); ++p) {
316 (*p)->boost(aBoostVector);
317 // Apply Lorentz contraction to the particle position
318 (*p)->lorentzContract(aBoostVector,thePosition);
319 }
320
321 DEBUG("Cluster was boosted with (bx,by,bz)=("
322 << aBoostVector.getX() << ", " << aBoostVector.getY() << ", " << aBoostVector.getZ() << "):"
323 << std::endl << print());
324
325 }
#define 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 138 of file G4INCLCluster.hh.

138{ particles.clear(); }

Referenced by deleteParticles(), and G4INCL::Nucleus::moveProjectileRemnantComponentsToOutgoing().

◆ deleteParticles()

void G4INCL::Cluster::deleteParticles ( )
inline

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

335 {
336 const ThreeVector &normMomentum = theMomentum / getMass();
337 for(ParticleIter p=particles.begin(); p!=particles.end(); ++p) {
338 const G4double pMass = (*p)->getMass();
339 const ThreeVector frozenMomentum = normMomentum * pMass;
340 const G4double frozenEnergy = std::sqrt(frozenMomentum.mag2()+pMass*pMass);
341 (*p)->setFrozenMomentum(frozenMomentum);
342 (*p)->setFrozenEnergy(frozenEnergy);
343 (*p)->freezePropagation();
344 }
345 }
double G4double
Definition: G4Types.hh:64
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 392 of file G4INCLCluster.hh.

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

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

◆ getExcitationEnergy()

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

Get the excitation energy of the cluster.

Definition at line 147 of file G4INCLCluster.hh.

147{ return theExcitationEnergy; }

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

◆ getParticleList()

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

Returns the list of particles that make up the cluster.

Definition at line 189 of file G4INCLCluster.hh.

189{ return particles; }

◆ getParticles()

◆ getSpecies()

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

Get the particle species.

Reimplemented from G4INCL::Particle.

Definition at line 127 of file G4INCLCluster.hh.

127 {
128 return ParticleSpecies(theA, theZ);
129 }

◆ getSpin()

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

Get the spin of the nucleus.

Definition at line 386 of file G4INCLCluster.hh.

386{ 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 156 of file G4INCLCluster.hh.

156{ 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 44 of file G4INCLCluster.cc.

44 {
45// assert(theA>=2);
46 const ThreeVector oldPosition = thePosition;
48#if !defined(NDEBUG) && !defined(INCLXX_IN_GEANT4_MODE)
49 const G4int theMassNumber = theA;
50 const G4int theChargeNumber = theZ;
51#endif
52 theA = 0;
53 theZ = 0;
54 addParticles(theParticles); // add the particles to the `particles' list
55 thePosition = oldPosition;
56// assert(theMassNumber==theA && theChargeNumber==theZ);
57 DEBUG("Cluster initialized:" << std::endl << print());
58 }
int G4int
Definition: G4Types.hh:66
void addParticles(ParticleList const &pL)
Add a list of particles to the cluster.
ParticleList sampleParticles(ThreeVector const &position) const
std::list< G4INCL::Particle * > ParticleList

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

223 {
224
225 // First compute the current CM position and total momentum
226 ThreeVector theCMPosition, theTotalMomentum;
227 G4double theTotalEnergy = 0.0;
228 for(ParticleIter p=particles.begin(); p!=particles.end(); ++p) {
229 theCMPosition += (*p)->getPosition();
230 theTotalMomentum += (*p)->getMomentum();
231 theTotalEnergy += (*p)->getEnergy();
232 }
233 theCMPosition /= theA;
234// assert((unsigned int)theA==particles.size());
235
236 // Now determine the CM velocity of the particles
237 // commented out because currently unused, see below
238 // ThreeVector betaCM = theTotalMomentum / theTotalEnergy;
239
240 // The new particle positions and momenta are scaled by a factor of
241 // \f$\sqrt{A/(A-1)}\f$, so that the resulting density distributions in
242 // the CM have the same variance as the one we started with.
243 const G4double rescaling = std::sqrt(((G4double)theA)/((G4double)(theA-1)));
244
245 // Loop again to boost and reposition
246 for(ParticleIter p=particles.begin(); p!=particles.end(); ++p) {
247 // \bug{We should do the following, but the Fortran version actually
248 // does not!
249 // (*p)->boost(betaCM);
250 // Here is what the Fortran version does:}
251 (*p)->setMomentum(((*p)->getMomentum()-theTotalMomentum/theA)*rescaling);
252
253 // Set the CM position of the particles
254 (*p)->setPosition(((*p)->getPosition()-theCMPosition)*rescaling);
255 }
256
257 // Set the global cluster kinematic variables
258 thePosition.setX(0.0);
259 thePosition.setY(0.0);
260 thePosition.setZ(0.0);
261 theMomentum.setX(0.0);
262 theMomentum.setY(0.0);
263 theMomentum.setZ(0.0);
264 theEnergy = getMass();
265
266 DEBUG("Cluster boosted to internal CM:" << std::endl << print());
267
268 }
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 378 of file G4INCLCluster.hh.

378 {
380 for(ParticleIter p=particles.begin(); p!=particles.end(); ++p) {
381 (*p)->makeParticipant();
382 }
383 }
virtual void makeParticipant()

◆ makeProjectileSpectator()

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

Make all the components projectile spectators, too.

Reimplemented from G4INCL::Particle.

Definition at line 362 of file G4INCLCluster.hh.

362 {
364 for(ParticleIter p=particles.begin(); p!=particles.end(); ++p) {
365 (*p)->makeProjectileSpectator();
366 }
367 }
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 370 of file G4INCLCluster.hh.

370 {
372 for(ParticleIter p=particles.begin(); p!=particles.end(); ++p) {
373 (*p)->makeTargetSpectator();
374 }
375 }
virtual void makeTargetSpectator()

◆ operator=()

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

Assignment operator.

Definition at line 109 of file G4INCLCluster.hh.

109 {
110 Cluster temporaryCluster(rhs);
111 Particle::operator=(temporaryCluster);
112 swap(temporaryCluster);
113 return *this;
114 }
Cluster(const G4int Z, const G4int A, 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 191 of file G4INCLCluster.hh.

191 {
192 std::stringstream ss;
193 ss << "Cluster (ID = " << ID << ") type = ";
195 ss << std::endl
196 << " A = " << theA << std::endl
197 << " Z = " << theZ << std::endl
198 << " mass = " << getMass() << std::endl
199 << " energy = " << theEnergy << std::endl
200 << " momentum = "
201 << theMomentum.print()
202 << std::endl
203 << " position = "
204 << thePosition.print()
205 << std::endl
206 << "Contains the following particles:"
207 << std::endl;
208 for(ParticleIter i=particles.begin(); i!=particles.end(); ++i)
209 ss << (*i)->print();
210 ss << std::endl;
211 return ss.str();
212 }
static std::string getName(const ParticleType t)
Get the native INCL name of the particle.
G4INCL::ParticleType theType
std::string print() const

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

275 {
276 // Compute the dynamical potential
277 const G4double theDynamicalPotential = computeDynamicalPotential();
278 DEBUG("The dynamical potential is " << theDynamicalPotential << " MeV" << std::endl);
279
280 for(ParticleIter p=particles.begin(); p!=particles.end(); ++p) {
281 const G4double energy = (*p)->getEnergy() - theDynamicalPotential;
282 const ThreeVector &momentum = (*p)->getMomentum();
283 // Here particles are put off-shell so that we can satisfy the energy-
284 // and momentum-conservation laws
285 (*p)->setEnergy(energy);
286 (*p)->setMass(std::sqrt(energy*energy - momentum.mag2()));
287 DEBUG("Cluster components are now off shell:" << std::endl
288 << print());
289 }
290 }

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

◆ removeParticle()

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

Remove a particle from the cluster components.

Definition at line 164 of file G4INCLCluster.hh.

164{ particles.remove(p); }

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

◆ rotate()

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

Rotate position and momentum of all the particles.

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

Parameters
anglethe rotation angle
axisa unit vector representing the rotation axis

Reimplemented from G4INCL::Particle.

Definition at line 354 of file G4INCLCluster.hh.

354 {
355 Particle::rotate(angle, axis);
356 for(ParticleIter p=particles.begin(); p!=particles.end(); ++p) {
357 (*p)->rotate(angle, axis);
358 }
359 }
virtual void rotate(const G4double angle, const ThreeVector &axis)
Rotate the particle position and momentum.

◆ setA()

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

Set the mass number of the cluster.

Definition at line 144 of file G4INCLCluster.hh.

144{ theA = A; }

◆ setExcitationEnergy()

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

Set the excitation energy of the cluster.

Definition at line 150 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 297 of file G4INCLCluster.hh.

297 {
298 ThreeVector shift(position-thePosition);
300 for(ParticleIter p=particles.begin(); p!=particles.end(); ++p) {
301 (*p)->setPosition((*p)->getPosition()+shift);
302 }
303 }
virtual void setPosition(const G4INCL::ThreeVector &position)

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

◆ setSpin()

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

Set the spin of the nucleus.

Definition at line 389 of file G4INCLCluster.hh.

389{ 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 141 of file G4INCLCluster.hh.

141{ theZ = Z; }

◆ swap()

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

Helper method for the assignment operator.

Definition at line 117 of file G4INCLCluster.hh.

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

Referenced by operator=().

Member Data Documentation

◆ particles

◆ theExcitationEnergy

◆ theParticleSampler

ParticleSampler* G4INCL::Cluster::theParticleSampler
protected

◆ theSpin

ThreeVector G4INCL::Cluster::theSpin
protected

Definition at line 417 of file G4INCLCluster.hh.

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


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