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

#include <G4INCLNucleus.hh>

Inheritance diagram for G4INCL::Nucleus:
G4INCL::Cluster G4INCL::Particle

Data Structures

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
 
ParticleList const & getCreatedParticles () const
 
ParticleList const & getUpdatedParticles () const
 
ParticlegetBlockedDelta () const
 Get the delta that could not decay. More...
 
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 ()
 
G4int getProjectileChargeNumber () const
 Return the charge number of the projectile. More...
 
G4int getProjectileMassNumber () const
 Return the mass number of the projectile. More...
 
void setProjectileChargeNumber (G4int n)
 Set the charge number of the projectile. More...
 
void setProjectileMassNumber (G4int n)
 Set the mass number of the projectile. More...
 
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
 Get the particle species. More...
 
void deleteParticles ()
 
void clearParticles ()
 
void setZ (const G4int Z)
 Set the charge number of the cluster. More...
 
void setA (const G4int A)
 Set the mass number of the cluster. More...
 
G4double getExcitationEnergy () const
 Get the excitation energy of the cluster. More...
 
void setExcitationEnergy (const G4double e)
 Set the excitation energy of the cluster. More...
 
virtual G4double getTableMass () const
 Get the real particle mass. More...
 
ParticleList const & getParticles () const
 
void removeParticle (Particle *const p)
 Remove a particle from the cluster components. More...
 
void addParticle (Particle *const p)
 
void addParticles (ParticleList const &pL)
 Add a list of particles to the cluster. More...
 
ParticleList getParticleList () const
 Returns the list of particles that make up the cluster. More...
 
std::string print () const
 
void internalBoostToCM ()
 Boost to the CM of the component particles. More...
 
void putParticlesOffShell ()
 Put the cluster components off shell. More...
 
void setPosition (const ThreeVector &position)
 Set the position of the cluster. More...
 
void boost (const ThreeVector &aBoostVector)
 Boost the cluster with the indicated velocity. More...
 
void freezeInternalMotion ()
 Freeze the internal motion of the particles. More...
 
virtual void rotate (const G4double angle, const ThreeVector &axis)
 Rotate position and momentum of all the particles. More...
 
virtual void makeProjectileSpectator ()
 Make all the components projectile spectators, too. More...
 
virtual void makeTargetSpectator ()
 Make all the components target spectators, too. More...
 
virtual void makeParticipant ()
 Make all the components participants, too. More...
 
ThreeVector const & getSpin () const
 Get the spin of the nucleus. More...
 
void setSpin (const ThreeVector &j)
 Set the spin of the nucleus. More...
 
G4INCL::ThreeVector getAngularMomentum () const
 Get the total angular momentum (orbital + spin) More...
 
- Public Member Functions inherited from G4INCL::Particle
 Particle ()
 
 Particle (ParticleType t, G4double energy, ThreeVector const &momentum, ThreeVector const &position)
 
 Particle (ParticleType t, ThreeVector const &momentum, ThreeVector const &position)
 
virtual ~Particle ()
 
 Particle (const Particle &rhs)
 Copy constructor. More...
 
Particleoperator= (const Particle &rhs)
 Assignment operator. More...
 
G4INCL::ParticleType getType () const
 
void setType (ParticleType t)
 
G4bool isNucleon () const
 
ParticipantType getParticipantType () const
 
void setParticipantType (ParticipantType const p)
 
G4bool isParticipant () const
 
G4bool isTargetSpectator () const
 
G4bool isProjectileSpectator () const
 
G4bool isPion () const
 Is this a pion? More...
 
G4bool isResonance () const
 Is it a resonance? More...
 
G4bool isDelta () const
 Is it a Delta? More...
 
G4int getA () const
 Returns the baryon number. More...
 
G4int getZ () const
 Returns the charge number. More...
 
G4double getBeta () const
 
ThreeVector boostVector () const
 
void boost (const ThreeVector &aBoostVector)
 
void lorentzContract (const ThreeVector &aBoostVector, const ThreeVector &refPos)
 Lorentz-contract the particle position around some center. More...
 
G4double getMass () const
 Get the cached particle mass. More...
 
G4double getINCLMass () const
 Get the INCL particle mass. More...
 
G4double getRealMass () const
 Get the real particle mass. More...
 
void setRealMass ()
 Set the mass of the Particle to its real mass. More...
 
void setTableMass ()
 Set the mass of the Particle to its table mass. More...
 
void setINCLMass ()
 Set the mass of the Particle to its table mass. More...
 
G4double getEmissionQValueCorrection (const G4int AParent, const G4int ZParent) const
 Computes correction on the emission Q-value. More...
 
G4double getTransferQValueCorrection (const G4int AFrom, const G4int ZFrom, const G4int ATo, const G4int ZTo) const
 Computes correction on the transfer Q-value. More...
 
G4double getInvariantMass () const
 Get the the particle invariant mass. More...
 
G4double getKineticEnergy () const
 Get the particle kinetic energy. More...
 
G4double getPotentialEnergy () const
 Get the particle potential energy. More...
 
void setPotentialEnergy (G4double v)
 Set the particle potential energy. More...
 
G4double getEnergy () const
 
void setMass (G4double mass)
 
void setEnergy (G4double energy)
 
const G4INCL::ThreeVectorgetMomentum () const
 
virtual void setMomentum (const G4INCL::ThreeVector &momentum)
 
const G4INCL::ThreeVectorgetPosition () const
 
G4double getHelicity ()
 
void setHelicity (G4double h)
 
void propagate (G4double step)
 
G4int getNumberOfCollisions () const
 Return the number of collisions undergone by the particle. More...
 
void setNumberOfCollisions (G4int n)
 Set the number of collisions undergone by the particle. More...
 
void incrementNumberOfCollisions ()
 Increment the number of collisions undergone by the particle. More...
 
G4int getNumberOfDecays () const
 Return the number of decays undergone by the particle. More...
 
void setNumberOfDecays (G4int n)
 Set the number of decays undergone by the particle. More...
 
void incrementNumberOfDecays ()
 Increment the number of decays undergone by the particle. More...
 
void setOutOfWell ()
 Mark the particle as out of its potential well. More...
 
G4bool isOutOfWell () const
 Check if the particle is out of its potential well. More...
 
void setEmissionTime (G4double t)
 
G4double getEmissionTime ()
 
ThreeVector getTransversePosition () const
 Transverse component of the position w.r.t. the momentum. More...
 
ThreeVector getLongitudinalPosition () const
 Longitudinal component of the position w.r.t. the momentum. More...
 
const ThreeVectoradjustMomentumFromEnergy ()
 Rescale the momentum to match the total energy. More...
 
G4double adjustEnergyFromMomentum ()
 Recompute the energy to match the momentum. More...
 
G4bool isInList (ParticleList const &l) const
 Check if the particle belongs to a given list. More...
 
G4bool isCluster () const
 
void setFrozenMomentum (const ThreeVector &momentum)
 Set the frozen particle momentum. More...
 
void setFrozenEnergy (const G4double energy)
 Set the frozen particle momentum. More...
 
ThreeVector getFrozenMomentum () const
 Get the frozen particle momentum. More...
 
G4double getFrozenEnergy () const
 Get the frozen particle momentum. More...
 
ThreeVector getPropagationVelocity () const
 Get the propagation velocity of the particle. More...
 
void freezePropagation ()
 Freeze particle propagation. More...
 
void thawPropagation ()
 Unfreeze particle propagation. More...
 
std::string print () const
 
std::string dump () const
 
long getID () const
 
ParticleList const * getParticles () const
 
G4double getReflectionMomentum () const
 Return the reflection momentum. More...
 
void setUncorrelatedMomentum (const G4double p)
 Set the uncorrelated momentum. More...
 
void rpCorrelate ()
 Make the particle follow a strict r-p correlation. More...
 
void rpDecorrelate ()
 Make the particle not follow a strict r-p correlation. More...
 
G4double getCosRPAngle () const
 Get the cosine of the angle between position and momentum. More...
 

Additional Inherited Members

- Protected Member Functions inherited from G4INCL::Particle
void swap (Particle &rhs)
 Helper method for the assignment operator. More...
 
- Protected Attributes inherited from G4INCL::Cluster
ParticleList particles
 
