Geant4  10.02.p03
G4INCL::Nucleus Class Reference

#include <G4INCLNucleus.hh>

Inheritance diagram for G4INCL::Nucleus:
Collaboration diagram for G4INCL::Nucleus:

Classes

struct  ConservationBalance
 Struct for conservation laws. More...
 

Public Member Functions

 Nucleus (G4int mass, G4int charge, Config const *const conf, const G4double universeRadius=-1.)
 
virtual ~Nucleus ()
 
 Nucleus (const Nucleus &rhs)
 Dummy copy constructor to silence Coverity warning. More...
 
Nucleusoperator= (const Nucleus &rhs)
 Dummy assignment operator to silence Coverity warning. More...
 
void initializeParticles ()
 
void insertParticle (Particle *p)
 Insert a new particle (e.g. a projectile) in the nucleus. More...
 
void applyFinalState (FinalState *)
 
G4int getInitialA () const
 
G4int getInitialZ () const
 
void propagateParticles (G4double step)
 
G4int getNumberOfEnteringProtons () const
 
G4int getNumberOfEnteringNeutrons () const
 
G4double computeSeparationEnergyBalance () const
 Outgoing - incoming separation energies. More...
 
G4bool decayOutgoingDeltas ()
 Force the decay of outgoing deltas. More...
 
G4bool decayInsideDeltas ()
 Force the decay of deltas inside the nucleus. More...
 
G4bool decayOutgoingClusters ()
 Force the decay of unstable outgoing clusters. More...
 
G4bool decayMe ()
 Force the phase-space decay of the Nucleus. More...
 
void emitInsidePions ()
 Force emission of all pions inside the nucleus. More...
 
void computeRecoilKinematics ()
 Compute the recoil momentum and spin of the nucleus. More...
 
ThreeVector computeCenterOfMass () const
 Compute the current center-of-mass position. More...
 
G4double computeTotalEnergy () const
 Compute the current total energy. More...
 
G4double computeExcitationEnergy () const
 Compute the current excitation energy. More...
 
void setIncomingAngularMomentum (const ThreeVector &j)
 Set the incoming angular-momentum vector. More...
 
const ThreeVectorgetIncomingAngularMomentum () const
 Get the incoming angular-momentum vector. More...
 
void setIncomingMomentum (const ThreeVector &p)
 Set the incoming momentum vector. More...
 
const ThreeVectorgetIncomingMomentum () const
 Get the incoming momentum vector. More...
 
void setInitialEnergy (const G4double e)
 Set the initial energy. More...
 
G4double getInitialEnergy () const
 Get the initial energy. More...
 
G4double getExcitationEnergy () const
 Get the excitation energy of the nucleus. More...
 
G4bool containsDeltas ()
 Returns true if the nucleus contains any deltas. More...
 
std::string print ()
 
StoregetStore () const
 
void setStore (Store *s)
 
G4double getInitialInternalEnergy () const
 
G4bool isEventTransparent () const
 Is the event transparent? More...
 
G4bool hasRemnant () const
 Does the nucleus give a cascade remnant? More...
 
void fillEventInfo (EventInfo *eventInfo)
 
G4bool getTryCompoundNucleus ()
 
G4double getTransmissionBarrier (Particle const *const p)
 Get the transmission barrier. More...
 
ConservationBalance getConservationBalance (EventInfo const &theEventInfo, const G4bool afterRecoil) const
 Compute charge, mass, energy and momentum balance. More...
 
void useFusionKinematics ()
 Adjust the kinematics for complete-fusion events. More...
 
G4double getSurfaceRadius (Particle const *const particle) const
 Get the maximum allowed radius for a given particle. More...
 
G4double getUniverseRadius () const
 Getter for theUniverseRadius. More...
 
void setUniverseRadius (const G4double universeRadius)
 Setter for theUniverseRadius. More...
 
G4bool isNucleusNucleusCollision () const
 Is it a nucleus-nucleus collision? More...
 
void setNucleusNucleusCollision ()
 Set a nucleus-nucleus collision. More...
 
void setParticleNucleusCollision ()
 Set a particle-nucleus collision. More...
 
void setProjectileRemnant (ProjectileRemnant *const c)
 Set the projectile remnant. More...
 
ProjectileRemnantgetProjectileRemnant () const
 Get the projectile remnant. More...
 
void deleteProjectileRemnant ()
 Delete the projectile remnant. More...
 
void finalizeProjectileRemnant (const G4double emissionTime)
 Finalise the projectile remnant. More...
 
void updatePotentialEnergy (Particle *p) const
 Update the particle potential energy. More...
 
void setDensity (NuclearDensity const *const d)
 Setter for theDensity. More...
 
NuclearDensity const * getDensity () const
 Getter for theDensity. More...
 
NuclearPotential::INuclearPotential const * getPotential () const
 Getter for thePotential. More...
 
- 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
 
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
 
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 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...
 

Private Member Functions

void computeOneNucleonRecoilKinematics ()
 Compute the recoil kinematics for a 1-nucleon remnant. More...
 
 INCL_DECLARE_ALLOCATION_POOL (Nucleus)
 

Private Attributes

G4int theInitialZ
 
G4int theInitialA
 
G4int theNpInitial
 The number of entering protons. More...
 
G4int theNnInitial
 The number of entering neutrons. More...
 
G4double initialInternalEnergy
 
ThreeVector incomingAngularMomentum
 
ThreeVector incomingMomentum
 
ThreeVector initialCenterOfMass
 
G4bool remnant
 
G4double initialEnergy
 
StoretheStore
 
G4bool tryCN
 
G4int projectileZ
 The charge number of the projectile. More...
 
G4int projectileA
 The mass number of the projectile. More...
 
G4double theUniverseRadius
 The radius of the universe. More...
 
G4bool isNucleusNucleus
 true if running a nucleus-nucleus collision More...
 
ProjectileRemnanttheProjectileRemnant
 Pointer to the quasi-projectile. More...
 
NuclearDensity const * theDensity
 Pointer to the NuclearDensity object. More...
 
NuclearPotential::INuclearPotential const * thePotential
 Pointer to the NuclearPotential object. More...
 

Additional Inherited Members

- Protected Member Functions inherited from G4INCL::Cluster
 INCL_DECLARE_ALLOCATION_POOL (Cluster)
 
- 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 65 of file G4INCLNucleus.hh.

Constructor & Destructor Documentation

◆ Nucleus() [1/2]

G4INCL::Nucleus::Nucleus ( G4int  mass,
G4int  charge,
Config const *const  conf,
const G4double  universeRadius = -1. 
)

Definition at line 65 of file G4INCLNucleus.cc.

66  : Cluster(charge,mass,true),
67  theInitialZ(charge), theInitialA(mass),
70  incomingAngularMomentum(0.,0.,0.), incomingMomentum(0.,0.,0.),
71  initialCenterOfMass(0.,0.,0.),
72  remnant(true),
73  initialEnergy(0.),
74  tryCN(false),
75  theUniverseRadius(universeRadius),
76  isNucleusNucleus(false),
78  theDensity(NULL),
79  thePotential(NULL)
80  {
81  PotentialType potentialType;
82  G4bool pionPotential;
83  if(conf) {
84  potentialType = conf->getPotentialType();
85  pionPotential = conf->getPionPotential();
86  } else { // By default we don't use energy dependent
87  // potential. This is convenient for some tests.
88  potentialType = IsospinPotential;
89  pionPotential = true;
90  }
91 
92  thePotential = NuclearPotential::createPotential(potentialType, theA, theZ, pionPotential);
93 
96 
98 
100  theParticleSampler->setDensity(theDensity);
101 
102  if(theUniverseRadius<0)
103  theUniverseRadius = theDensity->getMaximumRadius();
104  theStore = new Store(conf);
105  }
ThreeVector incomingMomentum
NuclearDensity const * createDensity(const G4int A, const G4int Z)
ThreeVector incomingAngularMomentum
G4bool isNucleusNucleus
true if running a nucleus-nucleus collision
G4double initialInternalEnergy
G4double getSeparationEnergy(const Particle *const p) const
Return the separation energy for a particle.
void setProtonSeparationEnergy(const G4double s)
Setter for protonSeparationEnergy.
void setDensity(NuclearDensity const *const d)
Setter for theDensity.
bool G4bool
Definition: G4Types.hh:79
NuclearDensity const * theDensity
Pointer to the NuclearDensity object.
G4int theNpInitial
The number of entering protons.
ParticleSampler * theParticleSampler
G4int theNnInitial
The number of entering neutrons.
NuclearPotential::INuclearPotential const * thePotential
Pointer to the NuclearPotential object.
void setPotential(NuclearPotential::INuclearPotential const *const p)
Setter for thePotential.
ThreeVector initialCenterOfMass
G4double initialEnergy
INuclearPotential const * createPotential(const PotentialType type, const G4int theA, const G4int theZ, const G4bool pionPotential)
Create an INuclearPotential object.
ProjectileRemnant * theProjectileRemnant
Pointer to the quasi-projectile.
void setNeutronSeparationEnergy(const G4double s)
Setter for protonSeparationEnergy.
G4double theUniverseRadius
The radius of the universe.
Cluster(const G4int Z, const G4int A, const G4bool createParticleSampler=true)
Standard Cluster constructor.
Here is the call graph for this function:

◆ ~Nucleus()

G4INCL::Nucleus::~Nucleus ( )
virtual

Definition at line 107 of file G4INCLNucleus.cc.

