Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4INCL::Cluster Class Reference

#include <G4INCLCluster.hh>

Inheritance diagram for G4INCL::Cluster:
Collaboration diagram for G4INCL::Cluster:

Public Member Functions

 Cluster (const G4int Z, const G4int A, const G4bool createParticleSampler=true)
 Standard Cluster constructor. More...
 
template<class Iterator >
 Cluster (Iterator begin, Iterator end)
 
virtual ~Cluster ()
 
 Cluster (const Cluster &rhs)
 Copy constructor. More...
 
Clusteroperator= (const Cluster &rhs)
 Assignment operator. More...
 
void swap (Cluster &rhs)
 Helper method for the assignment operator. More...
 
ParticleSpecies getSpecies () const
 Get the particle species. More...
 
void deleteParticles ()
 
void clearParticles ()
 
void setZ (const G4int Z)
 Set the charge number of the cluster. More...
 
void setA (const G4int A)
 Set the mass number of the cluster. More...
 
G4double getExcitationEnergy () const
 Get the excitation energy of the cluster. More...
 
void setExcitationEnergy (const G4double e)
 Set the excitation energy of the cluster. More...
 
virtual G4double getTableMass () const
 Get the real particle mass. More...
 
ParticleList const & getParticles () const
 
void removeParticle (Particle *const p)
 Remove a particle from the cluster components. More...
 
void addParticle (Particle *const p)
 
void updateClusterParameters ()
 Set total cluster mass, energy, size, etc. from the particles. More...
 
void addParticles (ParticleList const &pL)
 Add a list of particles to the cluster. More...
 
ParticleList getParticleList () const
 Returns the list of particles that make up the cluster. More...
 
std::string print () const
 
virtual void initializeParticles ()
 Initialise the NuclearDensity pointer and sample the particles. More...
 
void internalBoostToCM ()
 Boost to the CM of the component particles. More...
 
void putParticlesOffShell ()
 Put the cluster components off shell. More...
 
void setPosition (const ThreeVector &position)
 Set the position of the cluster. More...
 
void boost (const ThreeVector &aBoostVector)
 Boost the cluster with the indicated velocity. More...
 
void freezeInternalMotion ()
 Freeze the internal motion of the particles. More...
 
virtual void rotatePosition (const G4double angle, const ThreeVector &axis)
 Rotate position of all the particles. More...
 
virtual void rotateMomentum (const G4double angle, const ThreeVector &axis)
 Rotate momentum of all the particles. More...
 
virtual void makeProjectileSpectator ()
 Make all the components projectile spectators, too. More...
 
virtual void makeTargetSpectator ()
 Make all the components target spectators, too. More...
 
virtual void makeParticipant ()
 Make all the components participants, too. More...
 
ThreeVector const & getSpin () const
 Get the spin of the nucleus. More...
 
void setSpin (const ThreeVector &j)
 Set the spin of the nucleus. More...
 
G4INCL::ThreeVector getAngularMomentum () const
 Get the total angular momentum (orbital + spin) More...
 
- 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. More...
 
Particleoperator= (const Particle &rhs)
 Assignment operator. More...
 
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? More...
 
G4bool isEta () const
 Is this a eta? More...
 
G4bool isOmega () const
 Is this a omega? More...
 
G4bool isEtaPrime () const
 Is this a etaprime? 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...
 
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 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. 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 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 rotatePositionAndMomentum (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 const * getParticles () 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 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
 
G4bool rpCorrelated
 
G4double uncorrelatedMomentum
 

Additional Inherited Members

- Protected Member Functions inherited from G4INCL::Particle
void swap (Particle &rhs)
 Helper method for the assignment operator. More...
 

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

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.),
64  theParticleSampler(NULL)
65  {
67  theZ = Z;
68  theA = A;
69  setINCLMass();
70  if(createParticleSampler)
71  theParticleSampler = new ParticleSampler(A,Z);
72  }
void setINCLMass()
Set the mass of the Particle to its table mass.
double A(double temperature)
ThreeVector theSpin
ParticleSampler * theParticleSampler
G4double theExcitationEnergy
void setType(ParticleType t)

Here is the call graph for this function:

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.),
82  theParticleSampler(NULL)
83  {
85  for(Iterator i = begin; i != end; ++i) {
86  addParticle(*i);
87  }
88  thePosition /= theA;
89  setINCLMass();
91  }
void setINCLMass()
Set the mass of the Particle to its table mass.
ThreeVector theSpin
G4INCL::ThreeVector thePosition
ParticleSampler * theParticleSampler
G4double theExcitationEnergy
void setType(ParticleType t)
void addParticle(Particle *const p)
const ThreeVector & adjustMomentumFromEnergy()
Rescale the momentum to match the total energy.