G4double theExcitationEnergy
 
ThreeVector theSpin
 
ParticleSamplertheParticleSampler
 
- Protected Attributes inherited from G4INCL::Particle
G4int theZ
 
G4int theA
 
ParticipantType theParticipantType
 
G4INCL::ParticleType theType
 
G4double theEnergy
 
G4doublethePropagationEnergy
 
G4double theFrozenEnergy
 
G4INCL::ThreeVector theMomentum
 
G4INCL::ThreeVectorthePropagationMomentum
 
G4INCL::ThreeVector theFrozenMomentum
 
G4INCL::ThreeVector thePosition
 
G4int nCollisions
 
G4int nDecays
 
G4double thePotentialEnergy
 
long ID
 
G4bool rpCorrelated
 
G4double uncorrelatedMomentum
 

Detailed Description

Definition at line 64 of file G4INCLNucleus.hh.

Constructor & Destructor Documentation

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

Definition at line 64 of file G4INCLNucleus.cc.

References G4INCL::NuclearDensityFactory::createDensity(), G4INCL::NuclearPotential::createPotential(), G4INCL::Config::getPionPotential(), G4INCL::Config::getPotentialType(), G4INCL::NuclearPotential::INuclearPotential::getSeparationEnergy(), G4INCL::IsospinPotential, G4INCL::Neutron, G4INCL::Proton, G4INCL::ParticleSampler::setDensity(), G4INCL::ParticleTable::setNeutronSeparationEnergy(), G4INCL::ParticleSampler::setPotential(), G4INCL::ParticleTable::setProtonSeparationEnergy(), G4INCL::Particle::theA, G4INCL::Cluster::theParticleSampler, and G4INCL::Particle::theZ.

65  : Cluster(charge,mass,true),
66  theInitialZ(charge), theInitialA(mass),
67  theNpInitial(0), theNnInitial(0),
68  initialInternalEnergy(0.),
69  incomingAngularMomentum(0.,0.,0.), incomingMomentum(0.,0.,0.),
70  initialCenterOfMass(0.,0.,0.),
71  remnant(true),
72  blockedDelta(NULL),
73  initialEnergy(0.),
74  tryCN(false),
75  projectileZ(0),
76  projectileA(0),
77  theUniverseRadius(universeRadius),
78  isNucleusNucleus(false),
79  theProjectileRemnant(NULL),
80  theDensity(NULL),
81  thePotential(NULL)
82  {
83  PotentialType potentialType;
84  G4bool pionPotential;
85  if(conf) {
86  potentialType = conf->getPotentialType();
87  pionPotential = conf->getPionPotential();
88  } else { // By default we don't use energy dependent
89  // potential. This is convenient for some tests.
90  potentialType = IsospinPotential;
91  pionPotential = true;
92  }
93 
94  thePotential = NuclearPotential::createPotential(potentialType, theA, theZ, pionPotential);
95 
98 
100 
101  theParticleSampler->setPotential(thePotential);
102  theParticleSampler->setDensity(theDensity);
103 
104  if(theUniverseRadius<0)
105  theUniverseRadius = theDensity->getMaximumRadius();
106  theStore = new Store(conf);
107  toBeUpdated.clear();
108  }
void setProtonSeparationEnergy(const G4double s)
Setter for protonSeparationEnergy.
G4double getSeparationEnergy(const Particle *const p) const
Return the separation energy for a particle.
void setDensity(NuclearDensity const *const d)
Setter for theDensity.
bool G4bool
Definition: G4Types.hh:79
NuclearDensity const * createDensity(const G4int A, const G4int Z)
ParticleSampler * theParticleSampler
void setPotential(NuclearPotential::INuclearPotential const *const p)
Setter for thePotential.
INuclearPotential const * createPotential(const PotentialType type, const G4int theA, const G4int theZ, const G4bool pionPotential)
Create an INuclearPotential object.
void setNeutronSeparationEnergy(const G4double s)
Setter for protonSeparationEnergy.
Cluster(const G4int Z, const G4int A, const G4bool createParticleSampler=true)
Standard Cluster constructor.
G4INCL::Nucleus::~Nucleus ( )
virtual

Definition at line 110 of file G4INCLNucleus.cc.

References deleteProjectileRemnant().

110  {
111  delete theStore;
113  /* We don't delete the potential and the density here any more -- Factories
114  * are caching them
115  delete thePotential;
116  delete theDensity;*/
117  }
void deleteProjectileRemnant()
Delete the projectile remnant.
G4INCL::Nucleus::Nucleus ( const Nucleus rhs)

Dummy copy constructor to silence Coverity warning.

Member Function Documentation

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

Apply reaction final state information to the nucleus.

Definition at line 134 of file G4INCLNucleus.cc.

References G4INCL::Store::add(), G4INCL::Store::addToOutgoing(), deleted, G4INCL::FinalState::getBlockedDelta(), G4INCL::Store::getBook(), G4INCL::FinalState::getCreatedParticles(), G4INCL::Book::getCurrentTime(), G4INCL::FinalState::getDestroyedParticles(), G4INCL::FinalState::getEnteringParticles(), G4INCL::FinalState::getModifiedParticles(), G4INCL::FinalState::getOutgoingParticles(), G4INCL::Cluster::getParticles(), G4INCL::FinalState::getTotalEnergyBeforeInteraction(), G4INCL::FinalState::getValidity(), INCL_DEBUG, INCL_ERROR, insertParticle(), G4INCL::ParticleBelowFermiFS, G4INCL::ParticleBelowZeroFS, G4INCL::Store::particleHasBeenDestroyed(), G4INCL::Store::particleHasBeenEjected(), G4INCL::Store::particleHasBeenUpdated(), G4INCL::PauliBlockedFS, G4INCL::FinalState::print(), G4INCL::Particle::theA, G4INCL::Particle::theZ, and G4INCL::ValidFS.

Referenced by decayInsideDeltas().