107  {
108  delete theStore;
110  /* We don't delete the potential and the density here any more -- Factories
111  * are caching them
112  delete thePotential;
113  delete theDensity;*/
114  }
void deleteProjectileRemnant()
Delete the projectile remnant.
Here is the call graph for this function:

◆ Nucleus() [2/2]

G4INCL::Nucleus::Nucleus ( const Nucleus rhs)

Dummy copy constructor to silence Coverity warning.

Member Function Documentation

◆ applyFinalState()

void G4INCL::Nucleus::applyFinalState ( FinalState finalstate)

Apply reaction final state information to the nucleus.

Definition at line 131 of file G4INCLNucleus.cc.

131  {
132  if(!finalstate) // do nothing if no final state was returned
133  return;
134 
135  G4double totalEnergy = 0.0;
136 
137  FinalStateValidity const validity = finalstate->getValidity();
138  if(validity == ValidFS) {
139 
140  ParticleList const &created = finalstate->getCreatedParticles();
141  for(ParticleIter iter=created.begin(), e=created.end(); iter!=e; ++iter) {
142  theStore->add((*iter));
143  if(!(*iter)->isOutOfWell()) {
144  totalEnergy += (*iter)->getEnergy() - (*iter)->getPotentialEnergy();
145  }
146  }
147 
148  ParticleList const &deleted = finalstate->getDestroyedParticles();
149  for(ParticleIter iter=deleted.begin(), e=deleted.end(); iter!=e; ++iter) {
151  }
152 
153  ParticleList const &modified = finalstate->getModifiedParticles();
154  for(ParticleIter iter=modified.begin(), e=modified.end(); iter!=e; ++iter) {
156  totalEnergy += (*iter)->getEnergy() - (*iter)->getPotentialEnergy();
157  }
158 
159  ParticleList const &out = finalstate->getOutgoingParticles();
160  for(ParticleIter iter=out.begin(), e=out.end(); iter!=e; ++iter) {
161  if((*iter)->isCluster()) {
162  Cluster *clusterOut = dynamic_cast<Cluster*>((*iter));
163 // assert(clusterOut);
164 #ifdef INCLXX_IN_GEANT4_MODE
165  if(!clusterOut)
166  continue;
167 #endif
168  ParticleList const &components = clusterOut->getParticles();
169  for(ParticleIter in=components.begin(), end=components.end(); in!=end; ++in)
171  } else {
173  }
174  totalEnergy += (*iter)->getEnergy(); // No potential here because the particle is gone
175  theA -= (*iter)->getA();
176  theZ -= (*iter)->getZ();
177  theStore->addToOutgoing(*iter);
178  (*iter)->setEmissionTime(theStore->getBook().getCurrentTime());
179  }
180 
181  ParticleList const &entering = finalstate->getEnteringParticles();
182  for(ParticleIter iter=entering.begin(), e=entering.end(); iter!=e; ++iter) {
183  insertParticle(*iter);
184  totalEnergy += (*iter)->getEnergy() - (*iter)->getPotentialEnergy();
185  }
186 
187  // actually perform the removal of the scheduled avatars
189  } else if(validity == ParticleBelowFermiFS || validity == ParticleBelowZeroFS) {
190  INCL_DEBUG("A Particle is entering below the Fermi sea:" << '\n' << finalstate->print() << '\n');
191  tryCN = true;
192  ParticleList const &entering = finalstate->getEnteringParticles();
193  for(ParticleIter iter=entering.begin(), e=entering.end(); iter!=e; ++iter) {
194  insertParticle(*iter);
195  }
196  }
197 
198  if(validity==ValidFS &&
199  std::abs(totalEnergy - finalstate->getTotalEnergyBeforeInteraction()) > 0.1) {
200  INCL_ERROR("Energy nonconservation! Energy at the beginning of the event = "
201  << finalstate->getTotalEnergyBeforeInteraction()
202  <<" and after interaction = "
203  << totalEnergy << '\n'
204  << finalstate->print());
205  }
206  }
ifstream in
Definition: comparison.C:7
#define INCL_ERROR(x)
G4double getCurrentTime() const
Definition: G4INCLBook.hh:98
void add(Particle *p)
Definition: G4INCLStore.cc:58
void removeScheduledAvatars()
Remove avatars that have been scheduled.
Definition: G4INCLStore.cc:134
Book & getBook()
Definition: G4INCLStore.hh:259
void particleHasBeenDestroyed(Particle *const)
Definition: G4INCLStore.cc:181
void particleHasBeenEjected(Particle *const)
Definition: G4INCLStore.cc:175
void particleHasBeenUpdated(Particle *const)
Notify the Store about a particle update.
Definition: G4INCLStore.cc:127
void insertParticle(Particle *p)
Insert a new particle (e.g. a projectile) in the nucleus.
double G4double
Definition: G4Types.hh:76
#define INCL_DEBUG(x)
void addToOutgoing(Particle *p)
add the particle to the outgoing particle list.
Definition: G4INCLStore.hh:190
ParticleList::const_iterator ParticleIter
Cluster(const G4int Z, const G4int A, const G4bool createParticleSampler=true)
Standard Cluster constructor.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ computeCenterOfMass()

ThreeVector G4INCL::Nucleus::computeCenterOfMass ( ) const

Compute the current center-of-mass position.

Returns
the center-of-mass position vector [fm].

Definition at line 259 of file G4INCLNucleus.cc.

259  {
260  ThreeVector cm(0.,0.,0.);
261  G4double totalMass = 0.0;
262  ParticleList const &inside = theStore->getParticles();
263  for(ParticleIter p=inside.begin(), e=inside.end(); p!=e; ++p) {
264  const G4double mass = (*p)->getMass();
265  cm += (*p)->getPosition() * mass;
266  totalMass += mass;
267  }
268  cm /= totalMass;
269  return cm;
270  }
static const double cm
Definition: G4SIunits.hh:118
ParticleList const & getParticles() const
Definition: G4INCLStore.hh:253
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:

◆ computeExcitationEnergy()

G4double G4INCL::Nucleus::computeExcitationEnergy ( ) const

Compute the current excitation energy.

Returns
the excitation energy [MeV]

Definition at line 272 of file G4INCLNucleus.cc.

272  {
273  const G4double totalEnergy = computeTotalEnergy();
274  const G4double separationEnergies = computeSeparationEnergyBalance();
275 
276  return totalEnergy - initialInternalEnergy - separationEnergies;
277  }
G4double computeTotalEnergy() const
Compute the current total energy.
G4double initialInternalEnergy
G4double computeSeparationEnergyBalance() const
Outgoing - incoming separation energies.
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ computeOneNucleonRecoilKinematics()

void G4INCL::Nucleus::computeOneNucleonRecoilKinematics ( )
private

Compute the recoil kinematics for a 1-nucleon remnant.

Puts the remnant nucleon on mass shell and tries to enforce approximate energy conservation by modifying the masses of the outgoing particles.

Definition at line 494 of file G4INCLNucleus.cc.