Here is the call graph for this function:

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

Definition at line 93 of file G4INCLCluster.hh.

93  {
94  delete theParticleSampler;
95  }
ParticleSampler * theParticleSampler
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  theSpin(rhs.theSpin)
102  {
103  for(ParticleIter p=rhs.particles.begin(), e=rhs.particles.end(); p!=e; ++p) {
104  particles.push_back(new Particle(**p));
105  }
106  if(rhs.theParticleSampler)
107  theParticleSampler = new ParticleSampler(rhs.theA,rhs.theZ);
108  else
109  theParticleSampler = NULL;
110  }
const char * p
Definition: xmltok.h:285
ThreeVector theSpin
ParticleList particles
ParticleSampler * theParticleSampler
G4double theExcitationEnergy
ParticleList::const_iterator ParticleIter

Here is the call graph for this function:

Member Function Documentation

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

174  {
175  particles.push_back(p);
176  theEnergy += p->getEnergy();
177  thePotentialEnergy += p->getPotentialEnergy();
178  theMomentum += p->getMomentum();
179  thePosition += p->getPosition();
180  theA += p->getA();
181  theZ += p->getZ();
182  nCollisions += p->getNumberOfCollisions();
183  }
const char * p
Definition: xmltok.h:285
ParticleList particles
G4INCL::ThreeVector thePosition
G4INCL::ThreeVector theMomentum
G4double thePotentialEnergy

Here is the call graph for this function:

Here is the caller graph for this function:

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

Add a list of particles to the cluster.

Definition at line 206 of file G4INCLCluster.hh.

206  {
207  particles = pL;
209  }
void updateClusterParameters()
Set total cluster mass, energy, size, etc. from the particles.
ParticleList particles

Here is the call graph for this function:

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

336  {
337  Particle::boost(aBoostVector);
338  for(ParticleIter p=particles.begin(), e=particles.end(); p!=e; ++p) {
339  (*p)->boost(aBoostVector);
340  // Apply Lorentz contraction to the particle position
341  (*p)->lorentzContract(aBoostVector,thePosition);
342  (*p)->rpCorrelate();
343  }
344 
345  INCL_DEBUG("Cluster was boosted with (bx,by,bz)=("
346  << aBoostVector.getX() << ", " << aBoostVector.getY() << ", " << aBoostVector.getZ() << "):"
347  << '\n' << print());
348 
349  }
const char * p
Definition: xmltok.h:285
void boost(const ThreeVector &aBoostVector)
std::string print() const
ParticleList particles
G4INCL::ThreeVector thePosition
#define INCL_DEBUG(x)
ParticleList::const_iterator ParticleIter

Here is the call graph for this function:

Here is the caller graph for this function:

void G4INCL::Cluster::clearParticles ( )
inline

Definition at line 142 of file G4INCLCluster.hh.

142 { particles.clear(); }
ParticleList particles

Here is the caller graph for this function:

void G4INCL::Cluster::deleteParticles ( )
inline

Definition at line 135 of file G4INCLCluster.hh.

135  {
136  for(ParticleIter p=particles.begin(), e=particles.end(); p!=e; ++p) {
137  delete (*p);
138  }
139  clearParticles();
140  }
const char * p
Definition: xmltok.h:285
ParticleList particles
ParticleList::const_iterator ParticleIter

Here is the call graph for this function:

Here is the caller graph for this function:

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

359  {
360  const ThreeVector &normMomentum = theMomentum / getMass();
361  for(ParticleIter p=particles.begin(), e=particles.end(); p!=e; ++p) {
362  const G4double pMass = (*p)->getMass();
363  const ThreeVector frozenMomentum = normMomentum * pMass;
364  const G4double frozenEnergy = std::sqrt(frozenMomentum.mag2()+pMass*pMass);
365  (*p)->setFrozenMomentum(frozenMomentum);
366  (*p)->setFrozenEnergy(frozenEnergy);
367  (*p)->freezePropagation();
368  }
369  }
G4double getMass() const
Get the cached particle mass.
const char * p
Definition: xmltok.h:285
ParticleList particles
G4INCL::ThreeVector theMomentum
double G4double
Definition: G4Types.hh:76
ParticleList::const_iterator ParticleIter

Here is the call graph for this function:

Here is the caller graph for this function:

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

Get the total angular momentum (orbital + spin)

Reimplemented from G4INCL::Particle.

Definition at line 420 of file G4INCLCluster.hh.

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

Get the excitation energy of the cluster.

Definition at line 151 of file G4INCLCluster.hh.

151 { return theExcitationEnergy; }
G4double theExcitationEnergy

