Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions
G4INCL::ProjectileRemnant Class Reference

#include <G4INCLProjectileRemnant.hh>

Inheritance diagram for G4INCL::ProjectileRemnant:
G4INCL::Cluster G4INCL::Particle

Public Types

typedef std::vector< G4doubleEnergyLevels
 
typedef std::map< long, G4doubleEnergyLevelMap
 

Public Member Functions

 ProjectileRemnant (ParticleSpecies const species, const G4double kineticEnergy)
 
 ~ProjectileRemnant ()
 
void reset ()
 Reset the projectile remnant to the state at the beginning of the cascade. More...
 
void removeParticle (Particle *const p, const G4double theProjectileCorrection)
 Remove a nucleon from the projectile remnant. More...
 
ParticleList addDynamicalSpectators (ParticleList pL)
 Add back dynamical spectators to the projectile remnant. More...
 
ParticleList addMostDynamicalSpectators (ParticleList pL)
 Add back dynamical spectators to the projectile remnant. More...
 
ParticleList addAllDynamicalSpectators (ParticleList pL)
 Add back all dynamical spectators to the projectile remnant. More...
 
void deleteStoredComponents ()
 Clear the stored projectile components and delete the particles. More...
 
void clearStoredComponents ()
 Clear the stored projectile components. More...
 
void clearEnergyLevels ()
 Clear the stored energy levels. More...
 
G4double computeExcitationEnergyExcept (const long exceptID) const
 Compute the excitation energy when a nucleon is removed. More...
 
G4double computeExcitationEnergyWith (const ParticleList &pL) const
 Compute the excitation energy if some nucleons are put back. More...
 
void storeComponents ()
 Store the projectile components. More...
 
G4int getNumberStoredComponents () const
 Get the number of the stored components. More...
 
void storeEnergyLevels ()
 Store the energy levels. More...
 
EnergyLevels const & getGroundStateEnergies () const
 
- Public Member Functions inherited from G4INCL::Cluster
 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 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 rotate (const G4double angle, const ThreeVector &axis)
 Rotate position and 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 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 isInList (ParticleList const &l) const
 Check if the particle belongs to a given list. More...
 
G4bool isCluster () const
 
void setFrozenMomentum (const ThreeVector &momentum)
 Set the frozen particle momentum. More...
 
void setFrozenEnergy (const G4double energy)
 Set the frozen particle momentum. More...
 
ThreeVector getFrozenMomentum () const
 Get the frozen particle momentum. More...
 
G4double getFrozenEnergy () const
 Get the frozen particle momentum. More...
 
ThreeVector getPropagationVelocity () const
 Get the propagation velocity of the particle. More...
 
void freezePropagation ()
 Freeze particle propagation. More...
 
void thawPropagation ()
 Unfreeze particle propagation. More...
 
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...
 

Additional Inherited Members

- Protected Member Functions inherited from G4INCL::Particle
void swap (Particle &rhs)
 Helper method for the assignment operator. More...
 
- Protected Attributes inherited from G4INCL::Cluster
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
 

Detailed Description

Definition at line 59 of file G4INCLProjectileRemnant.hh.

Member Typedef Documentation

Definition at line 64 of file G4INCLProjectileRemnant.hh.

Definition at line 63 of file G4INCLProjectileRemnant.hh.

Constructor & Destructor Documentation

G4INCL::ProjectileRemnant::ProjectileRemnant ( ParticleSpecies const  species,
const G4double  kineticEnergy 
)
inline

Definition at line 66 of file G4INCLProjectileRemnant.hh.

References G4INCL::Cluster::boost(), energy(), G4INCL::Cluster::freezeInternalMotion(), G4INCL::Particle::getMass(), G4INCL::Cluster::initializeParticles(), G4INCL::Cluster::internalBoostToCM(), G4INCL::Cluster::makeProjectileSpectator(), G4INCL::Cluster::putParticlesOffShell(), G4INCL::Particle::setTableMass(), and storeEnergyLevels().