494  {
495  // We should be here only if the nucleus contains only one nucleon
496 // assert(theStore->getParticles().size()==1);
497 
498  // No excitation energy!
499  theExcitationEnergy = 0.0;
500 
501  // Move the nucleon to the outgoing list
502  Particle *remN = theStore->getParticles().front();
503  theA -= remN->getA();
504  theZ -= remN->getZ();
506  theStore->addToOutgoing(remN);
507  remN->setEmissionTime(theStore->getBook().getCurrentTime());
508 
509  // Treat the special case of a remaining delta
510  if(remN->isDelta()) {
511  IAvatar *decay = new DecayAvatar(remN, 0.0, NULL);
512  FinalState *fs = decay->getFinalState();
513  // Eject the pion
514  ParticleList const &created = fs->getCreatedParticles();
515  for(ParticleIter j=created.begin(), e=created.end(); j!=e; ++j)
516  theStore->addToOutgoing(*j);
517  delete fs;
518  delete decay;
519  }
520 
521  // Do different things depending on how many outgoing particles we have
522  ParticleList const &outgoing = theStore->getOutgoingParticles();
523  if(outgoing.size() == 2) {
524 
525  INCL_DEBUG("Two particles in the outgoing channel, applying exact two-body kinematics" << '\n');
526 
527  // Can apply exact 2-body kinematics here. Keep the CM emission angle of
528  // the first particle.
529  Particle *p1 = outgoing.front(), *p2 = outgoing.back();
530  const ThreeVector aBoostVector = incomingMomentum / initialEnergy;
531  // Boost to the initial CM
532  p1->boost(aBoostVector);
533  const G4double sqrts = std::sqrt(initialEnergy*initialEnergy - incomingMomentum.mag2());
534  const G4double pcm = KinematicsUtils::momentumInCM(sqrts, p1->getMass(), p2->getMass());
535  const G4double scale = pcm/(p1->getMomentum().mag());
536  // Reset the momenta
537  p1->setMomentum(p1->getMomentum()*scale);
538  p2->setMomentum(-p1->getMomentum());
539  p1->adjustEnergyFromMomentum();
540  p2->adjustEnergyFromMomentum();
541  // Unboost
542  p1->boost(-aBoostVector);
543  p2->boost(-aBoostVector);
544 
545  } else {
546 
547  INCL_DEBUG("Trying to adjust final-state momenta to achieve energy and momentum conservation" << '\n');
548 
549  const G4int maxIterations=8;
550  G4double totalEnergy, energyScale;
551  G4double val=1.E+100, oldVal=1.E+100, oldOldVal=1.E+100, oldOldOldVal;
552  ThreeVector totalMomentum, deltaP;
553  std::vector<ThreeVector> minMomenta; // use it to store the particle momenta that minimize the merit function
554 
555  // Reserve the vector size
556  minMomenta.reserve(outgoing.size());
557 
558  // Compute the initial total momentum
559  totalMomentum.setX(0.0);
560  totalMomentum.setY(0.0);
561  totalMomentum.setZ(0.0);
562  for(ParticleIter i=outgoing.begin(), e=outgoing.end(); i!=e; ++i)
563  totalMomentum += (*i)->getMomentum();
564 
565  // Compute the initial total energy
566  totalEnergy = 0.0;
567  for(ParticleIter i=outgoing.begin(), e=outgoing.end(); i!=e; ++i)
568  totalEnergy += (*i)->getEnergy();
569 
570  // Iterative algorithm starts here:
571  for(G4int iterations=0; iterations < maxIterations; ++iterations) {
572 
573  // Save the old merit-function values
574  oldOldOldVal = oldOldVal;
575  oldOldVal = oldVal;
576  oldVal = val;
577 
578  if(iterations%2 == 0) {
579  INCL_DEBUG("Momentum step" << '\n');
580  // Momentum step: modify all the particle momenta
581  deltaP = incomingMomentum - totalMomentum;
582  G4double pOldTot = 0.0;
583  for(ParticleIter i=outgoing.begin(), e=outgoing.end(); i!=e; ++i)
584  pOldTot += (*i)->getMomentum().mag();
585  for(ParticleIter i=outgoing.begin(), e=outgoing.end(); i!=e; ++i) {
586  const ThreeVector mom = (*i)->getMomentum();
587  (*i)->setMomentum(mom + deltaP*mom.mag()/pOldTot);
588  (*i)->adjustEnergyFromMomentum();
589  }
590  } else {
591  INCL_DEBUG("Energy step" << '\n');
592  // Energy step: modify all the particle momenta
593  energyScale = initialEnergy/totalEnergy;
594  for(ParticleIter i=outgoing.begin(), e=outgoing.end(); i!=e; ++i) {
595  const ThreeVector mom = (*i)->getMomentum();
596  G4double pScale = ((*i)->getEnergy()*energyScale - std::pow((*i)->getMass(),2))/mom.mag2();
597  if(pScale>0) {
598  (*i)->setEnergy((*i)->getEnergy()*energyScale);
599  (*i)->adjustMomentumFromEnergy();
600  }
601  }
602  }
603 
604  // Compute the current total momentum and energy
605  totalMomentum.setX(0.0);
606  totalMomentum.setY(0.0);
607  totalMomentum.setZ(0.0);
608  totalEnergy = 0.0;
609  for(ParticleIter i=outgoing.begin(), e=outgoing.end(); i!=e; ++i) {
610  totalMomentum += (*i)->getMomentum();
611  totalEnergy += (*i)->getEnergy();
612  }
613 
614  // Merit factor
615  val = std::pow(totalEnergy - initialEnergy,2) +
616  0.25*(totalMomentum - incomingMomentum).mag2();
617  INCL_DEBUG("Merit function: val=" << val << ", oldVal=" << oldVal << ", oldOldVal=" << oldOldVal << ", oldOldOldVal=" << oldOldOldVal << '\n');
618 
619  // Store the minimum
620  if(val < oldVal) {
621  INCL_DEBUG("New minimum found, storing the particle momenta" << '\n');
622  minMomenta.clear();
623  for(ParticleIter i=outgoing.begin(), e=outgoing.end(); i!=e; ++i)
624  minMomenta.push_back((*i)->getMomentum());
625  }
626 
627  // Stop the algorithm if the search diverges
628  if(val > oldOldVal && oldVal > oldOldOldVal) {
629  INCL_DEBUG("Search is diverging, breaking out of the iteration loop: val=" << val << ", oldVal=" << oldVal << ", oldOldVal=" << oldOldVal << ", oldOldOldVal=" << oldOldOldVal << '\n');
630  break;
631  }
632  }
633 
634  // We should have made at least one successful iteration here
635 // assert(minMomenta.size()==outgoing.size());
636 
637  // Apply the optimal momenta
638  INCL_DEBUG("Applying the solution" << '\n');
639  std::vector<ThreeVector>::const_iterator v = minMomenta.begin();
640  for(ParticleIter i=outgoing.begin(), e=outgoing.end(); i!=e; ++i, ++v) {
641  (*i)->setMomentum(*v);
642  (*i)->adjustEnergyFromMomentum();
643  INCL_DATABLOCK((*i)->print());
644  }
645 
646  }
647 
648  }
ThreeVector incomingMomentum
G4double mag2() const
ParticleList const & getOutgoingParticles() const
Definition: G4INCLStore.hh:223
G4double getCurrentTime() const
Definition: G4INCLBook.hh:98
G4double mag() const
G4double momentumInCM(Particle const *const p1, Particle const *const p2)
gives the momentum in the CM frame of two particles.
int G4int
Definition: G4Types.hh:78
ParticleList decay(Cluster *const c)
Carries out a cluster decay.
Book & getBook()
Definition: G4INCLStore.hh:259
Double_t scale
void particleHasBeenEjected(Particle *const)
Definition: G4INCLStore.cc:175
ParticleList const & getParticles() const
Definition: G4INCLStore.hh:253
G4double theExcitationEnergy
double G4double
Definition: G4Types.hh:76
#define INCL_DEBUG(x)
void addToOutgoing(Particle *p)
add the particle to the outgoing particle list.
Definition: G4INCLStore.hh:190
G4double initialEnergy
#define INCL_DATABLOCK(x)
ParticleList::const_iterator ParticleIter
Here is the call graph for this function:
Here is the caller graph for this function:

◆ computeRecoilKinematics()

void G4INCL::Nucleus::computeRecoilKinematics ( )

Compute the recoil momentum and spin of the nucleus.

Definition at line 226 of file G4INCLNucleus.cc.

226  {
227  // If the remnant consists of only one nucleon, we need to apply a special
228  // procedure to put it on mass shell.
229  if(theA==1) {
230  emitInsidePions();
232  remnant=false;
233  return;
234  }
235 
236  // Compute the recoil momentum and angular momentum
239 
240  ParticleList const &outgoing = theStore->getOutgoingParticles();
241  for(ParticleIter p=outgoing.begin(), e=outgoing.end(); p!=e; ++p) {
242  theMomentum -= (*p)->getMomentum();
243  theSpin -= (*p)->getAngularMomentum();
244  }
248  }
249 
250  // Subtract orbital angular momentum
253 
256  remnant=true;
257  }
void setMass(G4double mass)
ThreeVector incomingMomentum
ThreeVector incomingAngularMomentum
void computeOneNucleonRecoilKinematics()
Compute the recoil kinematics for a 1-nucleon remnant.
ParticleList const & getOutgoingParticles() const
Definition: G4INCLStore.hh:223
G4double adjustEnergyFromMomentum()
Recompute the energy to match the momentum.
ThreeVector theSpin
G4INCL::ThreeVector thePosition
G4double theExcitationEnergy
ThreeVector computeCenterOfMass() const
Compute the current center-of-mass position.
void emitInsidePions()
Force emission of all pions inside the nucleus.
G4ThreadLocal NuclearMassFn getTableMass
Static pointer to the mass function for nuclei.
G4INCL::ThreeVector getAngularMomentum() const
Get the total angular momentum (orbital + spin)
G4INCL::ThreeVector theMomentum
const G4INCL::ThreeVector & getMomentum() const
ThreeVector initialCenterOfMass
ProjectileRemnant * theProjectileRemnant
Pointer to the quasi-projectile.
ParticleList::const_iterator ParticleIter
Here is the call graph for this function:
Here is the caller graph for this function:

◆ computeSeparationEnergyBalance()

G4double G4INCL::Nucleus::computeSeparationEnergyBalance ( ) const
inline

Outgoing - incoming separation energies.

Used by CDPP.

Definition at line 116 of file G4INCLNucleus.hh.

116  {
117  G4double S = 0.0;
118  ParticleList const &outgoing = theStore->getOutgoingParticles();
119  for(ParticleIter i=outgoing.begin(), e=outgoing.end(); i!=e; ++i) {
120  const ParticleType t = (*i)->getType();
121  switch(t) {
122  case Proton:
123  case Neutron:
124  case DeltaPlusPlus:
125  case DeltaPlus:
126  case DeltaZero:
127  case DeltaMinus:
129  break;
130  case Composite:
131  S += (*i)->getZ() * thePotential->getSeparationEnergy(Proton)
132  + ((*i)->getA() - (*i)->getZ()) * thePotential->getSeparationEnergy(Neutron);
133  break;
134  case PiPlus:
136  break;
137  case PiMinus:
139  break;
140  default:
141  break;
142  }
143  }
144 
147  return S;
148  }
double S(double temp)
ParticleList const & getOutgoingParticles() const
Definition: G4INCLStore.hh:223
G4double getSeparationEnergy(const Particle *const p) const
Return the separation energy for a particle.
G4int theNpInitial
The number of entering protons.
G4int theNnInitial
The number of entering neutrons.
NuclearPotential::INuclearPotential const * thePotential
Pointer to the NuclearPotential object.
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:

◆ computeTotalEnergy()

G4double G4INCL::Nucleus::computeTotalEnergy ( ) const