Here is the caller graph for this function:

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

Returns the list of particles that make up the cluster.

Definition at line 212 of file G4INCLCluster.hh.

212 { return particles; }
ParticleList particles
ParticleList const& G4INCL::Cluster::getParticles ( ) const
inline

Get the list of particles in the cluster.

Definition at line 165 of file G4INCLCluster.hh.

165 { return particles; }
ParticleList particles

Here is the caller graph for this function:

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

Get the particle species.

Reimplemented from G4INCL::Particle.

Definition at line 131 of file G4INCLCluster.hh.

131  {
132  return ParticleSpecies(theA, theZ);
133  }
ThreeVector const& G4INCL::Cluster::getSpin ( ) const
inline

Get the spin of the nucleus.

Definition at line 414 of file G4INCLCluster.hh.

414 { return theSpin; }
ThreeVector theSpin

Here is the caller graph for this function:

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

Get the real particle mass.

Overloads the Particle method.

Reimplemented from G4INCL::Particle.

Definition at line 160 of file G4INCLCluster.hh.

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

Here is the call graph for this function:

Here is the caller graph for this function:

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  }
void updateClusterParameters()
Set total cluster mass, energy, size, etc. from the particles.
int G4int
Definition: G4Types.hh:78
void sampleParticlesIntoList(ThreeVector const &position, ParticleList &theList)
std::string print() const
ParticleList particles
G4INCL::ThreeVector thePosition
ParticleSampler * theParticleSampler
#define INCL_DEBUG(x)

Here is the call graph for this function:

Here is the caller graph for this function:

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

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

Make all the components participants, 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)->makeParticipant();
410  }
411  }
const char * p
Definition: xmltok.h:285
ParticleList particles
virtual void makeParticipant()
ParticleList::const_iterator ParticleIter

Here is the call graph for this function:

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

Make all the components projectile spectators, too.

Reimplemented from G4INCL::Particle.

Definition at line 390 of file G4INCLCluster.hh.

390  {
392  for(ParticleIter p=particles.begin(), e=particles.end(); p!=e; ++p) {
393  (*p)->makeProjectileSpectator();
394  }
395  }
const char * p
Definition: xmltok.h:285
virtual void makeProjectileSpectator()
ParticleList particles
ParticleList::const_iterator ParticleIter

Here is the call graph for this function:

Here is the caller graph for this function:

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

Make all the components target 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)->makeTargetSpectator();
402  }
403  }
virtual void makeTargetSpectator()
const char * p
Definition: xmltok.h:285
ParticleList particles
ParticleList::const_iterator ParticleIter

Here is the call graph for this function:

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

Assignment operator.

Definition at line 113 of file G4INCLCluster.hh.

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

Here is the call graph for this function:

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

Definition at line 214 of file G4INCLCluster.hh.

214  {
215  std::stringstream ss;
216  ss << "Cluster (ID = " << ID << ") type = ";
218  ss << '\n'
219  << " A = " << theA << '\n'
220  << " Z = " << theZ << '\n'
221  << " mass = " << getMass() << '\n'
222  << " energy = " << theEnergy << '\n'
223  << " momentum = "
224  << theMomentum.print()
225  << '\n'
226  << " position = "
227  << thePosition.print()
228  << '\n'
229  << "Contains the following particles:"
230  << '\n';
231  for(ParticleIter i=particles.begin(), e=particles.end(); i!=e; ++i)
232  ss << (*i)->print();
233  ss << '\n';
234  return ss.str();
235  }
G4double getMass() const
Get the cached particle mass.
ParticleList particles
G4INCL::ThreeVector thePosition
G4INCL::ParticleType theType
G4INCL::ThreeVector theMomentum
std::string print() const
ParticleList::const_iterator ParticleIter
std::string getName(const ParticleType t)
Get the native INCL name of the particle.

Here is the call graph for this function:

Here is the caller graph for this function:

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

298  {
299  // Compute the dynamical potential
300  const G4double theDynamicalPotential = computeDynamicalPotential();
301  INCL_DEBUG("The dynamical potential is " << theDynamicalPotential << " MeV" << '\n');
302 
303  for(ParticleIter p=particles.begin(), e=particles.end(); p!=e; ++p) {
304  const G4double energy = (*p)->getEnergy() - theDynamicalPotential;
305  const ThreeVector &momentum = (*p)->getMomentum();
306  // Here particles are put off-shell so that we can satisfy the energy-
307  // and momentum-conservation laws
308  (*p)->setEnergy(energy);
309  (*p)->setMass(std::sqrt(energy*energy - momentum.mag2()));
310  }
311  INCL_DEBUG("Cluster components are now off shell:" << '\n'
312  << print());
313  }
const char * p
Definition: xmltok.h:285
std::string print() const
ParticleList particles
G4double energy(const ThreeVector &p, const G4double m)
double G4double
Definition: G4Types.hh:76
#define INCL_DEBUG(x)
ParticleList::const_iterator ParticleIter