67  : Cluster(species.theZ, species.theA) {
68 
69  // Use the table mass
70  setTableMass();
71 
72  // Set the kinematics
73  const G4double projectileMass = getMass();
74  const G4double energy = kineticEnergy + projectileMass;
75  const G4double momentumZ = std::sqrt(energy*energy - projectileMass*projectileMass);
76 
77  // Initialise the particles
81 
82  // Store the energy levels of the ProjectileRemnant (used to compute its
83  // excitation energy)
85 
86  // Boost the whole thing
87  const ThreeVector aBoostVector = ThreeVector(0.0, 0.0, momentumZ / energy);
88  boost(-aBoostVector);
89 
90  // Freeze the internal motion of the particles
92 
93  // Set as projectile spectator
95  }
G4double getMass() const
Get the cached particle mass.
void storeEnergyLevels()
Store the energy levels.
void putParticlesOffShell()
Put the cluster components off shell.
void boost(const ThreeVector &aBoostVector)
Boost the cluster with the indicated velocity.
double precision function energy(A, Z)
Definition: dpm25nuc6.f:4106
virtual void initializeParticles()
Initialise the NuclearDensity pointer and sample the particles.
void freezeInternalMotion()
Freeze the internal motion of the particles.
void setTableMass()
Set the mass of the Particle to its table mass.
void internalBoostToCM()
Boost to the CM of the component particles.
virtual void makeProjectileSpectator()
Make all the components projectile spectators, too.
double G4double
Definition: G4Types.hh:76
Cluster(const G4int Z, const G4int A, const G4bool createParticleSampler=true)
Standard Cluster constructor.
G4INCL::ProjectileRemnant::~ProjectileRemnant ( )
inline

Definition at line 97 of file G4INCLProjectileRemnant.hh.

References clearEnergyLevels(), G4INCL::Cluster::deleteParticles(), and deleteStoredComponents().

97  {
99  // The ProjectileRemnant owns its particles
100  deleteParticles();
102  }
void deleteStoredComponents()
Clear the stored projectile components and delete the particles.
void clearEnergyLevels()
Clear the stored energy levels.

Member Function Documentation

ParticleList G4INCL::ProjectileRemnant::addAllDynamicalSpectators ( ParticleList  pL)

Add back all dynamical spectators to the projectile remnant.

Return a list of rejected dynamical spectators.

Definition at line 143 of file G4INCLProjectileRemnant.cc.

References addMostDynamicalSpectators(), computeExcitationEnergyWith(), G4INCL::ParticleTable::getTableMass, INCL_DEBUG, INCL_WARN, G4INCL::ThreeVector::mag2(), G4INCL::Cluster::particles, G4INCL::Particle::theA, G4INCL::Particle::theEnergy, G4INCL::Particle::theMomentum, and G4INCL::Particle::theZ.

143  {
144  // Put all the spectators in the projectile
145  ThreeVector theNewMomentum = theMomentum;
146  G4double theNewEnergy = theEnergy;
147  G4int theNewA = theA;
148  G4int theNewZ = theZ;
149  for(ParticleIter p=pL.begin(), e=pL.end(); p!=e; ++p) {
150 // assert((*p)->isNucleon());
151  // Add the initial (off-shell) momentum and energy to the projectile remnant
152  theNewMomentum += getStoredMomentum(*p);
153  theNewEnergy += (*p)->getEnergy();
154  theNewA += (*p)->getA();
155  theNewZ += (*p)->getZ();
156  }
157 
158  // Check that the excitation energy of the new projectile remnant is non-negative
159  const G4double theNewMass = ParticleTable::getTableMass(theNewA,theNewZ);
160  const G4double theNewExcitationEnergy = computeExcitationEnergyWith(pL);
161  const G4double theNewEffectiveMass = theNewMass + theNewExcitationEnergy;
162 
163  // If this condition is satisfied, there is no solution. Fall back on the
164  // "most" method
165  if(theNewEnergy<theNewEffectiveMass) {
166  INCL_WARN("Could not add all the dynamical spectators back into the projectile remnant."
167  << " Falling back to the \"most\" method." << std::endl);
168  return addMostDynamicalSpectators(pL);
169  }
170 
171  // Add all the participants to the projectile remnant
172  for(ParticleIter p=pL.begin(), e=pL.end(); p!=e; ++p) {
173  particles.push_back(*p);
174  }
175 
176  // Rescale the momentum of the projectile remnant so that sqrt(s) has the
177  // correct value
178  const G4double scalingFactorSquared = (theNewEnergy*theNewEnergy-theNewEffectiveMass*theNewEffectiveMass)/theNewMomentum.mag2();
179  const G4double scalingFactor = std::sqrt(scalingFactorSquared);
180  INCL_DEBUG("Scaling factor for the projectile-remnant momentum = " << scalingFactor << std::endl);
181 
182  theA = theNewA;
183  theZ = theNewZ;
184  theMomentum = theNewMomentum * scalingFactor;
185  theEnergy = theNewEnergy;
186 
187  return ParticleList();
188  }
const char * p
Definition: xmltok.h:285
#define INCL_WARN(x)
int G4int
Definition: G4Types.hh:78
G4double computeExcitationEnergyWith(const ParticleList &pL) const
Compute the excitation energy if some nucleons are put back.
UnorderedVector< Particle * > ParticleList
ParticleList particles
G4ThreadLocal NuclearMassFn getTableMass
Static pointer to the mass function for nuclei.
ParticleList addMostDynamicalSpectators(ParticleList pL)
Add back dynamical spectators to the projectile remnant.
G4INCL::ThreeVector theMomentum
double G4double
Definition: G4Types.hh:76
#define INCL_DEBUG(x)
ParticleList::const_iterator ParticleIter
ParticleList G4INCL::ProjectileRemnant::addDynamicalSpectators ( ParticleList  pL)