Compute the current total energy.

Returns
the total energy [MeV]

Definition at line 212 of file G4INCLNucleus.cc.

212  {
213  G4double totalEnergy = 0.0;
214  ParticleList const &inside = theStore->getParticles();
215  for(ParticleIter p=inside.begin(), e=inside.end(); p!=e; ++p) {
216  if((*p)->isNucleon()) // Ugly: we should calculate everything using total energies!
217  totalEnergy += (*p)->getKineticEnergy() - (*p)->getPotentialEnergy();
218  else if((*p)->isResonance())
219  totalEnergy += (*p)->getEnergy() - (*p)->getPotentialEnergy() - ParticleTable::effectiveNucleonMass;
220  else
221  totalEnergy += (*p)->getEnergy() - (*p)->getPotentialEnergy();
222  }
223  return totalEnergy;
224  }
ParticleList const & getParticles() const
Definition: G4INCLStore.hh:253
double G4double
Definition: G4Types.hh:76
const G4double effectiveNucleonMass
ParticleList::const_iterator ParticleIter
Here is the call graph for this function:
Here is the caller graph for this function:

◆ containsDeltas()

G4bool G4INCL::Nucleus::containsDeltas ( )
inline

Returns true if the nucleus contains any deltas.

Definition at line 231 of file G4INCLNucleus.hh.

231  {
232  ParticleList const &inside = theStore->getParticles();
233  for(ParticleIter i=inside.begin(), e=inside.end(); i!=e; ++i)
234  if((*i)->isDelta()) return true;
235  return false;
236  }
ParticleList const & getParticles() const
Definition: G4INCLStore.hh:253
ParticleList::const_iterator ParticleIter
Here is the call graph for this function:
Here is the caller graph for this function:

◆ decayInsideDeltas()

G4bool G4INCL::Nucleus::decayInsideDeltas ( )

Force the decay of deltas inside the nucleus.

Returns
true if any delta was forced to decay.

Definition at line 351 of file G4INCLNucleus.cc.

351  {
352  /* If there is a pion potential, do nothing (deltas will be counted as
353  * excitation energy).
354  * If, however, the remnant is unphysical (Z<0 or Z>A), force the deltas to
355  * decay and get rid of all the pions. In case you're wondering, you can
356  * end up with Z<0 or Z>A if the remnant contains more pi- than protons or
357  * more pi+ than neutrons, respectively.
358  */
359  const G4bool unphysicalRemnant = (theZ<0 || theZ>theA);
360  if(thePotential->hasPionPotential() && !unphysicalRemnant)
361  return false;
362 
363  // Build a list of deltas (avoid modifying the list you are iterating on).
364  ParticleList const &inside = theStore->getParticles();
365  ParticleList deltas;
366  for(ParticleIter i=inside.begin(), e=inside.end(); i!=e; ++i)
367  if((*i)->isDelta()) deltas.push_back((*i));
368 
369  // Loop over the deltas, make them decay
370  for(ParticleIter i=deltas.begin(), e=deltas.end(); i!=e; ++i) {
371  INCL_DEBUG("Decay inside delta particle:" << '\n'
372  << (*i)->print() << '\n');
373  // Create a forced-decay avatar. Note the last boolean parameter. Note
374  // also that if the remnant is unphysical we more or less explicitly give
375  // up energy conservation and CDPP by passing a NULL pointer for the
376  // nucleus.
377  IAvatar *decay;
378  if(unphysicalRemnant) {
379  INCL_WARN("Forcing delta decay inside an unphysical remnant (A=" << theA
380  << ", Z=" << theZ << "). Might lead to energy-violation warnings."
381  << '\n');
382  decay = new DecayAvatar((*i), 0.0, NULL, true);
383  } else
384  decay = new DecayAvatar((*i), 0.0, this, true);
385  FinalState *fs = decay->getFinalState();
386 
387  // The pion can be ejected only if we managed to satisfy energy
388  // conservation and if pion emission does not lead to negative excitation
389  // energies.
390  if(fs->getValidity()==ValidFS) {
391  // Apply the final state to the nucleus
392  applyFinalState(fs);
393  }
394  delete fs;
395  delete decay;
396  }
397 
398  // If the remnant is unphysical, emit all the pions
399  if(unphysicalRemnant) {
400  INCL_DEBUG("Remnant is unphysical: Z=" << theZ << ", A=" << theA << ", emitting all the pions" << '\n');
401  emitInsidePions();
402  }
403 
404  return true;
405  }
void applyFinalState(FinalState *)
#define INCL_WARN(x)
ParticleList decay(Cluster *const c)
Carries out a cluster decay.
bool G4bool
Definition: G4Types.hh:79
ParticleList const & getParticles() const
Definition: G4INCLStore.hh:253
NuclearPotential::INuclearPotential const * thePotential
Pointer to the NuclearPotential object.
void emitInsidePions()
Force emission of all pions inside the nucleus.
G4bool hasPionPotential() const
Do we have a pion potential?
#define INCL_DEBUG(x)
ParticleList::const_iterator ParticleIter
Here is the call graph for this function:
Here is the caller graph for this function:

◆ decayMe()

G4bool G4INCL::Nucleus::decayMe ( )

Force the phase-space decay of the Nucleus.

Only applied if Z==0 or Z==A.

Returns
true if the nucleus was forced to decay.

Definition at line 430 of file G4INCLNucleus.cc.

430  {
431  // Do the phase-space decay only if Z=0 or Z=A
432  if(theA<=1 || (theZ!=0 && theA!=theZ))
433  return false;
434 
435  ParticleList decayProducts = ClusterDecay::decay(this);
436  for(ParticleIter j=decayProducts.begin(), e=decayProducts.end(); j!=e; ++j)
437  theStore->addToOutgoing(*j);
438 
439  return true;
440  }
ParticleList decay(Cluster *const c)
Carries out a cluster decay.
void addToOutgoing(Particle *p)
add the particle to the outgoing particle list.
Definition: G4INCLStore.hh:190
ParticleList::const_iterator ParticleIter
Here is the call graph for this function:
Here is the caller graph for this function:

◆ decayOutgoingClusters()

G4bool G4INCL::Nucleus::decayOutgoingClusters ( )

Force the decay of unstable outgoing clusters.

Returns
true if any cluster was forced to decay.

Definition at line 407 of file G4INCLNucleus.cc.

407  {
408  ParticleList const &out = theStore->getOutgoingParticles();
409  ParticleList clusters;
410  for(ParticleIter i=out.begin(), e=out.end(); i!=e; ++i) {
411  if((*i)->isCluster()) clusters.push_back((*i));
412  }
413  if(clusters.empty()) return false;
414 
415  for(ParticleIter i=clusters.begin(), e=clusters.end(); i!=e; ++i) {
416  Cluster *cluster = dynamic_cast<Cluster*>(*i); // Can't avoid using a cast here
417 // assert(cluster);
418 #ifdef INCLXX_IN_GEANT4_MODE
419  if(!cluster)
420  continue;
421 #endif
422  cluster->deleteParticles(); // Don't need them
423  ParticleList decayProducts = ClusterDecay::decay(cluster);
424  for(ParticleIter j=decayProducts.begin(), end=decayProducts.end(); j!=end; ++j)
425  theStore->addToOutgoing(*j);
426  }
427  return true;
428  }
ParticleList const & getOutgoingParticles() const
Definition: G4INCLStore.hh:223
ParticleList decay(Cluster *const c)
Carries out a cluster decay.
void addToOutgoing(Particle *p)
add the particle to the outgoing particle list.
Definition: G4INCLStore.hh:190
ParticleList::const_iterator ParticleIter
Cluster(const G4int Z, const G4int A, const G4bool createParticleSampler=true)
Standard Cluster constructor.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ decayOutgoingDeltas()

G4bool G4INCL::Nucleus::decayOutgoingDeltas ( )

Force the decay of outgoing deltas.

Returns
true if any delta was forced to decay.

Definition at line 299 of file G4INCLNucleus.cc.

299  {
300  ParticleList const &out = theStore->getOutgoingParticles();
301  ParticleList deltas;
302  for(ParticleIter i=out.begin(), e=out.end(); i!=e; ++i) {
303  if((*i)->isDelta()) deltas.push_back((*i));
304  }
305  if(deltas.empty()) return false;
306 
307  for(ParticleIter i=deltas.begin(), e=deltas.end(); i!=e; ++i) {
308  INCL_DEBUG("Decay outgoing delta particle:" << '\n'
309  << (*i)->print() << '\n');
310  const ThreeVector beta = -(*i)->boostVector();
311  const G4double deltaMass = (*i)->getMass();
312 
313  // Set the delta momentum to zero and sample the decay in the CM frame.
314  // This makes life simpler if we are using real particle masses.
315  (*i)->setMomentum(ThreeVector());
316  (*i)->setEnergy((*i)->getMass());
317 
318  // Use a DecayAvatar
319  IAvatar *decay = new DecayAvatar((*i), 0.0, NULL);
320  FinalState *fs = decay->getFinalState();
321  Particle * const pion = fs->getCreatedParticles().front();
322  Particle * const nucleon = fs->getModifiedParticles().front();
323 
324  // Adjust the decay momentum if we are using the real masses
325  const G4double decayMomentum = KinematicsUtils::momentumInCM(deltaMass,
326  nucleon->getTableMass(),
327  pion->getTableMass());
328  ThreeVector newMomentum = pion->getMomentum();
329  newMomentum *= decayMomentum / newMomentum.mag();
330 
331  pion->setTableMass();
332  pion->setMomentum(newMomentum);
333  pion->adjustEnergyFromMomentum();
334  pion->setEmissionTime(nucleon->getEmissionTime());
335  pion->boost(beta);
336 
337  nucleon->setTableMass();
338  nucleon->setMomentum(-newMomentum);
339  nucleon->adjustEnergyFromMomentum();
340  nucleon->boost(beta);
341 
342  theStore->addToOutgoing(pion);
343 
344  delete fs;
345  delete decay;
346  }
347 
348  return true;
349  }
G4bool pion(G4int ityp)
ParticleList const & getOutgoingParticles() const
Definition: G4INCLStore.hh:223
G4double momentumInCM(Particle const *const p1, Particle const *const p2)
gives the momentum in the CM frame of two particles.
ParticleList decay(Cluster *const c)
Carries out a cluster decay.
G4bool nucleon(G4int ityp)
double G4double
Definition: G4Types.hh:76
#define INCL_DEBUG(x)
void addToOutgoing(Particle *p)
add the particle to the outgoing particle list.
Definition: G4INCLStore.hh:190
ParticleList::const_iterator ParticleIter
Here is the call graph for this function:
Here is the caller graph for this function:

◆ deleteProjectileRemnant()

void G4INCL::Nucleus::deleteProjectileRemnant ( )
inline

Delete the projectile remnant.

Definition at line 337 of file G4INCLNucleus.hh.

337  {
338  delete theProjectileRemnant;
339  theProjectileRemnant = NULL;
340  }
ProjectileRemnant * theProjectileRemnant
Pointer to the quasi-projectile.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ emitInsidePions()

void G4INCL::Nucleus::emitInsidePions ( )

Force emission of all pions inside the nucleus.

Definition at line 442 of file G4INCLNucleus.cc.

442  {
443  /* Forcing emissions of all pions in the nucleus. This probably violates
444  * energy conservation (although the computation of the recoil kinematics
445  * might sweep this under the carpet).
446  */
447  INCL_WARN("Forcing emissions of all pions in the nucleus." << '\n');
448 
449  // Emit the pions with this kinetic energy
450  const G4double tinyPionEnergy = 0.1; // MeV
451 
452  // Push out the emitted pions
453  ParticleList const &inside = theStore->getParticles();
454  ParticleList toEject;
455  for(ParticleIter i=inside.begin(), e=inside.end(); i!=e; ++i) {
456  if((*i)->isPion()) {
457  Particle * const thePion = *i;
458  INCL_DEBUG("Forcing emission of the following particle: "
459  << thePion->print() << '\n');
460  thePion->setEmissionTime(theStore->getBook().getCurrentTime());
461  // Correction for real masses
462  const G4double theQValueCorrection = thePion->getEmissionQValueCorrection(theA,theZ);
463  const G4double kineticEnergyOutside = thePion->getKineticEnergy() - thePion->getPotentialEnergy() + theQValueCorrection;
464  thePion->setTableMass();
465  if(kineticEnergyOutside > 0.0)
466  thePion->setEnergy(thePion->getMass()+kineticEnergyOutside);
467  else
468  thePion->setEnergy(thePion->getMass()+tinyPionEnergy);
469  thePion->adjustMomentumFromEnergy();
470  thePion->setPotentialEnergy(0.);
471  theZ -= thePion->getZ();
472  toEject.push_back(thePion);
473  }
474  }
475  for(ParticleIter i=toEject.begin(), e=toEject.end(); i!=e; ++i) {
477  theStore->addToOutgoing(*i);
478  }
479  }
G4double getCurrentTime() const
Definition: G4INCLBook.hh:98
#define INCL_WARN(x)
Book & getBook()
Definition: G4INCLStore.hh:259
void particleHasBeenEjected(Particle *const)
Definition: G4INCLStore.cc:175
ParticleList const & getParticles() const
Definition: G4INCLStore.hh:253
double G4double
Definition: G4Types.hh:76
#define INCL_DEBUG(x)
void addToOutgoing(Particle *p)
add the particle to the outgoing particle list.
Definition: G4INCLStore.hh:190
ParticleList::const_iterator ParticleIter
Here is the call graph for this function:
Here is the caller graph for this function:

◆ fillEventInfo()

void G4INCL::Nucleus::fillEventInfo ( EventInfo eventInfo)

Fill the event info which contains INCL output data

Definition at line 650 of file G4INCLNucleus.cc.

650  {
651  eventInfo->nParticles = 0;
652  G4bool isNucleonAbsorption = false;
653 
654  G4bool isPionAbsorption = false;
655  // It is possible to have pion absorption event only if the
656  // projectile is pion.
657  if(eventInfo->projectileType == PiPlus ||
658  eventInfo->projectileType == PiMinus ||
659  eventInfo->projectileType == PiZero) {
660  isPionAbsorption = true;
661  }
662 
663  // Forced CN
664  eventInfo->forcedCompoundNucleus = tryCN;
665 
666  // Outgoing particles
667  ParticleList const &outgoingParticles = getStore()->getOutgoingParticles();
668 
669  // Check if we have a nucleon absorption event: nucleon projectile
670  // and no ejected particles.
671  if(outgoingParticles.size() == 0 &&
672  (eventInfo->projectileType == Proton ||
673  eventInfo->projectileType == Neutron)) {
674  isNucleonAbsorption = true;
675  }
676 
677  // Reset the remnant counter
678  eventInfo->nRemnants = 0;
679  eventInfo->history.clear();
680 
681  for(ParticleIter i=outgoingParticles.begin(), e=outgoingParticles.end(); i!=e; ++i ) {
682  // We have a pion absorption event only if the projectile is
683  // pion and there are no ejected pions.
684  if(isPionAbsorption) {
685  if((*i)->isPion()) {
686  isPionAbsorption = false;
687  }
688  }
689 
690  eventInfo->A[eventInfo->nParticles] = (*i)->getA();
691  eventInfo->Z[eventInfo->nParticles] = (*i)->getZ();
692  eventInfo->emissionTime[eventInfo->nParticles] = (*i)->getEmissionTime();
693  eventInfo->EKin[eventInfo->nParticles] = (*i)->getKineticEnergy();
694  ThreeVector mom = (*i)->getMomentum();
695  eventInfo->px[eventInfo->nParticles] = mom.getX();
696  eventInfo->py[eventInfo->nParticles] = mom.getY();
697  eventInfo->pz[eventInfo->nParticles] = mom.getZ();
698  eventInfo->theta[eventInfo->nParticles] = Math::toDegrees(mom.theta());
699  eventInfo->phi[eventInfo->nParticles] = Math::toDegrees(mom.phi());
700  eventInfo->origin[eventInfo->nParticles] = -1;
701  eventInfo->history.push_back("");
702  eventInfo->nParticles++;
703  }
704  eventInfo->nucleonAbsorption = isNucleonAbsorption;
705  eventInfo->pionAbsorption = isPionAbsorption;
706  eventInfo->nCascadeParticles = eventInfo->nParticles;
707 
708  // Projectile-like remnant characteristics
710  eventInfo->ARem[eventInfo->nRemnants] = theProjectileRemnant->getA();
711  eventInfo->ZRem[eventInfo->nRemnants] = theProjectileRemnant->getZ();
713  if(std::abs(eStar)<1E-10)
714  eStar = 0.0; // blame rounding and set the excitation energy to zero
715  eventInfo->EStarRem[eventInfo->nRemnants] = eStar;
716  if(eventInfo->EStarRem[eventInfo->nRemnants]<0.) {
717  INCL_WARN("Negative excitation energy in projectile-like remnant! EStarRem = " << eventInfo->EStarRem[eventInfo->nRemnants] << '\n');
718  }
719  const ThreeVector &spin = theProjectileRemnant->getSpin();
720  if(eventInfo->ARem[eventInfo->nRemnants]%2==0) { // even-A nucleus
721  eventInfo->JRem[eventInfo->nRemnants] = (G4int) (spin.mag()/PhysicalConstants::hc + 0.5);
722  } else { // odd-A nucleus
723  eventInfo->JRem[eventInfo->nRemnants] = ((G4int) (spin.mag()/PhysicalConstants::hc)) + 0.5;
724  }
725  eventInfo->EKinRem[eventInfo->nRemnants] = theProjectileRemnant->getKineticEnergy();
726  const ThreeVector &mom = theProjectileRemnant->getMomentum();
727  eventInfo->pxRem[eventInfo->nRemnants] = mom.getX();
728  eventInfo->pyRem[eventInfo->nRemnants] = mom.getY();
729  eventInfo->pzRem[eventInfo->nRemnants] = mom.getZ();
730  eventInfo->jxRem[eventInfo->nRemnants] = spin.getX() / PhysicalConstants::hc;
731  eventInfo->jyRem[eventInfo->nRemnants] = spin.getY() / PhysicalConstants::hc;
732  eventInfo->jzRem[eventInfo->nRemnants] = spin.getZ() / PhysicalConstants::hc;
733  eventInfo->thetaRem[eventInfo->nRemnants] = Math::toDegrees(mom.theta());
734  eventInfo->phiRem[eventInfo->nRemnants] = Math::toDegrees(mom.phi());
735  eventInfo->nRemnants++;
736  }
737 
738  // Target-like remnant characteristics
739  if(hasRemnant()) {
740  eventInfo->ARem[eventInfo->nRemnants] = getA();
741  eventInfo->ZRem[eventInfo->nRemnants] = getZ();
742  eventInfo->EStarRem[eventInfo->nRemnants] = getExcitationEnergy();
743  if(eventInfo->EStarRem[eventInfo->nRemnants]<0.) {
744  INCL_WARN("Negative excitation energy in target-like remnant! EStarRem = " << eventInfo->EStarRem[eventInfo->nRemnants] << '\n');
745  }
746  const ThreeVector &spin = getSpin();
747  if(eventInfo->ARem[eventInfo->nRemnants]%2==0) { // even-A nucleus
748  eventInfo->JRem[eventInfo->nRemnants] = (G4int) (spin.mag()/PhysicalConstants::hc + 0.5);
749  } else { // odd-A nucleus
750  eventInfo->JRem[eventInfo->nRemnants] = ((G4int) (spin.mag()/PhysicalConstants::hc)) + 0.5;
751  }
752  eventInfo->EKinRem[eventInfo->nRemnants] = getKineticEnergy();
753  const ThreeVector &mom = getMomentum();
754  eventInfo->pxRem[eventInfo->nRemnants] = mom.getX();
755  eventInfo->pyRem[eventInfo->nRemnants] = mom.getY();
756  eventInfo->pzRem[eventInfo->nRemnants] = mom.getZ();
757  eventInfo->jxRem[eventInfo->nRemnants] = spin.getX() / PhysicalConstants::hc;
758  eventInfo->jyRem[eventInfo->nRemnants] = spin.getY() / PhysicalConstants::hc;
759  eventInfo->jzRem[eventInfo->nRemnants] = spin.getZ() / PhysicalConstants::hc;
760  eventInfo->thetaRem[eventInfo->nRemnants] = Math::toDegrees(mom.theta());
761  eventInfo->phiRem[eventInfo->nRemnants] = Math::toDegrees(mom.phi());
762  eventInfo->nRemnants++;
763  }
764 
765  // Global counters, flags, etc.
766  Book const &theBook = theStore->getBook();
767  eventInfo->nCollisions = theBook.getAcceptedCollisions();
768  eventInfo->nBlockedCollisions = theBook.getBlockedCollisions();
769  eventInfo->nDecays = theBook.getAcceptedDecays();
770  eventInfo->nBlockedDecays = theBook.getBlockedDecays();
771  eventInfo->firstCollisionTime = theBook.getFirstCollisionTime();
772  eventInfo->firstCollisionXSec = theBook.getFirstCollisionXSec();
773  eventInfo->firstCollisionSpectatorPosition = theBook.getFirstCollisionSpectatorPosition();
774  eventInfo->firstCollisionSpectatorMomentum = theBook.getFirstCollisionSpectatorMomentum();
775  eventInfo->firstCollisionIsElastic = theBook.getFirstCollisionIsElastic();
776  eventInfo->nReflectionAvatars = theBook.getAvatars(SurfaceAvatarType);
777  eventInfo->nCollisionAvatars = theBook.getAvatars(CollisionAvatarType);
778  eventInfo->nDecayAvatars = theBook.getAvatars(DecayAvatarType);
779  eventInfo->nEnergyViolationInteraction = theBook.getEnergyViolationInteraction();
780  }
Store * getStore() const
G4double getExcitationEnergy() const
Get the excitation energy of the cluster.
ParticleList const & getOutgoingParticles() const
Definition: G4INCLStore.hh:223
const G4double hc
[MeV*fm]
ThreeVector const & getSpin() const
Get the spin of the nucleus.
#define INCL_WARN(x)
G4double toDegrees(G4double radians)
G4int getA() const
Returns the baryon number.
G4int getZ() const
Returns the charge number.
G4double getKineticEnergy() const
Get the particle kinetic energy.
int G4int
Definition: G4Types.hh:78
Book & getBook()
Definition: G4INCLStore.hh:259
bool G4bool
Definition: G4Types.hh:79
G4double getExcitationEnergy() const
Get the excitation energy of the nucleus.
G4int getAcceptedCollisions() const
Definition: G4INCLBook.hh:100
G4bool hasRemnant() const
Does the nucleus give a cascade remnant?
double G4double
Definition: G4Types.hh:76
const G4INCL::ThreeVector & getMomentum() const
ProjectileRemnant * theProjectileRemnant
Pointer to the quasi-projectile.
ParticleList::const_iterator ParticleIter
G4double getX() const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ finalizeProjectileRemnant()