134  {
135  justCreated.clear();
136  toBeUpdated.clear(); // Clear the list of particles to be updated by the propagation model.
137  blockedDelta = NULL;
138 
139  if(!finalstate) // do nothing if no final state was returned
140  return;
141 
142  G4double totalEnergy = 0.0;
143 
144  FinalStateValidity const validity = finalstate->getValidity();
145  if(validity == ValidFS) {
146 
147  ParticleList const &created = finalstate->getCreatedParticles();
148  for(ParticleIter iter=created.begin(), e=created.end(); iter!=e; ++iter) {
149  theStore->add((*iter));
150  if(!(*iter)->isOutOfWell()) {
151  totalEnergy += (*iter)->getEnergy() - (*iter)->getPotentialEnergy();
152  justCreated.push_back((*iter)); // New particle, so we must create avatars for it
153  }
154  }
155 
156  ParticleList const &deleted = finalstate->getDestroyedParticles();
157  for(ParticleIter iter=deleted.begin(), e=deleted.end(); iter!=e; ++iter) {
158  theStore->particleHasBeenDestroyed(*iter);
159  }
160 
161  ParticleList const &modified = finalstate->getModifiedParticles();
162  for(ParticleIter iter=modified.begin(), e=modified.end(); iter!=e; ++iter) {
163  theStore->particleHasBeenUpdated(*iter);
164  totalEnergy += (*iter)->getEnergy() - (*iter)->getPotentialEnergy();
165  toBeUpdated.push_back((*iter)); // Particle is modified so we have to create new avatars for it.
166  }
167 
168  ParticleList const &out = finalstate->getOutgoingParticles();
169  for(ParticleIter iter=out.begin(), e=out.end(); iter!=e; ++iter) {
170  if((*iter)->isCluster()) {
171  Cluster *clusterOut = dynamic_cast<Cluster*>((*iter));
172 // assert(clusterOut);
173 #ifdef INCLXX_IN_GEANT4_MODE
174  if(!clusterOut)
175  continue;
176 #endif
177  ParticleList const &components = clusterOut->getParticles();
178  for(ParticleIter in=components.begin(), end=components.end(); in!=end; ++in)
179  theStore->particleHasBeenEjected(*in);
180  } else {
181  theStore->particleHasBeenEjected(*iter);
182  }
183  totalEnergy += (*iter)->getEnergy(); // No potential here because the particle is gone
184  theA -= (*iter)->getA();
185  theZ -= (*iter)->getZ();
186  theStore->addToOutgoing(*iter);
187  (*iter)->setEmissionTime(theStore->getBook().getCurrentTime());
188  }
189 
190  ParticleList const &entering = finalstate->getEnteringParticles();
191  for(ParticleIter iter=entering.begin(), e=entering.end(); iter!=e; ++iter) {
192  insertParticle(*iter);
193  totalEnergy += (*iter)->getEnergy() - (*iter)->getPotentialEnergy();
194  toBeUpdated.push_back((*iter)); // Particle is modified so we have to create new avatars for it.
195  }
196  } else if(validity == PauliBlockedFS) {
197  blockedDelta = finalstate->getBlockedDelta();
198  } else if(validity == ParticleBelowFermiFS || validity == ParticleBelowZeroFS) {
199  INCL_DEBUG("A Particle is entering below the Fermi sea:" << std::endl << finalstate->print() << std::endl);
200  tryCN = true;
201  ParticleList const &entering = finalstate->getEnteringParticles();
202  for(ParticleIter iter=entering.begin(), e=entering.end(); iter!=e; ++iter) {
203  insertParticle(*iter);
204  }
205  }
206 
207  if(validity==ValidFS &&
208  std::abs(totalEnergy - finalstate->getTotalEnergyBeforeInteraction()) > 0.1) {
209  INCL_ERROR("Energy nonconservation! Energy at the beginning of the event = "
210  << finalstate->getTotalEnergyBeforeInteraction()
211  <<" and after interaction = "
212  << totalEnergy << std::endl
213  << finalstate->print());
214  }
215  }
#define INCL_ERROR(x)
void add(Particle *p)
Definition: G4INCLStore.cc:57
UnorderedVector< Particle * > ParticleList
Book & getBook()
Definition: G4INCLStore.hh:237
void particleHasBeenDestroyed(Particle *const)
Definition: G4INCLStore.cc:240
G4double getCurrentTime()
Definition: G4INCLBook.hh:97
void particleHasBeenEjected(Particle *const)
Definition: G4INCLStore.cc:231
void particleHasBeenUpdated(Particle *const)
Definition: G4INCLStore.cc:144
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:168
ParticleList::const_iterator ParticleIter
Cluster(const G4int Z, const G4int A, const G4bool createParticleSampler=true)
Standard Cluster constructor.
ThreeVector G4INCL::Nucleus::computeCenterOfMass ( ) const

Compute the current center-of-mass position.

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

Definition at line 268 of file G4INCLNucleus.cc.

References python.hepunit::cm, and G4INCL::Store::getParticles().

Referenced by computeRecoilKinematics().

268  {
269  ThreeVector cm(0.,0.,0.);
270  G4double totalMass = 0.0;
271  ParticleList const &inside = theStore->getParticles();
272  for(ParticleIter p=inside.begin(), e=inside.end(); p!=e; ++p) {
273  const G4double mass = (*p)->getMass();
274  cm += (*p)->getPosition() * mass;
275  totalMass += mass;
276  }
277  cm /= totalMass;
278  return cm;
279  }
ParticleList const & getParticles() const
Definition: G4INCLStore.hh:231
const char * p
Definition: xmltok.h:285
UnorderedVector< Particle * > ParticleList
double G4double
Definition: G4Types.hh:76
ParticleList::const_iterator ParticleIter
G4double G4INCL::Nucleus::computeExcitationEnergy ( ) const

Compute the current excitation energy.

Returns
the excitation energy [MeV]

Definition at line 281 of file G4INCLNucleus.cc.

References computeSeparationEnergyBalance(), and computeTotalEnergy().

281  {
282  const G4double totalEnergy = computeTotalEnergy();
283  const G4double separationEnergies = computeSeparationEnergyBalance();
284 
285  return totalEnergy - initialInternalEnergy - separationEnergies;
286  }
G4double computeSeparationEnergyBalance() const
Outgoing - incoming separation energies.
G4double computeTotalEnergy() const
Compute the current total energy.
double G4double
Definition: G4Types.hh:76
void G4INCL::Nucleus::computeRecoilKinematics ( )

Compute the recoil momentum and spin of the nucleus.

Definition at line 235 of file G4INCLNucleus.cc.

References G4INCL::Particle::adjustEnergyFromMomentum(), computeCenterOfMass(), emitInsidePions(), G4INCL::Cluster::getAngularMomentum(), G4INCL::Particle::getMomentum(), G4INCL::Store::getOutgoingParticles(), G4INCL::ParticleTable::getTableMass, G4INCL::Particle::setMass(), G4INCL::Particle::theA, G4INCL::Cluster::theExcitationEnergy, G4INCL::Particle::theMomentum, G4INCL::Particle::thePosition, G4INCL::Cluster::theSpin, and G4INCL::Particle::theZ.

235  {
236  // If the remnant consists of only one nucleon, we need to apply a special
237  // procedure to put it on mass shell.
238  if(theA==1) {
239  emitInsidePions();
240  computeOneNucleonRecoilKinematics();
241  remnant=false;
242  return;
243  }
244 
245  // Compute the recoil momentum and angular momentum
246  theMomentum = incomingMomentum;
247  theSpin = incomingAngularMomentum;
248 
249  ParticleList const &outgoing = theStore->getOutgoingParticles();
250  for(ParticleIter p=outgoing.begin(), e=outgoing.end(); p!=e; ++p) {
251  theMomentum -= (*p)->getMomentum();
252  theSpin -= (*p)->getAngularMomentum();
253  }
254  if(theProjectileRemnant) {
255  theMomentum -= theProjectileRemnant->getMomentum();
256  theSpin -= theProjectileRemnant->getAngularMomentum();
257  }
258 
259  // Subtract orbital angular momentum
261  theSpin -= (thePosition-initialCenterOfMass).vector(theMomentum);
262 
265  remnant=true;
266  }
void setMass(G4double mass)
const char * p
Definition: xmltok.h:285
const G4INCL::ThreeVector & getMomentum() const
G4double adjustEnergyFromMomentum()
Recompute the energy to match the momentum.
G4INCL::ThreeVector getAngularMomentum() const
Get the total angular momentum (orbital + spin)
UnorderedVector< Particle * > ParticleList
ParticleList const & getOutgoingParticles() const
Definition: G4INCLStore.hh:201
ThreeVector theSpin
G4INCL::ThreeVector thePosition
ThreeVector computeCenterOfMass() const
Compute the current center-of-mass position.
G4double theExcitationEnergy
void emitInsidePions()
Force emission of all pions inside the nucleus.
G4ThreadLocal NuclearMassFn getTableMass
Static pointer to the mass function for nuclei.
G4INCL::ThreeVector theMomentum
ParticleList::const_iterator ParticleIter
G4double G4INCL::Nucleus::computeSeparationEnergyBalance ( ) const
inline

Outgoing - incoming separation energies.

Used by CDPP.

Definition at line 128 of file G4INCLNucleus.hh.

References G4INCL::Composite, G4INCL::DeltaMinus, G4INCL::DeltaPlus, G4INCL::DeltaPlusPlus, G4INCL::DeltaZero, G4INCL::Store::getOutgoingParticles(), G4INCL::NuclearPotential::INuclearPotential::getSeparationEnergy(), G4INCL::Neutron, G4INCL::PiMinus, G4INCL::PiPlus, and G4INCL::Proton.

Referenced by computeExcitationEnergy(), and G4INCL::CDPP::isBlocked().

