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

#include <G4INCLProjectileRemnant.hh>

+ Inheritance diagram for G4INCL::ProjectileRemnant:

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

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.
 
- Protected Attributes inherited from G4INCL::Cluster
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)
 

Detailed Description

Definition at line 58 of file G4INCLProjectileRemnant.hh.

Member Typedef Documentation

◆ EnergyLevelMap

Definition at line 63 of file G4INCLProjectileRemnant.hh.

◆ EnergyLevels

Definition at line 62 of file G4INCLProjectileRemnant.hh.

Constructor & Destructor Documentation

◆ ProjectileRemnant()

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

Definition at line 65 of file G4INCLProjectileRemnant.hh.

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

◆ ~ProjectileRemnant()

G4INCL::ProjectileRemnant::~ProjectileRemnant ( )
inline

Definition at line 96 of file G4INCLProjectileRemnant.hh.

96 {
98 // The ProjectileRemnant owns its particles
101 }
void clearEnergyLevels()
Clear the stored energy levels.
void deleteStoredComponents()
Clear the stored projectile components and delete the particles.

Member Function Documentation

◆ addAllDynamicalSpectators()

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

Add back all dynamical spectators to the projectile remnant.

Return a list of rejected dynamical spectators.

Definition at line 144 of file G4INCLProjectileRemnant.cc.

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

◆ addDynamicalSpectators()

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 121 of file G4INCLProjectileRemnant.cc.

121 {
122 // Try as hard as possible to add back all the dynamical spectators.
123 // Don't add spectators that lead to negative excitation energies, but
124 // iterate over the spectators as many times as possible, until
125 // absolutely sure that all of them were rejected.
126 unsigned int accepted;
127 unsigned long loopCounter = 0;
128 const unsigned long maxLoopCounter = 10000000;
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 ++loopCounter;
140 } while(loopCounter<maxLoopCounter && accepted > 0); /* Loop checking, 10.07.2015, D.Mancusi */
141 return pL;
142 }
bool G4bool
Definition: G4Types.hh:86

◆ addMostDynamicalSpectators()

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 194 of file G4INCLProjectileRemnant.cc.

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

Referenced by addAllDynamicalSpectators().

◆ clearEnergyLevels()

void G4INCL::ProjectileRemnant::clearEnergyLevels ( )
inline

Clear the stored energy levels.

Definition at line 153 of file G4INCLProjectileRemnant.hh.

153 {
154 theInitialEnergyLevels.clear();
155 theGroundStateEnergies.clear();
156 }

Referenced by ~ProjectileRemnant().

◆ clearStoredComponents()

void G4INCL::ProjectileRemnant::clearStoredComponents ( )
inline

Clear the stored projectile components.

Definition at line 148 of file G4INCLProjectileRemnant.hh.

148 {
149 storedComponents.clear();
150 }

Referenced by deleteStoredComponents().

◆ computeExcitationEnergyExcept()

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 325 of file G4INCLProjectileRemnant.cc.

325 {
326 const EnergyLevels theEnergyLevels = getPresentEnergyLevelsExcept(exceptID);
327 return computeExcitationEnergy(theEnergyLevels);
328 }
std::vector< G4double > EnergyLevels

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

◆ computeExcitationEnergyWith()

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 330 of file G4INCLProjectileRemnant.cc.

330 {
331 const EnergyLevels theEnergyLevels = getPresentEnergyLevelsWith(pL);
332 return computeExcitationEnergy(theEnergyLevels);
333 }

Referenced by addAllDynamicalSpectators().

◆ deleteStoredComponents()

void G4INCL::ProjectileRemnant::deleteStoredComponents ( )
inline

Clear the stored projectile components and delete the particles.

Definition at line 141 of file G4INCLProjectileRemnant.hh.

141 {
142 for(std::map<long,Particle*>::const_iterator p=storedComponents.begin(), e=storedComponents.end(); p!=e; ++p)
143 delete p->second;
145 }
void clearStoredComponents()
Clear the stored projectile components.

Referenced by ~ProjectileRemnant().

◆ getGroundStateEnergies()

EnergyLevels const & G4INCL::ProjectileRemnant::getGroundStateEnergies ( ) const
inline

Definition at line 207 of file G4INCLProjectileRemnant.hh.

207 {
208 return theGroundStateEnergies;
209 }

◆ getNumberStoredComponents()

G4int G4INCL::ProjectileRemnant::getNumberStoredComponents ( ) const
inline

Get the number of the stored components.

Definition at line 184 of file G4INCLProjectileRemnant.hh.

184 {
185 return storedComponents.size();
186 }

◆ removeParticle()

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 76 of file G4INCLProjectileRemnant.cc.

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

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

◆ reset()

void G4INCL::ProjectileRemnant::reset ( )

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

Definition at line 51 of file G4INCLProjectileRemnant.cc.

51 {
53 thePosition = ThreeVector();
54 theMomentum = ThreeVector();
55 theEnergy = 0.0;
57 theA = 0;
58 theZ = 0;
59 nCollisions = 0;
60
61 for(std::map<long, Particle*>::const_iterator i=storedComponents.begin(); i!=storedComponents.end(); ++i) {
62 Particle *p = new Particle(*(i->second));
63 EnergyLevelMap::iterator energyIter = theInitialEnergyLevels.find(i->first);
64// assert(energyIter!=theInitialEnergyLevels.end());
65 const G4double energyLevel = energyIter->second;
66 theInitialEnergyLevels.erase(energyIter);
67 theInitialEnergyLevels[p->getID()] = energyLevel;
68 addParticle(p);
69 }
70 if(theA>0)
73 INCL_DEBUG("ProjectileRemnant object was reset:" << '\n' << print());
74 }
void addParticle(Particle *const p)
G4double thePotentialEnergy
G4INCL::ThreeVector thePosition

◆ storeComponents()

void G4INCL::ProjectileRemnant::storeComponents ( )
inline

Store the projectile components.

Definition at line 176 of file G4INCLProjectileRemnant.hh.

176 {
177 for(ParticleIter p=particles.begin(), e=particles.end(); p!=e; ++p) {
178 // Store the particles (needed for forced CN)
179 storedComponents[(*p)->getID()]=new Particle(**p);
180 }
181 }

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

◆ storeEnergyLevels()

void G4INCL::ProjectileRemnant::storeEnergyLevels ( )
inline

Store the energy levels.

Definition at line 189 of file G4INCLProjectileRemnant.hh.

189 {
190 EnergyLevels energies;
191
192 for(ParticleIter p=particles.begin(), e=particles.end(); p!=e; ++p) {
193 const G4double theCMEnergy = (*p)->getEnergy();
194 // Store the CM energy in the EnergyLevels map
195 theInitialEnergyLevels[(*p)->getID()] = theCMEnergy;
196 energies.push_back(theCMEnergy);
197 }
198
199 std::sort(energies.begin(), energies.end());
200// assert(energies.size()==(unsigned int)theA);
201 theGroundStateEnergies.resize(energies.size());
202 // Compute the partial sums of the CM energies -- they are our reference
203 // ground-state energies for any number of nucleons
204 std::partial_sum(energies.begin(), energies.end(), theGroundStateEnergies.begin());
205 }

Referenced by ProjectileRemnant().


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