void G4INCL::Nucleus::finalizeProjectileRemnant ( const G4double  emissionTime)

Finalise the projectile remnant.

Complete the treatment of the projectile remnant. If it contains nucleons, assign its excitation energy and spin. Move stuff to the outgoing list, if appropriate.

Parameters
emissionTimethe emission time of the projectile remnant

Definition at line 834 of file G4INCLNucleus.cc.

834  {
835  // Deal with the projectile remnant
836  const G4int prA = theProjectileRemnant->getA();
837  if(prA>=1) {
838  // Set the mass
841 
842  // Compute the excitation energy from the invariant mass
843  const G4double anExcitationEnergy = aMass
845 
846  // Set the excitation energy
847  theProjectileRemnant->setExcitationEnergy(anExcitationEnergy);
848 
849  // No spin!
850  theProjectileRemnant->setSpin(ThreeVector());
851 
852  // Set the emission time
853  theProjectileRemnant->setEmissionTime(anEmissionTime);
854  }
855  }
void setMass(G4double mass)
void setEmissionTime(G4double t)
G4int getA() const
Returns the baryon number.
G4int getZ() const
Returns the charge number.
int G4int
Definition: G4Types.hh:78
G4ThreadLocal NuclearMassFn getTableMass
Static pointer to the mass function for nuclei.
double G4double
Definition: G4Types.hh:76
G4double getInvariantMass() const
Get the the particle invariant mass.
void setExcitationEnergy(const G4double e)
Set the excitation energy of the cluster.
ProjectileRemnant * theProjectileRemnant
Pointer to the quasi-projectile.
void setSpin(const ThreeVector &j)
Set the spin of the nucleus.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getConservationBalance()

Nucleus::ConservationBalance G4INCL::Nucleus::getConservationBalance ( EventInfo const &  theEventInfo,
const G4bool  afterRecoil 
) const

Compute charge, mass, energy and momentum balance.

Definition at line 782 of file G4INCLNucleus.cc.

782  {
783  ConservationBalance theBalance;
784  // Initialise balance variables with the incoming values
785  theBalance.Z = theEventInfo.Zp + theEventInfo.Zt;
786  theBalance.A = theEventInfo.Ap + theEventInfo.At;
787 
788  theBalance.energy = getInitialEnergy();
789  theBalance.momentum = getIncomingMomentum();
790 
791  // Process outgoing particles
792  ParticleList const &outgoingParticles = theStore->getOutgoingParticles();
793  for(ParticleIter i=outgoingParticles.begin(), e=outgoingParticles.end(); i!=e; ++i ) {
794  theBalance.Z -= (*i)->getZ();
795  theBalance.A -= (*i)->getA();
796  // For outgoing clusters, the total energy automatically includes the
797  // excitation energy
798  theBalance.energy -= (*i)->getEnergy(); // Note that outgoing particles should have the real mass
799  theBalance.momentum -= (*i)->getMomentum();
800  }
801 
802  // Projectile-like remnant contribution, if present
804  theBalance.Z -= theProjectileRemnant->getZ();
805  theBalance.A -= theProjectileRemnant->getA();
808  theBalance.energy -= theProjectileRemnant->getKineticEnergy();
809  theBalance.momentum -= theProjectileRemnant->getMomentum();
810  }
811 
812  // Target-like remnant contribution, if present
813  if(hasRemnant()) {
814  theBalance.Z -= getZ();
815  theBalance.A -= getA();
816  theBalance.energy -= ParticleTable::getTableMass(getA(),getZ()) +
818  if(afterRecoil)
819  theBalance.energy -= getKineticEnergy();
820  theBalance.momentum -= getMomentum();
821  }
822 
823  return theBalance;
824  }
G4double getExcitationEnergy() const
Get the excitation energy of the cluster.
ParticleList const & getOutgoingParticles() const
Definition: G4INCLStore.hh:223
G4int getA() const
Returns the baryon number.
G4int getZ() const
Returns the charge number.
G4double getKineticEnergy() const
Get the particle kinetic energy.
G4double getInitialEnergy() const
Get the initial energy.
G4double getExcitationEnergy() const
Get the excitation energy of the nucleus.
G4bool hasRemnant() const
Does the nucleus give a cascade remnant?
G4ThreadLocal NuclearMassFn getTableMass
Static pointer to the mass function for nuclei.
const G4INCL::ThreeVector & getMomentum() const
const ThreeVector & getIncomingMomentum() const
Get the incoming momentum vector.
ProjectileRemnant * theProjectileRemnant
Pointer to the quasi-projectile.
ParticleList::const_iterator ParticleIter
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDensity()

NuclearDensity const* G4INCL::Nucleus::getDensity ( ) const
inline

Getter for theDensity.

Definition at line 365 of file G4INCLNucleus.hh.

365 { return theDensity; };
NuclearDensity const * theDensity
Pointer to the NuclearDensity object.
Here is the caller graph for this function:

◆ getExcitationEnergy()

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

Get the excitation energy of the nucleus.

Method computeRecoilKinematics() should be called first.

Definition at line 228 of file G4INCLNucleus.hh.