Add back dynamical spectators to the projectile remnant.

Try to add the dynamical spectators back to the projectile remnant. Refuse to do so if this leads to a negative projectile excitation energy.

Return a list of rejected dynamical spectators.

Definition at line 123 of file G4INCLProjectileRemnant.cc.

References G4INCL::UnorderedVector< T >::remove().

123  {
124  // Try as hard as possible to add back all the dynamical spectators.
125  // Don't add spectators that lead to negative excitation energies, but
126  // iterate over the spectators as many times as possible, until
127  // absolutely sure that all of them were rejected.
128  unsigned int accepted;
129  do {
130  accepted = 0;
131  ParticleList toBeAdded = pL;
132  for(ParticleIter p=toBeAdded.begin(), e=toBeAdded.end(); p!=e; ++p) {
133  G4bool isAccepted = addDynamicalSpectator(*p);
134  if(isAccepted) {
135  pL.remove(*p);
136  accepted++;
137  }
138  }
139  } while(accepted > 0);
140  return pL;
141  }
const char * p
Definition: xmltok.h:285
UnorderedVector< Particle * > ParticleList
bool G4bool
Definition: G4Types.hh:79
ParticleList::const_iterator ParticleIter
ParticleList G4INCL::ProjectileRemnant::addMostDynamicalSpectators ( ParticleList  pL)

Add back dynamical spectators to the projectile remnant.

Try as hard as possible to add back all the dynamical spectators. Don't add spectators that lead to negative excitation energies. Start by adding all of them, and repeatedly remove the most troublesome one until the excitation energy becomes non-negative.

Return a list of rejected dynamical spectators.

Definition at line 190 of file G4INCLProjectileRemnant.cc.

References G4INCL::ParticleTable::getTableMass, G4INCL::ThreeVector::mag2(), G4INCL::Math::max(), G4INCL::Cluster::particles, G4INCL::Particle::theA, G4INCL::Particle::theEnergy, G4INCL::Particle::theMomentum, and G4INCL::Particle::theZ.

Referenced by addAllDynamicalSpectators().