128  {
129  G4double S = 0.0;
130  ParticleList const &outgoing = theStore->getOutgoingParticles();
131  for(ParticleIter i=outgoing.begin(), e=outgoing.end(); i!=e; ++i) {
132  const ParticleType t = (*i)->getType();
133  switch(t) {
134  case Proton:
135  case Neutron:
136  case DeltaPlusPlus:
137  case DeltaPlus:
138  case DeltaZero:
139  case DeltaMinus:
140  S += thePotential->getSeparationEnergy(*i);
141  break;
142  case Composite:
143  S += (*i)->getZ() * thePotential->getSeparationEnergy(Proton)
144  + ((*i)->getA() - (*i)->getZ()) * thePotential->getSeparationEnergy(Neutron);
145  break;
146  case PiPlus:
147  S += thePotential->getSeparationEnergy(Proton) - thePotential->getSeparationEnergy(Neutron);
148  break;
149  case PiMinus:
150  S += thePotential->getSeparationEnergy(Neutron) - thePotential->getSeparationEnergy(Proton);
151  break;
152  default:
153  break;
154  }
155  }
156 
157  S -= theNpInitial * thePotential->getSeparationEnergy(Proton);
158  S -= theNnInitial * thePotential->getSeparationEnergy(Neutron);
159  return S;
160  }
UnorderedVector< Particle * > ParticleList
G4double getSeparationEnergy(const Particle *const p) const
Return the separation energy for a particle.
ParticleList const & getOutgoingParticles() const
Definition: G4INCLStore.hh:201
double G4double
Definition: G4Types.hh:76
ParticleList::const_iterator ParticleIter
G4double G4INCL::Nucleus::computeTotalEnergy ( ) const

Compute the current total energy.

Returns
the total energy [MeV]

Definition at line 221 of file G4INCLNucleus.cc.

References G4INCL::ParticleTable::effectiveNucleonMass, and G4INCL::Store::getParticles().

Referenced by computeExcitationEnergy(), and initializeParticles().

221  {
222  G4double totalEnergy = 0.0;
223  ParticleList const &inside = theStore->getParticles();
224  for(ParticleIter p=inside.begin(), e=inside.end(); p!=e; ++p) {
225  if((*p)->isNucleon()) // Ugly: we should calculate everything using total energies!
226  totalEnergy += (*p)->getKineticEnergy() - (*p)->getPotentialEnergy();
227  else if((*p)->isResonance())
228  totalEnergy += (*p)->getEnergy() - (*p)->getPotentialEnergy() - ParticleTable::effectiveNucleonMass;
229  else
230  totalEnergy += (*p)->getEnergy() - (*p)->getPotentialEnergy();
231  }
232  return totalEnergy;
233  }
ParticleList const & getParticles() const
Definition: G4INCLStore.hh:231
const char * p
Definition: xmltok.h:285
UnorderedVector< Particle * > ParticleList
double G4double
Definition: G4Types.hh:76
const G4double effectiveNucleonMass
ParticleList::const_iterator ParticleIter
G4bool G4INCL::Nucleus::containsDeltas ( )
inline

Returns true if the nucleus contains any deltas.

Definition at line 243 of file G4INCLNucleus.hh.

References G4INCL::Store::getParticles().

243  {
244  ParticleList const &inside = theStore->getParticles();
245  for(ParticleIter i=inside.begin(), e=inside.end(); i!=e; ++i)
246  if((*i)->isDelta()) return true;
247  return false;
248  }
ParticleList const & getParticles() const
Definition: G4INCLStore.hh:231
UnorderedVector< Particle * > ParticleList
ParticleList::const_iterator ParticleIter
G4bool G4INCL::Nucleus::decayInsideDeltas ( )

Force the decay of deltas inside the nucleus.

Returns
true if any delta was forced to decay.

Definition at line 361 of file G4INCLNucleus.cc.

References applyFinalState(), G4INCL::ClusterDecay::decay(), emitInsidePions(), G4INCL::Store::getParticles(), G4INCL::FinalState::getValidity(), G4INCL::NuclearPotential::INuclearPotential::hasPionPotential(), INCL_DEBUG, INCL_WARN, G4INCL::Particle::theA, G4INCL::Particle::theZ, and G4INCL::ValidFS.

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

References G4INCL::Store::addToOutgoing(), G4INCL::ClusterDecay::decay(), G4INCL::Particle::theA, and G4INCL::Particle::theZ.

440  {
441  // Do the phase-space decay only if Z=0 or Z=A
442  if(theA<=1 || (theZ!=0 && theA!=theZ))
443  return false;
444 
445  ParticleList decayProducts = ClusterDecay::decay(this);
446  for(ParticleIter j=decayProducts.begin(), e=decayProducts.end(); j!=e; ++j)
447  theStore->addToOutgoing(*j);
448 
449  return true;
450  }
UnorderedVector< Particle * > ParticleList
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:168
ParticleList::const_iterator ParticleIter
G4bool G4INCL::Nucleus::decayOutgoingClusters ( )

Force the decay of unstable outgoing clusters.

Returns
true if any cluster was forced to decay.

Definition at line 417 of file G4INCLNucleus.cc.

References G4INCL::Store::addToOutgoing(), G4INCL::ClusterDecay::decay(), G4INCL::Cluster::deleteParticles(), and G4INCL::Store::getOutgoingParticles().

417  {
418  ParticleList const &out = theStore->getOutgoingParticles();
419  ParticleList clusters;
420  for(ParticleIter i=out.begin(), e=out.end(); i!=e; ++i) {
421  if((*i)->isCluster()) clusters.push_back((*i));
422  }
423  if(clusters.empty()) return false;
424 
425  for(ParticleIter i=clusters.begin(), e=clusters.end(); i!=e; ++i) {
426  Cluster *cluster = dynamic_cast<Cluster*>(*i); // Can't avoid using a cast here
427 // assert(cluster);
428 #ifdef INCLXX_IN_GEANT4_MODE
429  if(!cluster)
430  continue;
431 #endif
432  cluster->deleteParticles(); // Don't need them
433  ParticleList decayProducts = ClusterDecay::decay(cluster);
434  for(ParticleIter j=decayProducts.begin(), end=decayProducts.end(); j!=end; ++j)
435  theStore->addToOutgoing(*j);
436  }
437  return true;
438  }
UnorderedVector< Particle * > ParticleList
ParticleList decay(Cluster *const c)
Carries out a cluster decay.
ParticleList const & getOutgoingParticles() const
Definition: G4INCLStore.hh:201
void addToOutgoing(Particle *p)
add the particle to the outgoing particle list.
Definition: G4INCLStore.hh:168
ParticleList::const_iterator ParticleIter
Cluster(const G4int Z, const G4int A, const G4bool createParticleSampler=true)
Standard Cluster constructor.
G4bool G4INCL::Nucleus::decayOutgoingDeltas ( )

Force the decay of outgoing deltas.

Returns
true if any delta was forced to decay.

Definition at line 308 of file G4INCLNucleus.cc.

References G4INCL::Store::addToOutgoing(), G4INCL::Particle::adjustEnergyFromMomentum(), G4INCL::Particle::boost(), G4INCL::ClusterDecay::decay(), G4INCL::Store::getBook(), G4INCL::FinalState::getCreatedParticles(), G4INCL::Book::getCurrentTime(), G4INCL::IAvatar::getFinalState(), G4INCL::FinalState::getModifiedParticles(), G4INCL::Particle::getMomentum(), G4INCL::Store::getOutgoingParticles(), G4INCL::Particle::getTableMass(), INCL_DEBUG, G4INCL::ThreeVector::mag(), G4INCL::KinematicsUtils::momentumInCM(), G4InuclParticleNames::nucleon(), G4InuclParticleNames::pion(), G4INCL::Particle::setEmissionTime(), G4INCL::Particle::setMomentum(), and G4INCL::Particle::setTableMass().