228 { return theExcitationEnergy; }
G4double theExcitationEnergy
Here is the caller graph for this function:

◆ getIncomingAngularMomentum()

const ThreeVector& G4INCL::Nucleus::getIncomingAngularMomentum ( ) const
inline

Get the incoming angular-momentum vector.

Definition at line 206 of file G4INCLNucleus.hh.

206 { return incomingAngularMomentum; }
ThreeVector incomingAngularMomentum
Here is the caller graph for this function:

◆ getIncomingMomentum()

const ThreeVector& G4INCL::Nucleus::getIncomingMomentum ( ) const
inline

Get the incoming momentum vector.

Definition at line 214 of file G4INCLNucleus.hh.

214  {
215  return incomingMomentum;
216  }
ThreeVector incomingMomentum
Here is the caller graph for this function:

◆ getInitialA()

G4int G4INCL::Nucleus::getInitialA ( ) const
inline

Definition at line 99 of file G4INCLNucleus.hh.

99 { return theInitialA; };
Here is the caller graph for this function:

◆ getInitialEnergy()

G4double G4INCL::Nucleus::getInitialEnergy ( ) const
inline

Get the initial energy.

Definition at line 222 of file G4INCLNucleus.hh.

222 { return initialEnergy; }
G4double initialEnergy
Here is the caller graph for this function:

◆ getInitialInternalEnergy()

G4double G4INCL::Nucleus::getInitialInternalEnergy ( ) const
inline

Definition at line 249 of file G4INCLNucleus.hh.

249 { return initialInternalEnergy; };
G4double initialInternalEnergy
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getInitialZ()

G4int G4INCL::Nucleus::getInitialZ ( ) const
inline

Definition at line 100 of file G4INCLNucleus.hh.

100 { return theInitialZ; };
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getNumberOfEnteringNeutrons()

G4int G4INCL::Nucleus::getNumberOfEnteringNeutrons ( ) const
inline

Definition at line 110 of file G4INCLNucleus.hh.

110 { return theNnInitial; };
G4int theNnInitial
The number of entering neutrons.

◆ getNumberOfEnteringProtons()

G4int G4INCL::Nucleus::getNumberOfEnteringProtons ( ) const
inline

Definition at line 109 of file G4INCLNucleus.hh.

109 { return theNpInitial; };
G4int theNpInitial
The number of entering protons.

◆ getPotential()

NuclearPotential::INuclearPotential const* G4INCL::Nucleus::getPotential ( ) const
inline

Getter for thePotential.

Definition at line 368 of file G4INCLNucleus.hh.

368 { return thePotential; };
NuclearPotential::INuclearPotential const * thePotential
Pointer to the NuclearPotential object.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getProjectileRemnant()

ProjectileRemnant* G4INCL::Nucleus::getProjectileRemnant ( ) const
inline

Get the projectile remnant.

Definition at line 334 of file G4INCLNucleus.hh.

334 { return theProjectileRemnant; }
ProjectileRemnant * theProjectileRemnant
Pointer to the quasi-projectile.
Here is the caller graph for this function:

◆ getStore()

Store* G4INCL::Nucleus::getStore ( ) const
inline

Definition at line 243 of file G4INCLNucleus.hh.

243 {return theStore; };
Here is the caller graph for this function:

◆ getSurfaceRadius()

G4double G4INCL::Nucleus::getSurfaceRadius ( Particle const *const  particle) const
inline

Get the maximum allowed radius for a given particle.

Calls the NuclearDensity::getMaxRFromP() method for nucleons and deltas, and the NuclearDensity::getTrasmissionRadius() method for pions.

Parameters
particlepointer to a particle
Returns
surface radius

Definition at line 298 of file G4INCLNucleus.hh.

298  {
299  if(particle->isPion())
300  // Temporarily set RPION = RMAX
301  return getUniverseRadius();
302  //return 0.5*(theDensity->getTransmissionRadius(particle)+getUniverseRadius());
303  else {
304  const G4double pr = particle->getReflectionMomentum()/thePotential->getFermiMomentum(particle);
305  if(pr>=1.)
306  return getUniverseRadius();
307  else
308  return theDensity->getMaxRFromP(particle->getType(), pr);
309  }
310  }
G4double getFermiMomentum(const Particle *const p) const
Return the Fermi momentum for a particle.
G4double getMaxRFromP(const ParticleType t, const G4double p) const
Get the maximum allowed radius for a given momentum.
NuclearDensity const * theDensity
Pointer to the NuclearDensity object.
NuclearPotential::INuclearPotential const * thePotential
Pointer to the NuclearPotential object.
G4double getUniverseRadius() const
Getter for theUniverseRadius.
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTransmissionBarrier()

G4double G4INCL::Nucleus::getTransmissionBarrier ( Particle const *const  p)
inline

Get the transmission barrier.

Definition at line 271 of file G4INCLNucleus.hh.

271  {
272  const G4double theTransmissionRadius = theDensity->getTransmissionRadius(p);
273  const G4double theParticleZ = p->getZ();
274  return PhysicalConstants::eSquared*(theZ-theParticleZ)*theParticleZ/theTransmissionRadius;
275  }
const G4double eSquared
Coulomb conversion factor [MeV*fm].
G4double getTransmissionRadius(Particle const *const p) const
The radius used for calculating the transmission coefficient.
NuclearDensity const * theDensity
Pointer to the NuclearDensity object.
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:

◆ getTryCompoundNucleus()

G4bool G4INCL::Nucleus::getTryCompoundNucleus ( )
inline

Definition at line 268 of file G4INCLNucleus.hh.

268 { return tryCN; }
Here is the caller graph for this function:

◆ getUniverseRadius()

G4double G4INCL::Nucleus::getUniverseRadius ( ) const
inline

Getter for theUniverseRadius.

Definition at line 313 of file G4INCLNucleus.hh.

313 { return theUniverseRadius; }
G4double theUniverseRadius
The radius of the universe.
Here is the caller graph for this function:

◆ hasRemnant()

G4bool G4INCL::Nucleus::hasRemnant ( ) const
inline

Does the nucleus give a cascade remnant?

To be called after computeRecoilKinematics().

Definition at line 261 of file G4INCLNucleus.hh.

261 { return remnant; }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ INCL_DECLARE_ALLOCATION_POOL()

G4INCL::Nucleus::INCL_DECLARE_ALLOCATION_POOL ( Nucleus  )
private

◆ initializeParticles()

void G4INCL::Nucleus::initializeParticles ( )
virtual

Call the Cluster method to generate the initial distribution of particles. At the beginning all particles are assigned as spectators.

Reimplemented from G4INCL::Cluster.

Definition at line 116 of file G4INCLNucleus.cc.

116  {
117  // Reset the variables connected with the projectile remnant
118  delete theProjectileRemnant;
119  theProjectileRemnant = NULL;
120 
122  for(ParticleIter i=particles.begin(), e=particles.end(); i!=e; ++i) {
124  }
126  particles.clear();
129  }
G4double computeTotalEnergy() const
Compute the current total energy.
G4double initialInternalEnergy
void add(Particle *p)
Definition: G4INCLStore.cc:58
void updatePotentialEnergy(Particle *p) const
Update the particle potential energy.
virtual void initializeParticles()
Initialise the NuclearDensity pointer and sample the particles.
ParticleList particles
G4INCL::ThreeVector thePosition
ThreeVector initialCenterOfMass
ProjectileRemnant * theProjectileRemnant
Pointer to the quasi-projectile.
ParticleList::const_iterator ParticleIter
Here is the call graph for this function:
Here is the caller graph for this function:

◆ insertParticle()

void G4INCL::Nucleus::insertParticle ( Particle p)
inline

Insert a new particle (e.g. a projectile) in the nucleus.

Definition at line 83 of file G4INCLNucleus.hh.

83  {
84  theZ += p->getZ();
85  theA += p->getA();
87  if(p->isNucleon()) {
90  }
91  if(!p->isTargetSpectator()) theStore->getBook().incrementCascading();
92  };
G4int heaviside(G4int n)
Book & getBook()
Definition: G4INCLStore.hh:259
G4int theNpInitial
The number of entering protons.
G4int theNnInitial
The number of entering neutrons.
void incrementCascading()
Definition: G4INCLBook.hh:77
G4int getIsospin(const ParticleType t)
Get the isospin of a particle.
void particleHasEntered(Particle *const particle)
Move a particle from incoming to inside.
Definition: G4INCLStore.cc:188
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isEventTransparent()

G4bool G4INCL::Nucleus::isEventTransparent ( ) const

Is the event transparent?

To be called at the end of the cascade.

Definition at line 481 of file G4INCLNucleus.cc.

481  {
482 
483  Book const &theBook = theStore->getBook();
484  const G4int nEventCollisions = theBook.getAcceptedCollisions();
485  const G4int nEventDecays = theBook.getAcceptedDecays();
486  const G4int nEventClusters = theBook.getEmittedClusters();
487  if(nEventCollisions==0 && nEventDecays==0 && nEventClusters==0)
488  return true;
489 
490  return false;
491 
492  }
int G4int
Definition: G4Types.hh:78
Book & getBook()
Definition: G4INCLStore.hh:259
G4int getAcceptedCollisions() const
Definition: G4INCLBook.hh:100
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isNucleusNucleusCollision()

G4bool G4INCL::Nucleus::isNucleusNucleusCollision ( ) const
inline

Is it a nucleus-nucleus collision?

Definition at line 319 of file G4INCLNucleus.hh.