190  {
191  // Try as hard as possible to add back all the dynamical spectators.
192  // Don't add spectators that lead to negative excitation energies. Start by
193  // adding all of them, and repeatedly remove the most troublesome one until
194  // the excitation energy becomes non-negative.
195 
196  // Put all the spectators in the projectile
197  ThreeVector theNewMomentum = theMomentum;
198  G4double theNewEnergy = theEnergy;
199  G4int theNewA = theA;
200  G4int theNewZ = theZ;
201  for(ParticleIter p=pL.begin(), e=pL.end(); p!=e; ++p) {
202 // assert((*p)->isNucleon());
203  // Add the initial (off-shell) momentum and energy to the projectile remnant
204  theNewMomentum += getStoredMomentum(*p);
205  theNewEnergy += (*p)->getEnergy();
206  theNewA += (*p)->getA();
207  theNewZ += (*p)->getZ();
208  }
209 
210  // Check that the excitation energy of the new projectile remnant is non-negative
211  const G4double theNewMass = ParticleTable::getTableMass(theNewA,theNewZ);
212  const G4double theNewInvariantMassSquared = theNewEnergy*theNewEnergy-theNewMomentum.mag2();
213 
214  G4bool positiveExcitationEnergy = false;
215  if(theNewInvariantMassSquared>=0.) {
216  const G4double theNewInvariantMass = std::sqrt(theNewInvariantMassSquared);
217  positiveExcitationEnergy = (theNewInvariantMass-theNewMass>-1.e-5);
218  }
219 
220  // Keep removing nucleons from the projectile remnant until we achieve a
221  // non-negative excitation energy.
222  ParticleList rejected;
223  while(!positiveExcitationEnergy && !pL.empty()) {
224  G4double maxExcitationEnergy = -1.E30;
225  ParticleMutableIter best = pL.end();
226  ThreeVector bestMomentum;
227  G4double bestEnergy = -1.;
228  G4int bestA = -1, bestZ = -1;
229  for(ParticleList::iterator p=pL.begin(), e=pL.end(); p!=e; ++p) {
230  // Subtract the initial (off-shell) momentum and energy from the new
231  // projectile remnant
232  const ThreeVector theNewerMomentum = theNewMomentum - getStoredMomentum(*p);
233  const G4double theNewerEnergy = theNewEnergy - (*p)->getEnergy();
234  const G4int theNewerA = theNewA - (*p)->getA();
235  const G4int theNewerZ = theNewZ - (*p)->getZ();
236 
237  const G4double theNewerMass = ParticleTable::getTableMass(theNewerA,theNewerZ);
238  const G4double theNewerInvariantMassSquared = theNewerEnergy*theNewerEnergy-theNewerMomentum.mag2();
239 
240  if(theNewerInvariantMassSquared>=-1.e-5) {
241  const G4double theNewerInvariantMass = std::sqrt(std::max(0.,theNewerInvariantMassSquared));
242  const G4double theNewerExcitationEnergy = ((theNewerA>1) ? theNewerInvariantMass-theNewerMass : 0.);
243  // Pick the nucleon that maximises the excitation energy of the
244  // ProjectileRemnant
245  if(theNewerExcitationEnergy>maxExcitationEnergy) {
246  best = p;
247  maxExcitationEnergy = theNewerExcitationEnergy;
248  bestMomentum = theNewerMomentum;
249  bestEnergy = theNewerEnergy;
250  bestA = theNewerA;
251  bestZ = theNewerZ;
252  }
253  }
254  }
255 
256  // If we couldn't even calculate the excitation energy, fail miserably
257  if(best==pL.end())
258  return pL;
259 
260  rejected.push_back(*best);
261  pL.erase(best);
262  theNewMomentum = bestMomentum;
263  theNewEnergy = bestEnergy;
264  theNewA = bestA;
265  theNewZ = bestZ;
266 
267  if(maxExcitationEnergy>0.) {
268  // Stop here
269  positiveExcitationEnergy = true;
270  }
271  }
272 
273  // Add the accepted participants to the projectile remnant
274  for(ParticleIter p=pL.begin(), e=pL.end(); p!=e; ++p) {
275  particles.push_back(*p);
276  }
277  theA = theNewA;
278  theZ = theNewZ;
279  theMomentum = theNewMomentum;
280  theEnergy = theNewEnergy;
281 
282  return rejected;
283  }
const char * p
Definition: xmltok.h:285
int G4int
Definition: G4Types.hh:78
UnorderedVector< Particle * > ParticleList
bool G4bool
Definition: G4Types.hh:79
ParticleList particles
T max(const T t1, const T t2)
brief Return the largest of the two arguments
G4ThreadLocal NuclearMassFn getTableMass
Static pointer to the mass function for nuclei.
G4INCL::ThreeVector theMomentum
double G4double
Definition: G4Types.hh:76
ParticleList::iterator ParticleMutableIter
ParticleList::const_iterator ParticleIter
void G4INCL::ProjectileRemnant::clearEnergyLevels ( )
inline

Clear the stored energy levels.

Definition at line 154 of file G4INCLProjectileRemnant.hh.

Referenced by ~ProjectileRemnant().

154  {
155  theInitialEnergyLevels.clear();
156  theGroundStateEnergies.clear();
157  }
void G4INCL::ProjectileRemnant::clearStoredComponents ( )
inline

Clear the stored projectile components.

Definition at line 149 of file G4INCLProjectileRemnant.hh.

Referenced by deleteStoredComponents().

149  {
150  storedComponents.clear();
151  }
G4double G4INCL::ProjectileRemnant::computeExcitationEnergyExcept ( const long  exceptID) const

Compute the excitation energy when a nucleon is removed.

Compute the excitation energy of the projectile-like remnant as the difference between the initial and the present configuration. This follows the algorithm proposed by A. Boudard in INCL4.2-HI, as implemented in Geant4.

Returns
the excitation energy

Definition at line 315 of file G4INCLProjectileRemnant.cc.

Referenced by G4INCL::ParticleEntryChannel::getFinalState().