308  {
309  ParticleList const &out = theStore->getOutgoingParticles();
310  ParticleList deltas;
311  for(ParticleIter i=out.begin(), e=out.end(); i!=e; ++i) {
312  if((*i)->isDelta()) deltas.push_back((*i));
313  }
314  if(deltas.empty()) return false;
315 
316  for(ParticleIter i=deltas.begin(), e=deltas.end(); i!=e; ++i) {
317  INCL_DEBUG("Decay outgoing delta particle:" << std::endl
318  << (*i)->print() << std::endl);
319  const ThreeVector beta = -(*i)->boostVector();
320  const G4double deltaMass = (*i)->getMass();
321 
322  // Set the delta momentum to zero and sample the decay in the CM frame.
323  // This makes life simpler if we are using real particle masses.
324  (*i)->setMomentum(ThreeVector());
325  (*i)->setEnergy((*i)->getMass());
326 
327  // Use a DecayAvatar
328  IAvatar *decay = new DecayAvatar((*i), 0.0, NULL);
329  FinalState *fs = decay->getFinalState();
330  Particle * const pion = fs->getCreatedParticles().front();
331  Particle * const nucleon = fs->getModifiedParticles().front();
332 
333  // Adjust the decay momentum if we are using the real masses
334  const G4double decayMomentum = KinematicsUtils::momentumInCM(deltaMass,
335  nucleon->getTableMass(),
336  pion->getTableMass());
337  ThreeVector newMomentum = pion->getMomentum();
338  newMomentum *= decayMomentum / newMomentum.mag();
339 
340  pion->setTableMass();
341  pion->setMomentum(newMomentum);
342  pion->adjustEnergyFromMomentum();
343  pion->setEmissionTime(theStore->getBook().getCurrentTime());
344  pion->boost(beta);
345 
346  nucleon->setTableMass();
347  nucleon->setMomentum(-newMomentum);
348  nucleon->adjustEnergyFromMomentum();
349  nucleon->setEmissionTime(theStore->getBook().getCurrentTime());
350  nucleon->boost(beta);
351 
352  theStore->addToOutgoing(pion);
353 
354  delete fs;
355  delete decay;
356  }
357 
358  return true;
359  }
G4bool pion(G4int ityp)
G4double momentumInCM(Particle const *const p1, Particle const *const p2)
gives the momentum in the CM frame of two particles.
UnorderedVector< Particle * > ParticleList
ParticleList decay(Cluster *const c)
Carries out a cluster decay.
ParticleList const & getOutgoingParticles() const
Definition: G4INCLStore.hh:201
Book & getBook()
Definition: G4INCLStore.hh:237
G4bool nucleon(G4int ityp)
G4double getCurrentTime()
Definition: G4INCLBook.hh:97
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:168
ParticleList::const_iterator ParticleIter
void G4INCL::Nucleus::deleteProjectileRemnant ( )
inline

Delete the projectile remnant.

Definition at line 361 of file G4INCLNucleus.hh.

Referenced by ~Nucleus().

361  {
362  delete theProjectileRemnant;
363  theProjectileRemnant = NULL;
364  }
void G4INCL::Nucleus::emitInsidePions ( )

Force emission of all pions inside the nucleus.

Definition at line 452 of file G4INCLNucleus.cc.

References G4INCL::Store::addToOutgoing(), G4INCL::Particle::adjustMomentumFromEnergy(), G4INCL::Store::getBook(), G4INCL::Book::getCurrentTime(), G4INCL::Particle::getEmissionQValueCorrection(), G4INCL::Particle::getKineticEnergy(), G4INCL::Particle::getMass(), G4INCL::Store::getParticles(), G4INCL::Particle::getPotentialEnergy(), G4INCL::Particle::getZ(), INCL_DEBUG, INCL_WARN, G4INCL::Store::particleHasBeenEjected(), G4INCL::Particle::print(), G4INCL::Particle::setEmissionTime(), G4INCL::Particle::setEnergy(), G4INCL::Particle::setPotentialEnergy(), G4INCL::Particle::setTableMass(), G4INCL::Particle::theA, and G4INCL::Particle::theZ.

Referenced by computeRecoilKinematics(), and decayInsideDeltas().

452  {
453  /* Forcing emissions of all pions in the nucleus. This probably violates
454  * energy conservation (although the computation of the recoil kinematics
455  * might sweep this under the carpet).
456  */
457  INCL_WARN("Forcing emissions of all pions in the nucleus." << std::endl);
458 
459  // Emit the pions with this kinetic energy
460  const G4double tinyPionEnergy = 0.1; // MeV
461 
462  // Push out the emitted pions
463  ParticleList const &inside = theStore->getParticles();
464  ParticleList toEject;
465  for(ParticleIter i=inside.begin(), e=inside.end(); i!=e; ++i) {
466  if((*i)->isPion()) {
467  Particle * const thePion = *i;
468  INCL_DEBUG("Forcing emission of the following particle: "
469  << thePion->print() << std::endl);
470  thePion->setEmissionTime(theStore->getBook().getCurrentTime());
471  // Correction for real masses
472  const G4double theQValueCorrection = thePion->getEmissionQValueCorrection(theA,theZ);
473  const G4double kineticEnergyOutside = thePion->getKineticEnergy() - thePion->getPotentialEnergy() + theQValueCorrection;
474  thePion->setTableMass();
475  if(kineticEnergyOutside > 0.0)
476  thePion->setEnergy(thePion->getMass()+kineticEnergyOutside);
477  else
478  thePion->setEnergy(thePion->getMass()+tinyPionEnergy);
479  thePion->adjustMomentumFromEnergy();
480  thePion->setPotentialEnergy(0.);
481  theZ -= thePion->getZ();
482  toEject.push_back(thePion);
483  }
484  }
485  for(ParticleIter i=toEject.begin(), e=toEject.end(); i!=e; ++i) {
486  theStore->particleHasBeenEjected(*i);
487  theStore->addToOutgoing(*i);
488  }
489  }
ParticleList const & getParticles() const
Definition: G4INCLStore.hh:231
#define INCL_WARN(x)
UnorderedVector< Particle * > ParticleList
Book & getBook()
Definition: G4INCLStore.hh:237
G4double getCurrentTime()
Definition: G4INCLBook.hh:97
void particleHasBeenEjected(Particle *const)
Definition: G4INCLStore.cc:231
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:168
ParticleList::const_iterator ParticleIter
void G4INCL::Nucleus::fillEventInfo ( EventInfo eventInfo)

Fill the event info which contains INCL output data

Definition at line 662 of file G4INCLNucleus.cc.

References G4INCL::EventInfo::A, G4INCL::EventInfo::ARem, G4INCL::CollisionAvatarType, G4INCL::DecayAvatarType, G4INCL::EventInfo::EKin, G4INCL::EventInfo::EKinRem, G4INCL::EventInfo::emissionTime, G4INCL::EventInfo::EStarRem, G4INCL::EventInfo::firstCollisionIsElastic, G4INCL::EventInfo::firstCollisionSpectatorMomentum, G4INCL::EventInfo::firstCollisionSpectatorPosition, G4INCL::EventInfo::firstCollisionTime, G4INCL::EventInfo::firstCollisionXSec, G4INCL::EventInfo::forcedCompoundNucleus, G4INCL::Particle::getA(), G4INCL::Book::getAcceptedCollisions(), G4INCL::Book::getAcceptedDecays(), G4INCL::Book::getAvatars(), G4INCL::Book::getBlockedCollisions(), G4INCL::Book::getBlockedDecays(), G4INCL::Store::getBook(), G4INCL::Book::getEnergyViolationInteraction(), G4INCL::Cluster::getExcitationEnergy(), getExcitationEnergy(), G4INCL::Book::getFirstCollisionIsElastic(), G4INCL::Book::getFirstCollisionSpectatorMomentum(), G4INCL::Book::getFirstCollisionSpectatorPosition(), G4INCL::Book::getFirstCollisionTime(), G4INCL::Book::getFirstCollisionXSec(), G4INCL::Particle::getKineticEnergy(), G4INCL::Particle::getMomentum(), G4INCL::Store::getOutgoingParticles(), G4INCL::Cluster::getSpin(), getStore(), G4INCL::ThreeVector::getX(), G4INCL::ThreeVector::getY(), G4INCL::ThreeVector::getZ(), G4INCL::Particle::getZ(), hasRemnant(), G4INCL::PhysicalConstants::hc, G4INCL::EventInfo::history, INCL_WARN, G4INCL::EventInfo::JRem, G4INCL::EventInfo::jxRem, G4INCL::EventInfo::jyRem, G4INCL::EventInfo::jzRem, G4INCL::ThreeVector::mag(), G4INCL::EventInfo::nBlockedCollisions, G4INCL::EventInfo::nBlockedDecays, G4INCL::EventInfo::nCascadeParticles, G4INCL::EventInfo::nCollisionAvatars, G4INCL::EventInfo::nCollisions, G4INCL::EventInfo::nDecayAvatars, G4INCL::EventInfo::nDecays, G4INCL::EventInfo::nEnergyViolationInteraction, G4INCL::Neutron, G4INCL::EventInfo::nParticles, G4INCL::EventInfo::nReflectionAvatars, G4INCL::EventInfo::nRemnants, G4INCL::EventInfo::nucleonAbsorption, G4INCL::EventInfo::origin, G4INCL::ThreeVector::phi(), G4INCL::EventInfo::phi, G4INCL::EventInfo::phiRem, G4INCL::PiMinus, G4INCL::EventInfo::pionAbsorption, G4INCL::PiPlus, G4INCL::PiZero, G4INCL::EventInfo::projectileType, G4INCL::Proton, G4INCL::EventInfo::px, G4INCL::EventInfo::pxRem, G4INCL::EventInfo::py, G4INCL::EventInfo::pyRem, G4INCL::EventInfo::pz, G4INCL::EventInfo::pzRem, G4INCL::SurfaceAvatarType, G4INCL::ThreeVector::theta(), G4INCL::EventInfo::theta, G4INCL::EventInfo::thetaRem, G4INCL::Math::toDegrees(), G4INCL::EventInfo::Z, and G4INCL::EventInfo::ZRem.

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