319 { return isNucleusNucleus; }
G4bool isNucleusNucleus
true if running a nucleus-nucleus collision
Here is the caller graph for this function:

◆ operator=()

Nucleus& G4INCL::Nucleus::operator= ( const Nucleus rhs)

Dummy assignment operator to silence Coverity warning.

◆ print()

std::string G4INCL::Nucleus::print ( )

Print the nucleus info

Definition at line 279 of file G4INCLNucleus.cc.

280  {
281  std::stringstream ss;
282  ss << "Particles in the nucleus:" << '\n'
283  << "Inside:" << '\n';
284  G4int counter = 1;
285  ParticleList const &inside = theStore->getParticles();
286  for(ParticleIter p=inside.begin(), e=inside.end(); p!=e; ++p) {
287  ss << "index = " << counter << '\n'
288  << (*p)->print();
289  counter++;
290  }
291  ss <<"Outgoing:" << '\n';
292  ParticleList const &outgoing = theStore->getOutgoingParticles();
293  for(ParticleIter p=outgoing.begin(), e=outgoing.end(); p!=e; ++p)
294  ss << (*p)->print();
295 
296  return ss.str();
297  }
ParticleList const & getOutgoingParticles() const
Definition: G4INCLStore.hh:223
int G4int
Definition: G4Types.hh:78
ParticleList const & getParticles() const
Definition: G4INCLStore.hh:253
ParticleList::const_iterator ParticleIter
Here is the call graph for this function:
Here is the caller graph for this function:

◆ propagateParticles()

void G4INCL::Nucleus::propagateParticles ( G4double  step)

Propagate the particles one time step.

Parameters
steplength of the time step

Definition at line 208 of file G4INCLNucleus.cc.

208  {
209  INCL_WARN("Useless Nucleus::propagateParticles -method called." << '\n');
210  }
#define INCL_WARN(x)
Here is the caller graph for this function:

◆ setDensity()

void G4INCL::Nucleus::setDensity ( NuclearDensity const *const  d)
inline

Setter for theDensity.

Definition at line 358 of file G4INCLNucleus.hh.

358  {
359  theDensity=d;
362  };
Float_t d
void setDensity(NuclearDensity const *const d)
Setter for theDensity.
NuclearDensity const * theDensity
Pointer to the NuclearDensity object.
ParticleSampler * theParticleSampler
Here is the call graph for this function:

◆ setIncomingAngularMomentum()

void G4INCL::Nucleus::setIncomingAngularMomentum ( const ThreeVector j)
inline

Set the incoming angular-momentum vector.

Definition at line 201 of file G4INCLNucleus.hh.

201  {
203  }
ThreeVector incomingAngularMomentum
Here is the caller graph for this function:

◆ setIncomingMomentum()

void G4INCL::Nucleus::setIncomingMomentum ( const ThreeVector p)
inline

Set the incoming momentum vector.

Definition at line 209 of file G4INCLNucleus.hh.

209  {
210  incomingMomentum = p;
211  }
ThreeVector incomingMomentum
Here is the caller graph for this function:

◆ setInitialEnergy()

void G4INCL::Nucleus::setInitialEnergy ( const G4double  e)
inline

Set the initial energy.

Definition at line 219 of file G4INCLNucleus.hh.

219 { initialEnergy = e; }
G4double initialEnergy
Here is the caller graph for this function:

◆ setNucleusNucleusCollision()

void G4INCL::Nucleus::setNucleusNucleusCollision ( )
inline

Set a nucleus-nucleus collision.

Definition at line 322 of file G4INCLNucleus.hh.

322 { isNucleusNucleus=true; }
G4bool isNucleusNucleus
true if running a nucleus-nucleus collision
Here is the caller graph for this function:

◆ setParticleNucleusCollision()

void G4INCL::Nucleus::setParticleNucleusCollision ( )
inline

Set a particle-nucleus collision.

Definition at line 325 of file G4INCLNucleus.hh.

325 { isNucleusNucleus=false; }
G4bool isNucleusNucleus
true if running a nucleus-nucleus collision
Here is the caller graph for this function:

◆ setProjectileRemnant()

void G4INCL::Nucleus::setProjectileRemnant ( ProjectileRemnant *const  c)
inline

Set the projectile remnant.

Definition at line 328 of file G4INCLNucleus.hh.

328  {
329  delete theProjectileRemnant;
331  }
ProjectileRemnant * theProjectileRemnant
Pointer to the quasi-projectile.
Here is the caller graph for this function:

◆ setStore()

void G4INCL::Nucleus::setStore ( Store s)
inline

Definition at line 244 of file G4INCLNucleus.hh.

244  {
245  delete theStore;
246  theStore = s;
247  };
static const double s
Definition: G4SIunits.hh:168

◆ setUniverseRadius()

void G4INCL::Nucleus::setUniverseRadius ( const G4double  universeRadius)
inline

Setter for theUniverseRadius.

Definition at line 316 of file G4INCLNucleus.hh.

316 { theUniverseRadius=universeRadius; }
G4double theUniverseRadius
The radius of the universe.

◆ updatePotentialEnergy()

void G4INCL::Nucleus::updatePotentialEnergy ( Particle p) const
inline

Update the particle potential energy.

Definition at line 353 of file G4INCLNucleus.hh.

353  {
354  p->setPotentialEnergy(thePotential->computePotentialEnergy(p));
355  }
NuclearPotential::INuclearPotential const * thePotential
Pointer to the NuclearPotential object.
virtual G4double computePotentialEnergy(const Particle *const p) const =0
Here is the call graph for this function:
Here is the caller graph for this function:

◆ useFusionKinematics()

void G4INCL::Nucleus::useFusionKinematics ( )

Adjust the kinematics for complete-fusion events.

Definition at line 826 of file G4INCLNucleus.cc.

826  {
832  }
void setMass(G4double mass)
ThreeVector incomingMomentum
ThreeVector incomingAngularMomentum
G4double mag2() const
void setEnergy(G4double energy)
G4double theExcitationEnergy
G4INCL::ThreeVector theMomentum
virtual G4double getTableMass() const
Get the real particle mass.
G4double initialEnergy
void setSpin(const ThreeVector &j)
Set the spin of the nucleus.
virtual void setMomentum(const G4INCL::ThreeVector &momentum)
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ incomingAngularMomentum

ThreeVector G4INCL::Nucleus::incomingAngularMomentum
private

Definition at line 385 of file G4INCLNucleus.hh.

◆ incomingMomentum

ThreeVector G4INCL::Nucleus::incomingMomentum
private

Definition at line 385 of file G4INCLNucleus.hh.

◆ initialCenterOfMass

ThreeVector G4INCL::Nucleus::initialCenterOfMass
private

Definition at line 386 of file G4INCLNucleus.hh.

◆ initialEnergy

G4double G4INCL::Nucleus::initialEnergy
private

Definition at line 389 of file G4INCLNucleus.hh.

◆ initialInternalEnergy

G4double G4INCL::Nucleus::initialInternalEnergy
private

Definition at line 384 of file G4INCLNucleus.hh.

◆ isNucleusNucleus

G4bool G4INCL::Nucleus::isNucleusNucleus
private

true if running a nucleus-nucleus collision

Tells INCL whether to make a projectile-like pre-fragment or not.

Definition at line 405 of file G4INCLNucleus.hh.

◆ projectileA

G4int G4INCL::Nucleus::projectileA
private

The mass number of the projectile.

Definition at line 396 of file G4INCLNucleus.hh.

◆ projectileZ

G4int G4INCL::Nucleus::projectileZ
private

The charge number of the projectile.

Definition at line 394 of file G4INCLNucleus.hh.

◆ remnant

G4bool G4INCL::Nucleus::remnant
private

Definition at line 387 of file G4INCLNucleus.hh.

◆ theDensity

NuclearDensity const* G4INCL::Nucleus::theDensity
private

Pointer to the NuclearDensity object.

Definition at line 414 of file G4INCLNucleus.hh.

◆ theInitialA

G4int G4INCL::Nucleus::theInitialA
private

Definition at line 379 of file G4INCLNucleus.hh.

◆ theInitialZ

G4int G4INCL::Nucleus::theInitialZ
private

Definition at line 379 of file G4INCLNucleus.hh.

◆ theNnInitial

G4int G4INCL::Nucleus::theNnInitial
private

The number of entering neutrons.

Definition at line 383 of file G4INCLNucleus.hh.

◆ theNpInitial

G4int G4INCL::Nucleus::theNpInitial
private

The number of entering protons.

Definition at line 381 of file G4INCLNucleus.hh.

◆ thePotential

NuclearPotential::INuclearPotential const* G4INCL::Nucleus::thePotential
private

Pointer to the NuclearPotential object.

Definition at line 417 of file G4INCLNucleus.hh.

◆ theProjectileRemnant

ProjectileRemnant* G4INCL::Nucleus::theProjectileRemnant
private

Pointer to the quasi-projectile.

Owned by the Nucleus object.

Definition at line 411 of file G4INCLNucleus.hh.

◆ theStore

Store* G4INCL::Nucleus::theStore
private

Definition at line 390 of file G4INCLNucleus.hh.

◆ theUniverseRadius

G4double G4INCL::Nucleus::theUniverseRadius
private

The radius of the universe.

Definition at line 399 of file G4INCLNucleus.hh.

◆ tryCN

G4bool G4INCL::Nucleus::tryCN
private

Definition at line 391 of file G4INCLNucleus.hh.


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