Here is the call graph for this function:

Here is the caller graph for this function:

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

Remove a particle from the cluster components.

Definition at line 168 of file G4INCLCluster.hh.

168 { particles.remove(p); }
const char * p
Definition: xmltok.h:285
ParticleList particles

Here is the call graph for this function:

Here is the caller graph for this function:

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  {
66  for(ParticleIter p=particles.begin(), e=particles.end(); p!=e; ++p) {
67  (*p)->rotateMomentum(angle, axis);
68  }
69  }
const char * p
Definition: xmltok.h:285
static G4double angle[DIM]
virtual void rotateMomentum(const G4double angle, const ThreeVector &axis)
Rotate the particle momentum.
ParticleList particles
ParticleList::const_iterator ParticleIter

Here is the call graph for this function:

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  {
59  for(ParticleIter p=particles.begin(), e=particles.end(); p!=e; ++p) {
60  (*p)->rotatePosition(angle, axis);
61  }
62  }
const char * p
Definition: xmltok.h:285
virtual void rotatePosition(const G4double angle, const ThreeVector &axis)
Rotate the particle position.
static G4double angle[DIM]
ParticleList particles
ParticleList::const_iterator ParticleIter

Here is the call graph for this function:

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

Set the mass number of the cluster.

Definition at line 148 of file G4INCLCluster.hh.

148 { theA = A; }
double A(double temperature)

Here is the call graph for this function:

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

Set the excitation energy of the cluster.

Definition at line 154 of file G4INCLCluster.hh.

154 { theExcitationEnergy=e; }
G4double theExcitationEnergy

Here is the caller graph for this function:

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

320  {
321  ThreeVector shift(position-thePosition);
323  for(ParticleIter p=particles.begin(), e=particles.end(); p!=e; ++p) {
324  (*p)->setPosition((*p)->getPosition()+shift);
325  }
326  }
const char * p
Definition: xmltok.h:285
ParticleList particles
virtual void setPosition(const G4INCL::ThreeVector &position)
G4INCL::ThreeVector thePosition
ParticleList::const_iterator ParticleIter

Here is the call graph for this function:

Here is the caller graph for this function:

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

Set the spin of the nucleus.

Definition at line 417 of file G4INCLCluster.hh.

417 { theSpin = j; }
ThreeVector theSpin

Here is the caller graph for this function:

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

Set the charge number of the cluster.

Definition at line 145 of file G4INCLCluster.hh.

145 { theZ = Z; }
void G4INCL::Cluster::swap ( Cluster rhs)
inline

Helper method for the assignment operator.

Definition at line 121 of file G4INCLCluster.hh.

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

Here is the call graph for this function:

Here is the caller graph for this function:

void G4INCL::Cluster::updateClusterParameters ( )
inline

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

Definition at line 186 of file G4INCLCluster.hh.

186  {
187  theEnergy = 0.;
188  thePotentialEnergy = 0.;
189  theMomentum = ThreeVector();
190  thePosition = ThreeVector();
191  theA = 0;
192  theZ = 0;
193  nCollisions = 0;
194  for(ParticleIter p=particles.begin(), e=particles.end(); p!=e; ++p) {
195  theEnergy += (*p)->getEnergy();
196  thePotentialEnergy += (*p)->getPotentialEnergy();
197  theMomentum += (*p)->getMomentum();
198  thePosition += (*p)->getPosition();
199  theA += (*p)->getA();
200  theZ += (*p)->getZ();
201  nCollisions += (*p)->getNumberOfCollisions();
202  }
203  }
const char * p
Definition: xmltok.h:285
ParticleList particles
G4INCL::ThreeVector thePosition
G4INCL::ThreeVector theMomentum
G4double thePotentialEnergy
ParticleList::const_iterator ParticleIter

Here is the caller graph for this function:

Member Data Documentation

ParticleList G4INCL::Cluster::particles
protected

Definition at line 443 of file G4INCLCluster.hh.

G4double G4INCL::Cluster::theExcitationEnergy
protected

Definition at line 444 of file G4INCLCluster.hh.

ParticleSampler* G4INCL::Cluster::theParticleSampler
protected

Definition at line 446 of file G4INCLCluster.hh.

ThreeVector G4INCL::Cluster::theSpin
protected

Definition at line 445 of file G4INCLCluster.hh.


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