References G4INCL::Particle::getA(), G4INCL::Particle::getInvariantMass(), G4INCL::ParticleTable::getTableMass, G4INCL::Particle::getZ(), G4INCL::Particle::setEmissionTime(), G4INCL::Cluster::setExcitationEnergy(), G4INCL::Particle::setMass(), and G4INCL::Cluster::setSpin().

846  {
847  // Deal with the projectile remnant
848  const G4int prA = theProjectileRemnant->getA();
849  if(prA>=1) {
850  // Set the mass
851  const G4double aMass = theProjectileRemnant->getInvariantMass();
852  theProjectileRemnant->setMass(aMass);
853 
854  // Compute the excitation energy from the invariant mass
855  const G4double anExcitationEnergy = aMass
856  - ParticleTable::getTableMass(prA, theProjectileRemnant->getZ());
857 
858  // Set the excitation energy
859  theProjectileRemnant->setExcitationEnergy(anExcitationEnergy);
860 
861  // No spin!
862  theProjectileRemnant->setSpin(ThreeVector());
863 
864  // Set the emission time
865  theProjectileRemnant->setEmissionTime(anEmissionTime);
866  }
867  }
G4int getA() const
Returns the baryon number.
void setMass(G4double mass)
void setEmissionTime(G4double t)
int G4int
Definition: G4Types.hh:78
G4double getInvariantMass() const
Get the the particle invariant mass.
G4int getZ() const
Returns the charge number.
G4ThreadLocal NuclearMassFn getTableMass
Static pointer to the mass function for nuclei.
double G4double
Definition: G4Types.hh:76
void setExcitationEnergy(const G4double e)
Set the excitation energy of the cluster.
void setSpin(const ThreeVector &j)
Set the spin of the nucleus.
Particle* G4INCL::Nucleus::getBlockedDelta ( ) const
inline

Get the delta that could not decay.

Definition at line 112 of file G4INCLNucleus.hh.

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

112 { return blockedDelta; }
Nucleus::ConservationBalance G4INCL::Nucleus::getConservationBalance ( EventInfo const &  theEventInfo,
const G4bool  afterRecoil 
) const

Compute charge, mass, energy and momentum balance.

Definition at line 794 of file G4INCLNucleus.cc.

References G4INCL::Nucleus::ConservationBalance::A, G4INCL::EventInfo::Ap, G4INCL::EventInfo::At, G4INCL::Nucleus::ConservationBalance::energy, G4INCL::Particle::getA(), G4INCL::Cluster::getExcitationEnergy(), getExcitationEnergy(), getIncomingMomentum(), getInitialEnergy(), G4INCL::Particle::getKineticEnergy(), G4INCL::Particle::getMomentum(), G4INCL::Store::getOutgoingParticles(), G4INCL::ParticleTable::getTableMass, G4INCL::Particle::getZ(), hasRemnant(), G4INCL::Nucleus::ConservationBalance::momentum, G4INCL::Nucleus::ConservationBalance::Z, G4INCL::EventInfo::Zp, and G4INCL::EventInfo::Zt.

794  {
795  ConservationBalance theBalance;
796  // Initialise balance variables with the incoming values
797  theBalance.Z = theEventInfo.Zp + theEventInfo.Zt;
798  theBalance.A = theEventInfo.Ap + theEventInfo.At;
799 
800  theBalance.energy = getInitialEnergy();
801  theBalance.momentum = getIncomingMomentum();
802 
803  // Process outgoing particles
804  ParticleList const &outgoingParticles = theStore->getOutgoingParticles();
805  for(ParticleIter i=outgoingParticles.begin(), e=outgoingParticles.end(); i!=e; ++i ) {
806  theBalance.Z -= (*i)->getZ();
807  theBalance.A -= (*i)->getA();
808  // For outgoing clusters, the total energy automatically includes the
809  // excitation energy
810  theBalance.energy -= (*i)->getEnergy(); // Note that outgoing particles should have the real mass
811  theBalance.momentum -= (*i)->getMomentum();
812  }
813 
814  // Projectile-like remnant contribution, if present
815  if(theProjectileRemnant && theProjectileRemnant->getA()>0) {
816  theBalance.Z -= theProjectileRemnant->getZ();
817  theBalance.A -= theProjectileRemnant->getA();
818  theBalance.energy -= ParticleTable::getTableMass(theProjectileRemnant->getA(),theProjectileRemnant->getZ()) +
819  theProjectileRemnant->getExcitationEnergy();
820  theBalance.energy -= theProjectileRemnant->getKineticEnergy();
821  theBalance.momentum -= theProjectileRemnant->getMomentum();
822  }
823 
824  // Target-like remnant contribution, if present
825  if(hasRemnant()) {
826  theBalance.Z -= getZ();
827  theBalance.A -= getA();
828  theBalance.energy -= ParticleTable::getTableMass(getA(),getZ()) +
830  if(afterRecoil)
831  theBalance.energy -= getKineticEnergy();
832  theBalance.momentum -= getMomentum();
833  }
834 
835  return theBalance;
836  }
G4int getA() const
Returns the baryon number.
const ThreeVector & getIncomingMomentum() const
Get the incoming momentum vector.
const G4INCL::ThreeVector & getMomentum() const
G4bool hasRemnant() const
Does the nucleus give a cascade remnant?
G4double getInitialEnergy() const
Get the initial energy.
UnorderedVector< Particle * > ParticleList
ParticleList const & getOutgoingParticles() const
Definition: G4INCLStore.hh:201
G4int getZ() const
Returns the charge number.
G4double getExcitationEnergy() const
Get the excitation energy of the nucleus.
G4ThreadLocal NuclearMassFn getTableMass
Static pointer to the mass function for nuclei.
G4double getExcitationEnergy() const
Get the excitation energy of the cluster.
G4double getKineticEnergy() const
Get the particle kinetic energy.
ParticleList::const_iterator ParticleIter
ParticleList const& G4INCL::Nucleus::getCreatedParticles ( ) const
inline

Get the list of particles that were created by the last applied final state

Definition at line 104 of file G4INCLNucleus.hh.

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

104 { return justCreated; }
NuclearDensity const* G4INCL::Nucleus::getDensity ( ) const
inline

Getter for theDensity.

Definition at line 389 of file G4INCLNucleus.hh.

Referenced by G4INCL::CoulombNonRelativistic::distortOut(), G4INCL::ClusteringModelIntercomparison::getCluster(), and G4INCL::KinematicsUtils::getLocalEnergy().

389 { return theDensity; };
G4double G4INCL::Nucleus::getExcitationEnergy ( ) const
inline

Get the excitation energy of the nucleus.

Method computeRecoilKinematics() should be called first.

Definition at line 240 of file G4INCLNucleus.hh.

References G4INCL::Cluster::theExcitationEnergy.

Referenced by fillEventInfo(), and getConservationBalance().

240 { return theExcitationEnergy; }
G4double theExcitationEnergy
const ThreeVector& G4INCL::Nucleus::getIncomingAngularMomentum ( ) const
inline

Get the incoming angular-momentum vector.

Definition at line 218 of file G4INCLNucleus.hh.

218 { return incomingAngularMomentum; }
const ThreeVector& G4INCL::Nucleus::getIncomingMomentum ( ) const
inline