315  {
316  const EnergyLevels theEnergyLevels = getPresentEnergyLevelsExcept(exceptID);
317  return computeExcitationEnergy(theEnergyLevels);
318  }
std::vector< G4double > EnergyLevels
G4double G4INCL::ProjectileRemnant::computeExcitationEnergyWith ( const ParticleList pL) const

Compute the excitation energy if some nucleons are put back.

Returns
the excitation energy

Definition at line 320 of file G4INCLProjectileRemnant.cc.

Referenced by addAllDynamicalSpectators().

320  {
321  const EnergyLevels theEnergyLevels = getPresentEnergyLevelsWith(pL);
322  return computeExcitationEnergy(theEnergyLevels);
323  }
std::vector< G4double > EnergyLevels
void G4INCL::ProjectileRemnant::deleteStoredComponents ( )
inline

Clear the stored projectile components and delete the particles.

Definition at line 142 of file G4INCLProjectileRemnant.hh.

References clearStoredComponents().

Referenced by ~ProjectileRemnant().

142  {
143  for(std::map<long,Particle*>::const_iterator p=storedComponents.begin(), e=storedComponents.end(); p!=e; ++p)
144  delete p->second;
146  }
const char * p
Definition: xmltok.h:285
void clearStoredComponents()
Clear the stored projectile components.
EnergyLevels const& G4INCL::ProjectileRemnant::getGroundStateEnergies ( ) const
inline

Definition at line 208 of file G4INCLProjectileRemnant.hh.

208  {
209  return theGroundStateEnergies;
210  }
G4int G4INCL::ProjectileRemnant::getNumberStoredComponents ( ) const
inline

Get the number of the stored components.

Definition at line 185 of file G4INCLProjectileRemnant.hh.

185  {
186  return storedComponents.size();
187  }
void G4INCL::ProjectileRemnant::removeParticle ( Particle *const  p,
const G4double  theProjectileCorrection 
)

Remove a nucleon from the projectile remnant.

Parameters
pparticle to be removed
theProjectileCorrectioncorrection to be given to the projectile total energy

Definition at line 78 of file G4INCLProjectileRemnant.cc.

References G4INCL::Particle::getA(), G4INCL::Particle::getEnergy(), G4INCL::Particle::getMomentum(), G4INCL::Particle::getZ(), INCL_DEBUG, G4INCL::Cluster::particles, G4INCL::Cluster::print(), G4INCL::Particle::print(), G4INCL::Cluster::removeParticle(), G4INCL::Particle::theA, G4INCL::Particle::theEnergy, G4INCL::Particle::theMomentum, and G4INCL::Particle::theZ.

Referenced by G4INCL::ParticleEntryChannel::getFinalState().

78  {
79 // assert(p->isNucleon());
80 
81  INCL_DEBUG("The following Particle is about to be removed from the ProjectileRemnant:"
82  << std::endl << p->print()
83  << "theProjectileCorrection=" << theProjectileCorrection << std::endl);
84  // Update A, Z, momentum and energy of the projectile remnant
85  theA -= p->getA();
86  theZ -= p->getZ();
87 
88  ThreeVector const &oldMomentum = p->getMomentum();
89  const G4double oldEnergy = p->getEnergy();
91 
92 #if !defined(NDEBUG) && !defined(INCLXX_IN_GEANT4_MODE)
93  ThreeVector theTotalMomentum;
94  G4double theTotalEnergy = 0.;
95  const G4double theThreshold = 0.1;
96 #endif
97 
98  if(getA()>0) { // if there are any particles left
99 // assert((unsigned int)getA()==particles.size());
100 
101  const G4double theProjectileCorrectionPerNucleon = theProjectileCorrection / particles.size();
102 
103  // Update the kinematics of the components
104  for(ParticleIter i=particles.begin(), e=particles.end(); i!=e; ++i) {
105  (*i)->setEnergy((*i)->getEnergy() + theProjectileCorrectionPerNucleon);
106  (*i)->setMass((*i)->getInvariantMass());
107 #if !defined(NDEBUG) && !defined(INCLXX_IN_GEANT4_MODE)
108  theTotalMomentum += (*i)->getMomentum();
109  theTotalEnergy += (*i)->getEnergy();
110 #endif
111  }
112  }
113 
114  theMomentum -= oldMomentum;
115  theEnergy -= oldEnergy - theProjectileCorrection;
116 
117 // assert(std::abs((theTotalMomentum-theMomentum).mag())<theThreshold);
118 // assert(std::abs(theTotalEnergy-theEnergy)<theThreshold);
119  INCL_DEBUG("After Particle removal, the ProjectileRemnant looks like this:"
120  << std::endl << print());
121  }
G4int getA() const
Returns the baryon number.
const char * p
Definition: xmltok.h:285
std::string print() const
ParticleList particles
void removeParticle(Particle *const p)
Remove a particle from the cluster components.
G4INCL::ThreeVector theMomentum
double G4double
Definition: G4Types.hh:76
#define INCL_DEBUG(x)
ParticleList::const_iterator ParticleIter
void G4INCL::ProjectileRemnant::reset ( )