Get the incoming momentum vector.

Definition at line 226 of file G4INCLNucleus.hh.

Referenced by getConservationBalance().

226  {
227  return incomingMomentum;
228  }
G4int G4INCL::Nucleus::getInitialA ( ) const
inline

Definition at line 98 of file G4INCLNucleus.hh.

Referenced by G4INCL::PauliGlobal::isBlocked().

98 { return theInitialA; };
G4double G4INCL::Nucleus::getInitialEnergy ( ) const
inline

Get the initial energy.

Definition at line 234 of file G4INCLNucleus.hh.

Referenced by getConservationBalance().

234 { return initialEnergy; }
G4double G4INCL::Nucleus::getInitialInternalEnergy ( ) const
inline

Definition at line 261 of file G4INCLNucleus.hh.

Referenced by G4INCL::CDPP::isBlocked().

261 { return initialInternalEnergy; };
G4int G4INCL::Nucleus::getInitialZ ( ) const
inline

Definition at line 99 of file G4INCLNucleus.hh.

Referenced by G4INCL::PauliGlobal::isBlocked().

99 { return theInitialZ; };
G4int G4INCL::Nucleus::getNumberOfEnteringNeutrons ( ) const
inline

Definition at line 122 of file G4INCLNucleus.hh.

122 { return theNnInitial; };
G4int G4INCL::Nucleus::getNumberOfEnteringProtons ( ) const
inline

Definition at line 121 of file G4INCLNucleus.hh.

121 { return theNpInitial; };
NuclearPotential::INuclearPotential const* G4INCL::Nucleus::getPotential ( ) const
inline
G4int G4INCL::Nucleus::getProjectileChargeNumber ( ) const
inline

Return the charge number of the projectile.

Definition at line 283 of file G4INCLNucleus.hh.

283 { return projectileZ; }
G4int G4INCL::Nucleus::getProjectileMassNumber ( ) const
inline

Return the mass number of the projectile.

Definition at line 286 of file G4INCLNucleus.hh.

286 { return projectileA; }
ProjectileRemnant* G4INCL::Nucleus::getProjectileRemnant ( ) const
inline

Get the projectile remnant.

Definition at line 358 of file G4INCLNucleus.hh.

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

358 { return theProjectileRemnant; }
Store* G4INCL::Nucleus::getStore ( ) const
inline
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 322 of file G4INCLNucleus.hh.

References G4INCL::NuclearPotential::INuclearPotential::getFermiMomentum(), G4INCL::NuclearDensity::getMaxRFromP(), G4INCL::Particle::getReflectionMomentum(), G4INCL::Particle::getType(), getUniverseRadius(), G4INCL::Particle::isPion(), and gammaraytel::pr.

Referenced by G4INCL::InteractionAvatar::bringParticleInside(), G4INCL::StandardPropagationModel::generateBinaryCollisionAvatar(), G4INCL::StandardPropagationModel::getReflectionTime(), and G4INCL::InteractionAvatar::postInteraction().

322  {
323  if(particle->isPion())
324  // Temporarily set RPION = RMAX
325  return getUniverseRadius();
326  //return 0.5*(theDensity->getTransmissionRadius(particle)+getUniverseRadius());
327  else {
328  const G4double pr = particle->getReflectionMomentum()/thePotential->getFermiMomentum(particle);
329  if(pr>=1.)
330  return getUniverseRadius();
331  else
332  return theDensity->getMaxRFromP(particle->getType(), pr);
333  }
334  }
G4double getFermiMomentum(const Particle *const p) const
Return the Fermi momentum for a particle.
G4double getUniverseRadius() const
Getter for theUniverseRadius.
double G4double
Definition: G4Types.hh:76
G4double getMaxRFromP(const ParticleType t, const G4double p) const
Get the maximum allowed radius for a given momentum.
G4double G4INCL::Nucleus::getTransmissionBarrier ( Particle const *const  p)
inline

Get the transmission barrier.

Definition at line 295 of file G4INCLNucleus.hh.

References G4INCL::PhysicalConstants::eSquared, G4INCL::NuclearDensity::getTransmissionRadius(), G4INCL::Particle::getZ(), and G4INCL::Particle::theZ.

Referenced by G4INCL::SurfaceAvatar::getTransmissionProbability(), and G4INCL::InteractionAvatar::postInteraction().

295  {
296  const G4double theTransmissionRadius = theDensity->getTransmissionRadius(p);
297  const G4double theParticleZ = p->getZ();
298  return PhysicalConstants::eSquared*(theZ-theParticleZ)*theParticleZ/theTransmissionRadius;
299  }
const G4double eSquared
Coulomb conversion factor [MeV*fm].
const char * p
Definition: xmltok.h:285
double G4double
Definition: G4Types.hh:76
G4double getTransmissionRadius(Particle const *const p) const
The radius used for calculating the transmission coefficient.
G4bool G4INCL::Nucleus::getTryCompoundNucleus ( )
inline

Definition at line 280 of file G4INCLNucleus.hh.

280 { return tryCN; }
G4double G4INCL::Nucleus::getUniverseRadius ( ) const
inline
ParticleList const& G4INCL::Nucleus::getUpdatedParticles ( ) const
inline

Get the list of particles that were updated by the last applied final state

Definition at line 109 of file G4INCLNucleus.hh.

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

109 { return toBeUpdated; }
G4bool G4INCL::Nucleus::hasRemnant ( ) const
inline

Does the nucleus give a cascade remnant?

To be called after computeRecoilKinematics().

Definition at line 273 of file G4INCLNucleus.hh.

Referenced by fillEventInfo(), and getConservationBalance().

273 { return remnant; }
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 119 of file G4INCLNucleus.cc.

References G4INCL::Store::add(), computeTotalEnergy(), G4INCL::Cluster::initializeParticles(), G4INCL::Cluster::particles, G4INCL::Particle::thePosition, and updatePotentialEnergy().

Referenced by G4INCL::INCL::initializeTarget().

119  {
120  // Reset the variables connected with the projectile remnant
121  delete theProjectileRemnant;
122  theProjectileRemnant = NULL;
123 
125  for(ParticleIter i=particles.begin(), e=particles.end(); i!=e; ++i) {
127  theStore->add(*i);
128  }
129  particles.clear();
130  initialInternalEnergy = computeTotalEnergy();
131  initialCenterOfMass = thePosition;
132  }
void updatePotentialEnergy(Particle *p) const
Update the particle potential energy.
void add(Particle *p)
Definition: G4INCLStore.cc:57
virtual void initializeParticles()
Initialise the NuclearDensity pointer and sample the particles.
ParticleList particles
G4INCL::ThreeVector thePosition
G4double computeTotalEnergy() const
Compute the current total energy.
ParticleList::const_iterator ParticleIter
void G4INCL::Nucleus::insertParticle ( Particle p)
inline

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

Definition at line 82 of file G4INCLNucleus.hh.

References G4INCL::Particle::getA(), G4INCL::Store::getBook(), G4INCL::ParticleTable::getIsospin(), G4INCL::Particle::getType(), G4INCL::Particle::getZ(), G4INCL::Math::heaviside(), G4INCL::Book::incrementCascading(), G4INCL::Particle::isNucleon(), G4INCL::Particle::isTargetSpectator(), G4INCL::Store::particleHasEntered(), G4INCL::Particle::theA, and G4INCL::Particle::theZ.

Referenced by applyFinalState().

82  {
83  theZ += p->getZ();
84  theA += p->getA();
85  theStore->particleHasEntered(p);
86  if(p->isNucleon()) {
87  theNpInitial += Math::heaviside(ParticleTable::getIsospin(p->getType()));
88  theNnInitial += Math::heaviside(-ParticleTable::getIsospin(p->getType()));
89  }
90  if(!p->isTargetSpectator()) theStore->getBook().incrementCascading();
91  };
G4int heaviside(G4int n)
const char * p
Definition: xmltok.h:285
Book & getBook()
Definition: G4INCLStore.hh:237
void incrementCascading()
Definition: G4INCLBook.hh:76
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:247
G4bool G4INCL::Nucleus::isEventTransparent ( ) const

Is the event transparent?

To be called at the end of the cascade.

Definition at line 491 of file G4INCLNucleus.cc.