Reset the projectile remnant to the state at the beginning of the cascade.

Definition at line 54 of file G4INCLProjectileRemnant.cc.

References G4INCL::Cluster::addParticle(), G4INCL::Cluster::deleteParticles(), G4INCL::Particle::getID(), INCL_DEBUG, G4INCL::Particle::nCollisions, G4INCL::Particle::Particle(), G4INCL::Cluster::print(), G4INCL::Particle::setTableMass(), G4INCL::Particle::theA, G4INCL::Particle::theEnergy, G4INCL::Particle::theMomentum, G4INCL::Particle::thePosition, G4INCL::Particle::thePotentialEnergy, and G4INCL::Particle::theZ.

54  {
56  thePosition = ThreeVector();
57  theMomentum = ThreeVector();
58  theEnergy = 0.0;
59  thePotentialEnergy = 0.0;
60  theA = 0;
61  theZ = 0;
62  nCollisions = 0;
63 
64  for(std::map<long, Particle*>::const_iterator i=storedComponents.begin(); i!=storedComponents.end(); ++i) {
65  Particle *p = new Particle(*(i->second));
66  EnergyLevelMap::iterator energyIter = theInitialEnergyLevels.find(i->first);
67 // assert(energyIter!=theInitialEnergyLevels.end());
68  const G4double energyLevel = energyIter->second;
69  theInitialEnergyLevels.erase(energyIter);
70  theInitialEnergyLevels[p->getID()] = energyLevel;
71  addParticle(p);
72  }
73  thePosition /= theA;
74  setTableMass();
75  INCL_DEBUG("ProjectileRemnant object was reset:" << std::endl << print());
76  }
const char * p
Definition: xmltok.h:285
std::string print() const
G4INCL::ThreeVector thePosition
void setTableMass()
Set the mass of the Particle to its table mass.
void addParticle(Particle *const p)
G4INCL::ThreeVector theMomentum
double G4double
Definition: G4Types.hh:76
#define INCL_DEBUG(x)
G4double thePotentialEnergy
void G4INCL::ProjectileRemnant::storeComponents ( )
inline

Store the projectile components.

Definition at line 177 of file G4INCLProjectileRemnant.hh.

References G4INCL::Particle::Particle(), and G4INCL::Cluster::particles.

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

177  {
178  for(ParticleIter p=particles.begin(), e=particles.end(); p!=e; ++p) {
179  // Store the particles (needed for forced CN)
180  storedComponents[(*p)->getID()]=new Particle(**p);
181  }
182  }
const char * p
Definition: xmltok.h:285
ParticleList particles
ParticleList::const_iterator ParticleIter
void G4INCL::ProjectileRemnant::storeEnergyLevels ( )
inline

Store the energy levels.

Definition at line 190 of file G4INCLProjectileRemnant.hh.

References G4INCL::Cluster::particles, and sort().

Referenced by ProjectileRemnant().

190  {
191  EnergyLevels energies;
192 
193  for(ParticleIter p=particles.begin(), e=particles.end(); p!=e; ++p) {
194  const G4double theCMEnergy = (*p)->getEnergy();
195  // Store the CM energy in the EnergyLevels map
196  theInitialEnergyLevels[(*p)->getID()] = theCMEnergy;
197  energies.push_back(theCMEnergy);
198  }
199 
200  std::sort(energies.begin(), energies.end());
201 // assert(energies.size()==(unsigned int)theA);
202  theGroundStateEnergies.resize(energies.size());
203  // Compute the partial sums of the CM energies -- they are our reference
204  // ground-state energies for any number of nucleons
205  std::partial_sum(energies.begin(), energies.end(), theGroundStateEnergies.begin());
206  }
const char * p
Definition: xmltok.h:285
subroutine sort(A, N)
Definition: dpm25nuc7.f:4670
ParticleList particles
std::vector< G4double > EnergyLevels
double G4double
Definition: G4Types.hh:76
ParticleList::const_iterator ParticleIter

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