References G4INCL::Book::getAcceptedCollisions(), G4INCL::Book::getAcceptedDecays(), G4INCL::Store::getBook(), and G4INCL::Book::getEmittedClusters().

491  {
492 
493  Book const &theBook = theStore->getBook();
494  const G4int nEventCollisions = theBook.getAcceptedCollisions();
495  const G4int nEventDecays = theBook.getAcceptedDecays();
496  const G4int nEventClusters = theBook.getEmittedClusters();
497  if(nEventCollisions==0 && nEventDecays==0 && nEventClusters==0)
498  return true;
499 
500  return false;
501 
502  }
G4int getAcceptedCollisions() const
Definition: G4INCLBook.hh:99
int G4int
Definition: G4Types.hh:78
Book & getBook()
Definition: G4INCLStore.hh:237
G4bool G4INCL::Nucleus::isNucleusNucleusCollision ( ) const
inline

Is it a nucleus-nucleus collision?

Definition at line 343 of file G4INCLNucleus.hh.

Referenced by G4INCL::SurfaceAvatar::getChannel(), and G4INCL::ParticleEntryChannel::getFinalState().

343 { return isNucleusNucleus; }
Nucleus& G4INCL::Nucleus::operator= ( const Nucleus rhs)

Dummy assignment operator to silence Coverity warning.

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

Print the nucleus info

Definition at line 288 of file G4INCLNucleus.cc.

References G4INCL::Store::getOutgoingParticles(), and G4INCL::Store::getParticles().

289  {
290  std::stringstream ss;
291  ss << "Particles in the nucleus:" << std::endl
292  << "Inside:" << std::endl;
293  G4int counter = 1;
294  ParticleList const &inside = theStore->getParticles();
295  for(ParticleIter p=inside.begin(), e=inside.end(); p!=e; ++p) {
296  ss << "index = " << counter << std::endl
297  << (*p)->print();
298  counter++;
299  }
300  ss <<"Outgoing:" << std::endl;
301  ParticleList const &outgoing = theStore->getOutgoingParticles();
302  for(ParticleIter p=outgoing.begin(), e=outgoing.end(); p!=e; ++p)
303  ss << (*p)->print();
304 
305  return ss.str();
306  }
ParticleList const & getParticles() const
Definition: G4INCLStore.hh:231
const char * p
Definition: xmltok.h:285
int G4int
Definition: G4Types.hh:78
UnorderedVector< Particle * > ParticleList
ParticleList const & getOutgoingParticles() const
Definition: G4INCLStore.hh:201
ParticleList::const_iterator ParticleIter
void G4INCL::Nucleus::propagateParticles ( G4double  step)

Propagate the particles one time step.

Parameters
steplength of the time step

Definition at line 217 of file G4INCLNucleus.cc.

References INCL_WARN.

217  {
218  INCL_WARN("Useless Nucleus::propagateParticles -method called." << std::endl);
219  }
#define INCL_WARN(x)
void G4INCL::Nucleus::setDensity ( NuclearDensity const *const  d)
inline

Setter for theDensity.

Definition at line 382 of file G4INCLNucleus.hh.

References G4INCL::ParticleSampler::setDensity(), and G4INCL::Cluster::theParticleSampler.

382  {
383  theDensity=d;
385  theParticleSampler->setDensity(theDensity);
386  };
void setDensity(NuclearDensity const *const d)
Setter for theDensity.
ParticleSampler * theParticleSampler
void G4INCL::Nucleus::setIncomingAngularMomentum ( const ThreeVector j)
inline

Set the incoming angular-momentum vector.

Definition at line 213 of file G4INCLNucleus.hh.

Referenced by G4INCL::StandardPropagationModel::shootComposite(), and G4INCL::StandardPropagationModel::shootParticle().

213  {
214  incomingAngularMomentum = j;
215  }
void G4INCL::Nucleus::setIncomingMomentum ( const ThreeVector p)
inline

Set the incoming momentum vector.

Definition at line 221 of file G4INCLNucleus.hh.

Referenced by G4INCL::StandardPropagationModel::shootComposite(), and G4INCL::StandardPropagationModel::shootParticle().

221  {
222  incomingMomentum = p;
223  }
const char * p
Definition: xmltok.h:285
void G4INCL::Nucleus::setInitialEnergy ( const G4double  e)
inline

Set the initial energy.

Definition at line 231 of file G4INCLNucleus.hh.

Referenced by G4INCL::StandardPropagationModel::shootComposite(), and G4INCL::StandardPropagationModel::shootParticle().

231 { initialEnergy = e; }
void G4INCL::Nucleus::setNucleusNucleusCollision ( )
inline

Set a nucleus-nucleus collision.

Definition at line 346 of file G4INCLNucleus.hh.

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

346 { isNucleusNucleus=true; }
void G4INCL::Nucleus::setParticleNucleusCollision ( )
inline

Set a particle-nucleus collision.

Definition at line 349 of file G4INCLNucleus.hh.

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

349 { isNucleusNucleus=false; }
void G4INCL::Nucleus::setProjectileChargeNumber ( G4int  n)
inline

Set the charge number of the projectile.

Definition at line 289 of file G4INCLNucleus.hh.

References n.

Referenced by G4INCL::StandardPropagationModel::shootComposite(), and G4INCL::StandardPropagationModel::shootParticle().

289 { projectileZ=n; }
const G4int n
void G4INCL::Nucleus::setProjectileMassNumber ( G4int  n)
inline

Set the mass number of the projectile.

Definition at line 292 of file G4INCLNucleus.hh.

References n.

Referenced by G4INCL::StandardPropagationModel::shootComposite(), and G4INCL::StandardPropagationModel::shootParticle().

292 { projectileA=n; }
const G4int n
void G4INCL::Nucleus::setProjectileRemnant ( ProjectileRemnant *const  c)
inline

Set the projectile remnant.

Definition at line 352 of file G4INCLNucleus.hh.

References test::c.

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

352  {
353  delete theProjectileRemnant;
354  theProjectileRemnant = c;
355  }
void G4INCL::Nucleus::setStore ( Store s)
inline

Definition at line 256 of file G4INCLNucleus.hh.

256  {
257  delete theStore;
258  theStore = s;
259  };
const XML_Char * s
void G4INCL::Nucleus::setUniverseRadius ( const G4double  universeRadius)
inline

Setter for theUniverseRadius.

Definition at line 340 of file G4INCLNucleus.hh.

340 { theUniverseRadius=universeRadius; }
void G4INCL::Nucleus::updatePotentialEnergy ( Particle p) const
inline

Update the particle potential energy.

Definition at line 377 of file G4INCLNucleus.hh.

References G4INCL::NuclearPotential::INuclearPotential::computePotentialEnergy(), and G4INCL::Particle::setPotentialEnergy().

Referenced by G4INCL::PionNucleonChannel::getFinalState(), G4INCL::ReflectionChannel::getFinalState(), and initializeParticles().

377  {
378  p->setPotentialEnergy(thePotential->computePotentialEnergy(p));
379  }
const char * p
Definition: xmltok.h:285
virtual G4double computePotentialEnergy(const Particle *const p) const =0
void G4INCL::Nucleus::useFusionKinematics ( )

Adjust the kinematics for complete-fusion events.

Definition at line 838 of file G4INCLNucleus.cc.

References G4INCL::Cluster::getTableMass(), G4INCL::ThreeVector::mag2(), G4INCL::Particle::setEnergy(), G4INCL::Particle::setMass(), G4INCL::Particle::setMomentum(), G4INCL::Cluster::setSpin(), G4INCL::Particle::theEnergy, G4INCL::Cluster::theExcitationEnergy, and G4INCL::Particle::theMomentum.

838  {
839  setEnergy(initialEnergy);
840  setMomentum(incomingMomentum);
841  setSpin(incomingAngularMomentum);
844  }
void setMass(G4double mass)
virtual G4double getTableMass() const
Get the real particle mass.
G4double mag2() const
void setEnergy(G4double energy)
G4double theExcitationEnergy
G4INCL::ThreeVector theMomentum
void setSpin(const ThreeVector &j)
Set the spin of the nucleus.
virtual void setMomentum(const G4INCL::ThreeVector &momentum)

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