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

#include <G4INCLNucleus.hh>

+ Inheritance 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 ()
 
void initializeParticles ()
 
void insertParticle (Particle *p)
 Insert a new particle (e.g. a projectile) in the nucleus.
 
void applyFinalState (FinalState *)
 
G4int getInitialA () const
 
G4int getInitialZ () const
 
ParticleList constgetCreatedParticles () const
 
ParticleList constgetUpdatedParticles () const
 
ParticlegetBlockedDelta () const
 Get the delta that could not decay.
 
void propagateParticles (G4double step)
 
G4int getNumberOfEnteringProtons () const
 
G4int getNumberOfEnteringNeutrons () const
 
G4double computeSeparationEnergyBalance () const
 Outgoing - incoming separation energies.
 
G4bool decayOutgoingDeltas ()
 Force the decay of outgoing deltas.
 
G4bool decayInsideDeltas ()
 Force the decay of deltas inside the nucleus.
 
G4bool decayOutgoingClusters ()
 Force the decay of unstable outgoing clusters.
 
G4bool decayMe ()
 Force the phase-space decay of the Nucleus.
 
void emitInsidePions ()
 Force emission of all pions inside the nucleus.
 
void computeRecoilKinematics ()
 Compute the recoil momentum and spin of the nucleus.
 
ThreeVector computeCenterOfMass () const
 Compute the current center-of-mass position.
 
G4double computeTotalEnergy () const
 Compute the current total energy.
 
G4double computeExcitationEnergy () const
 Compute the current excitation energy.
 
void setIncomingAngularMomentum (const ThreeVector &j)
 Set the incoming angular-momentum vector.
 
const ThreeVectorgetIncomingAngularMomentum () const
 Get the incoming angular-momentum vector.
 
void setIncomingMomentum (const ThreeVector &p)
 Set the incoming momentum vector.
 
const ThreeVectorgetIncomingMomentum () const
 Get the incoming momentum vector.
 
void setInitialEnergy (const G4double e)
 Set the initial energy.
 
G4double getInitialEnergy () const
 Get the initial energy.
 
G4double getExcitationEnergy () const
 Get the excitation energy of the nucleus.
 
G4bool containsDeltas ()
 Returns true if the nucleus contains any deltas.
 
std::string print ()
 
std::string dump ()
 
StoregetStore () const
 
void setStore (Store *s)
 
G4double getInitialInternalEnergy () const
 
G4bool isEventTransparent () const
 Is the event transparent?
 
G4bool hasRemnant () const
 Does the nucleus give a cascade remnant?
 
void fillEventInfo (EventInfo *eventInfo)
 
G4bool getTryCompoundNucleus ()
 
G4int getProjectileChargeNumber () const
 Return the charge number of the projectile.
 
G4int getProjectileMassNumber () const
 Return the mass number of the projectile.
 
void setProjectileChargeNumber (G4int n)
 Set the charge number of the projectile.
 
void setProjectileMassNumber (G4int n)
 Set the mass number of the projectile.
 
G4bool isForcedTransparent ()
 Returns true if a transparent event should be forced.
 
G4double getTransmissionBarrier (Particle const *const p)
 Get the transmission barrier.
 
ConservationBalance getConservationBalance (EventInfo const &theEventInfo, const G4bool afterRecoil) const
 Compute charge, mass, energy and momentum balance.
 
void useFusionKinematics ()
 Adjust the kinematics for complete-fusion events.
 
G4double getSurfaceRadius (Particle const *const particle) const
 Get the maximum allowed radius for a given particle.
 
G4double getCoulombRadius (ParticleSpecies const &p) const
 Get the Coulomb radius for a given particle.
 
G4double getUniverseRadius () const
 Getter for theUniverseRadius.
 
void setUniverseRadius (const G4double universeRadius)
 Setter for theUniverseRadius.
 
G4bool isNucleusNucleusCollision () const
 Is it a nucleus-nucleus collision?
 
void setNucleusNucleusCollision ()
 Set a nucleus-nucleus collision.
 
void setParticleNucleusCollision ()
 Set a particle-nucleus collision.
 
void setProjectileRemnant (ProjectileRemnant *const c)
 Set the projectile remnant.
 
ProjectileRemnantgetProjectileRemnant () const
 Get the projectile remnant.
 
void deleteProjectileRemnant ()
 Delete the projectile remnant.
 
void moveProjectileRemnantComponentsToOutgoing ()
 Move the components of the projectile remnant to the outgoing list.
 
void finalizeProjectileRemnant (const G4double emissionTime)
 Finalise the projectile remnant.
 
void updatePotentialEnergy (Particle *p)
 Update the particle potential energy.
 
NuclearDensitygetDensity () const
 Getter for theDensity.
 
NuclearPotential::INuclearPotentialgetPotential () const
 Getter for thePotential.
 
- Public Member Functions inherited from G4INCL::Cluster
 Cluster (const G4int Z, const G4int A, const G4bool createParticleSampler=true)
 Standard Cluster constructor.
 
template<class Iterator >
 Cluster (Iterator begin, Iterator end)
 
virtual ~Cluster ()
 
 Cluster (const Cluster &rhs)
 Copy constructor.
 
Clusteroperator= (const Cluster &rhs)
 Assignment operator.
 
void swap (Cluster &rhs)
 Helper method for the assignment operator.
 
ParticleSpecies getSpecies () const
 Get the particle species.
 
void deleteParticles ()
 
void clearParticles ()
 
void setZ (const G4int Z)
 Set the charge number of the cluster.
 
void setA (const G4int A)
 Set the mass number of the cluster.
 
G4double getExcitationEnergy () const
 Get the excitation energy of the cluster.
 
void setExcitationEnergy (const G4double e)
 Set the excitation energy of the cluster.
 
virtual G4double getTableMass () const
 Get the real particle mass.
 
ParticleList constgetParticles () const
 
void removeParticle (Particle *const p)
 Remove a particle from the cluster components.
 
void addParticle (Particle *const p)
 
void addParticles (ParticleList const &pL)
 Add a list of particles to the cluster.
 
ParticleList getParticleList () const
 Returns the list of particles that make up the cluster.
 
std::string print () const
 
virtual void initializeParticles ()
 Initialise the NuclearDensity pointer and sample the particles.
 
void internalBoostToCM ()
 Boost to the CM of the component particles.
 
void putParticlesOffShell ()
 Put the cluster components off shell.
 
void setPosition (const ThreeVector &position)
 Set the position of the cluster.
 
void boost (const ThreeVector &aBoostVector)
 Boost the cluster with the indicated velocity.
 
void freezeInternalMotion ()
 Freeze the internal motion of the particles.
 
virtual void rotate (const G4double angle, const ThreeVector &axis)
 Rotate position and momentum of all the particles.
 
virtual void makeProjectileSpectator ()
 Make all the components projectile spectators, too.
 
virtual void makeTargetSpectator ()
 Make all the components target spectators, too.
 
virtual void makeParticipant ()
 Make all the components participants, too.
 
ThreeVector constgetSpin () const
 Get the spin of the nucleus.
 
void setSpin (const ThreeVector &j)
 Set the spin of the nucleus.
 
G4INCL::ThreeVector getAngularMomentum () const
 Get the total angular momentum (orbital + spin)
 
- Public Member Functions inherited from G4INCL::Particle
 Particle ()
 
 Particle (ParticleType t, G4double energy, ThreeVector momentum, ThreeVector position)
 
 Particle (ParticleType t, ThreeVector momentum, ThreeVector position)
 
virtual ~Particle ()
 
 Particle (const Particle &rhs)
 Copy constructor.
 
Particleoperator= (const Particle &rhs)
 Assignment operator.
 
G4INCL::ParticleType getType () const
 
virtual G4INCL::ParticleSpecies getSpecies () const
 Get the particle species.
 
void setType (ParticleType t)
 
G4bool isNucleon () const
 
ParticipantType getParticipantType () const
 
void setParticipantType (ParticipantType const p)
 
G4bool isParticipant () const
 
G4bool isTargetSpectator () const
 
G4bool isProjectileSpectator () const
 
virtual void makeParticipant ()
 
virtual void makeTargetSpectator ()
 
virtual void makeProjectileSpectator ()
 
G4bool isPion () const
 Is this a pion?
 
G4bool isResonance () const
 Is it a resonance?
 
G4bool isDelta () const
 Is it a Delta?
 
G4int getA () const
 Returns the baryon number.
 
G4int getZ () const
 Returns the charge number.
 
G4double getBeta () const
 
ThreeVector boostVector () const
 
void boost (const ThreeVector &aBoostVector)
 
void lorentzContract (const ThreeVector &aBoostVector, const ThreeVector &refPos)
 Lorentz-contract the particle position around some center.
 
G4double getMass () const
 Get the cached particle mass.
 
G4double getINCLMass () const
 Get the INCL particle mass.
 
virtual G4double getTableMass () const
 Get the tabulated particle mass.
 
G4double getRealMass () const
 Get the real particle mass.
 
void setRealMass ()
 Set the mass of the Particle to its real mass.
 
void setTableMass ()
 Set the mass of the Particle to its table mass.
 
void setINCLMass ()
 Set the mass of the Particle to its table mass.
 
G4double getEmissionQValueCorrection (const G4int AParent, const G4int ZParent) const
 Computes correction on the emission Q-value.
 
G4double getTransferQValueCorrection (const G4int AFrom, const G4int ZFrom, const G4int ATo, const G4int ZTo) const
 Computes correction on the transfer Q-value.
 
G4double getInvariantMass () const
 Get the the particle invariant mass.
 
G4double getKineticEnergy () const
 Get the particle kinetic energy.
 
G4double getPotentialEnergy () const
 Get the particle potential energy.
 
void setPotentialEnergy (G4double v)
 Set the particle potential energy.
 
G4double getEnergy () const
 
void setMass (G4double mass)
 
void setEnergy (G4double energy)
 
const G4INCL::ThreeVectorgetMomentum () const
 
virtual G4INCL::ThreeVector getAngularMomentum () const
 
virtual void setMomentum (const G4INCL::ThreeVector &momentum)
 
const G4INCL::ThreeVectorgetPosition () const
 
virtual void setPosition (const G4INCL::ThreeVector &position)
 
G4double getHelicity ()
 
void setHelicity (G4double h)
 
void propagate (G4double step)
 
G4int getNumberOfCollisions () const
 Return the number of collisions undergone by the particle.
 
void setNumberOfCollisions (G4int n)
 Set the number of collisions undergone by the particle.
 
void incrementNumberOfCollisions ()
 Increment the number of collisions undergone by the particle.
 
G4int getNumberOfDecays () const
 Return the number of decays undergone by the particle.
 
void setNumberOfDecays (G4int n)
 Set the number of decays undergone by the particle.
 
void incrementNumberOfDecays ()
 Increment the number of decays undergone by the particle.
 
void setOutOfWell ()
 Mark the particle as out of its potential well.
 
G4bool isOutOfWell () const
 Check if the particle is out of its potential well.
 
void setEmissionTime (G4double t)
 
G4double getEmissionTime ()
 
ThreeVector getTransversePosition () const
 Transverse component of the position w.r.t. the momentum.
 
ThreeVector getLongitudinalPosition () const
 Longitudinal component of the position w.r.t. the momentum.
 
const ThreeVectoradjustMomentumFromEnergy ()
 Rescale the momentum to match the total energy.
 
G4double adjustEnergyFromMomentum ()
 Recompute the energy to match the momentum.
 
G4bool isInList (ParticleList const &l) const
 Check if the particle belongs to a given list.
 
G4bool isCluster () const
 
void setFrozenMomentum (const ThreeVector &momentum)
 Set the frozen particle momentum.
 
void setFrozenEnergy (const G4double energy)
 Set the frozen particle momentum.
 
ThreeVector getFrozenMomentum () const
 Get the frozen particle momentum.
 
G4double getFrozenEnergy () const
 Get the frozen particle momentum.
 
ThreeVector getPropagationVelocity () const
 Get the propagation velocity of the particle.
 
void freezePropagation ()
 Freeze particle propagation.
 
void thawPropagation ()
 Unfreeze particle propagation.
 
virtual void rotate (const G4double angle, const ThreeVector &axis)
 Rotate the particle position and momentum.
 
std::string print () const
 
std::string dump () const
 
long getID () const
 
ParticleList constgetParticles () const
 

Additional Inherited Members

- Protected Member Functions inherited from G4INCL::Particle
void swap (Particle &rhs)
 Helper method for the assignment operator.
 
- Protected Attributes inherited from G4INCL::Cluster
ParticleList particles
 
G4double theExcitationEnergy
 
ThreeVector theSpin
 
ParticleSamplertheParticleSampler
 
- Protected Attributes inherited from G4INCL::Particle
G4int theZ
 
G4int theA
 
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
 

Detailed Description

Definition at line 66 of file G4INCLNucleus.hh.

Constructor & Destructor Documentation

◆ Nucleus()

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

Definition at line 70 of file G4INCLNucleus.cc.

71 : Cluster(charge,mass),
72 theInitialZ(charge), theInitialA(mass),
73 theNpInitial(0), theNnInitial(0),
74 initialInternalEnergy(0.),
75 incomingAngularMomentum(0.,0.,0.), incomingMomentum(0.,0.,0.),
76 initialCenterOfMass(0.,0.,0.),
77 remnant(true),
78 blockedDelta(NULL),
79 initialEnergy(0.),
80 tryCN(false),
81 forceTransparent(false),
82 projectileZ(0),
83 projectileA(0),
84 theUniverseRadius(universeRadius),
85 isNucleusNucleus(false),
86 theProjectileRemnant(NULL),
87 theDensity(NULL),
88 thePotential(NULL)
89 {
90 PotentialType potentialType;
91 G4bool pionPotential;
92 if(conf) {
93 potentialType = conf->getPotentialType();
94 pionPotential = conf->getPionPotential();
95 } else { // By default we don't use energy dependent
96 // potential. This is convenient for some tests.
97 potentialType = IsospinPotential;
98 pionPotential = true;
99 }
100 switch(potentialType) {
102 thePotential = new NuclearPotential::NuclearPotentialEnergyIsospinSmooth(theA, theZ, pionPotential);
103 break;
105 thePotential = new NuclearPotential::NuclearPotentialEnergyIsospin(theA, theZ, pionPotential);
106 break;
107 case IsospinPotential:
108 thePotential = new NuclearPotential::NuclearPotentialIsospin(theA, theZ, pionPotential);
109 break;
111 thePotential = new NuclearPotential::NuclearPotentialConstant(theA, theZ, pionPotential);
112 break;
113 default:
114 FATAL("Unrecognized potential type at Nucleus creation." << std::endl);
115 std::exit(EXIT_FAILURE);
116 break;
117 }
118
121
123
124 theParticleSampler->setPotential(thePotential);
125 theParticleSampler->setDensity(theDensity);
126
127 if(theUniverseRadius<0)
128 theUniverseRadius = theDensity->getMaximumRadius();
129 theStore = new Store(conf);
130 toBeUpdated.clear();
131 }
#define FATAL(x)
bool G4bool
Definition: G4Types.hh:67
Cluster(const G4int Z, const G4int A, const G4bool createParticleSampler=true)
Standard Cluster constructor.
ParticleSampler * theParticleSampler
static NuclearDensity * createDensity(const G4int A, const G4int Z)
G4double getMaximumRadius() const
G4double getSeparationEnergy(const Particle *const p) const
Return the separation energy for a particle.
void setPotential(NuclearPotential::INuclearPotential const *const p)
Setter for thePotential.
void setDensity(NuclearDensity const *const d)
Setter for theDensity.
static void setNeutronSeparationEnergy(const G4double s)
Setter for protonSeparationEnergy.
static void setProtonSeparationEnergy(const G4double s)
Setter for protonSeparationEnergy.
@ IsospinEnergySmoothPotential
@ IsospinEnergyPotential

◆ ~Nucleus()

G4INCL::Nucleus::~Nucleus ( )
virtual

Definition at line 133 of file G4INCLNucleus.cc.

133 {
134 delete theStore;
135 delete thePotential;
136 /* We don't delete the density here any more -- the Factory is caching them
137 delete theDensity;*/
138 }

Member Function Documentation

◆ applyFinalState()

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

Apply reaction final state information to the nucleus.

Definition at line 169 of file G4INCLNucleus.cc.

169 {
170 justCreated.clear();
171 toBeUpdated.clear(); // Clear the list of particles to be updated by the propagation model.
172 blockedDelta = NULL;
173 G4double totalEnergy = 0.0;
174
175 FinalStateValidity const validity = finalstate->getValidity();
176 if(validity == ValidFS) {
177
178 ParticleList const &created = finalstate->getCreatedParticles();
179 for(ParticleIter iter = created.begin(); iter != created.end(); ++iter) {
180 theStore->add((*iter));
181 if(!(*iter)->isOutOfWell()) {
182 totalEnergy += (*iter)->getEnergy() - (*iter)->getPotentialEnergy();
183 justCreated.push_back((*iter)); // New particle, so we must create avatars for it
184 }
185 }
186
187 ParticleList const &deleted = finalstate->getDestroyedParticles();
188 for(ParticleIter iter = deleted.begin(); iter != deleted.end(); ++iter) {
189 theStore->particleHasBeenDestroyed((*iter)->getID());
190 }
191
192 ParticleList const &modified = finalstate->getModifiedParticles();
193 for(ParticleIter iter = modified.begin(); iter != modified.end(); ++iter) {
194 theStore->particleHasBeenUpdated((*iter)->getID());
195 totalEnergy += (*iter)->getEnergy() - (*iter)->getPotentialEnergy();
196 toBeUpdated.push_back((*iter)); // Particle is modified so we have to create new avatars for it.
197 }
198
199 ParticleList const &out = finalstate->getOutgoingParticles();
200 for(ParticleIter iter = out.begin(); iter != out.end(); ++iter) {
201 if((*iter)->isCluster()) {
202 Cluster *clusterOut = dynamic_cast<Cluster*>((*iter));
203 ParticleList const components = clusterOut->getParticles();
204 for(ParticleIter in = components.begin(); in != components.end(); ++in)
205 theStore->particleHasBeenEjected((*in)->getID());
206 } else {
207 theStore->particleHasBeenEjected((*iter)->getID());
208 }
209 totalEnergy += (*iter)->getEnergy(); // No potential here because the particle is gone
210 theA -= (*iter)->getA();
211 theZ -= (*iter)->getZ();
212 theStore->addToOutgoing(*iter);
213 (*iter)->setEmissionTime(theStore->getBook()->getCurrentTime());
214 }
215
216 ParticleList const &entering = finalstate->getEnteringParticles();
217 for(ParticleIter iter = entering.begin(); iter != entering.end(); ++iter) {
218 insertParticle(*iter);
219 totalEnergy += (*iter)->getEnergy() - (*iter)->getPotentialEnergy();
220 toBeUpdated.push_back((*iter)); // Particle is modified so we have to create new avatars for it.
221 }
222 } else if(validity == PauliBlockedFS) {
223 blockedDelta = finalstate->getBlockedDelta();
224 } else if(validity == ParticleBelowFermiFS) {
225 DEBUG("A Particle is entering below the Fermi sea:" << std::endl << finalstate->print() << std::endl);
226 tryCN = true;
227 ParticleList const &entering = finalstate->getEnteringParticles();
228 for(ParticleIter iter = entering.begin(); iter != entering.end(); ++iter) {
229 insertParticle(*iter);
230 }
231 } else if(validity == ParticleBelowZeroFS) {
232 DEBUG("A Particle is entering below zero energy:" << std::endl << finalstate->print() << std::endl);
233 forceTransparent = true;
234 ParticleList const &entering = finalstate->getEnteringParticles();
235 for(ParticleIter iter = entering.begin(); iter != entering.end(); ++iter) {
236 insertParticle(*iter);
237 }
238 }
239
240 if(validity==ValidFS &&
241 std::abs(totalEnergy - finalstate->getTotalEnergyBeforeInteraction()) > 0.1) {
242 ERROR("Energy nonconservation! Energy at the beginning of the event = "
243 << finalstate->getTotalEnergyBeforeInteraction()
244 <<" and after interaction = "
245 << totalEnergy << std::endl
246 << finalstate->print());
247 }
248 }
#define DEBUG(x)
#define ERROR(x)
double G4double
Definition: G4Types.hh:64
@ deleted
Definition: G4UIGAG.hh:45
G4double getCurrentTime()
Definition: G4INCLBook.hh:83
void insertParticle(Particle *p)
Insert a new particle (e.g. a projectile) in the nucleus.
Book * getBook()
Definition: G4INCLStore.hh:243
void particleHasBeenDestroyed(long)
Definition: G4INCLStore.cc:280
void particleHasBeenEjected(long)
Definition: G4INCLStore.cc:271
void particleHasBeenUpdated(long)
Definition: G4INCLStore.cc:164
void addToOutgoing(Particle *p)
add the particle to the outgoing particle list.
Definition: G4INCLStore.hh:171
void add(Particle *p)
Definition: G4INCLStore.cc:62
@ ParticleBelowZeroFS
@ ParticleBelowFermiFS
std::list< G4INCL::Particle * > ParticleList
std::list< G4INCL::Particle * >::const_iterator ParticleIter

Referenced by decayInsideDeltas().

◆ computeCenterOfMass()

ThreeVector G4INCL::Nucleus::computeCenterOfMass ( ) const

Compute the current center-of-mass position.

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

Definition at line 298 of file G4INCLNucleus.cc.

298 {
299 ThreeVector cm(0.,0.,0.);
300 G4double totalMass = 0.0;
301 ParticleList inside = theStore->getParticles();
302 for(ParticleIter p=inside.begin(); p!=inside.end(); ++p) {
303 const G4double mass = (*p)->getMass();
304 cm += (*p)->getPosition() * mass;
305 totalMass += mass;
306 }
307 cm /= totalMass;
308 return cm;
309 }
ParticleList const & getParticles() const
Definition: G4INCLStore.hh:237

Referenced by computeRecoilKinematics().

◆ computeExcitationEnergy()

G4double G4INCL::Nucleus::computeExcitationEnergy ( ) const

Compute the current excitation energy.

Returns
the excitation energy [MeV]

Definition at line 311 of file G4INCLNucleus.cc.

311 {
312 const G4double totalEnergy = computeTotalEnergy();
313 const G4double separationEnergies = computeSeparationEnergyBalance();
314
315 return totalEnergy - initialInternalEnergy - separationEnergies;
316 }
G4double computeSeparationEnergyBalance() const
Outgoing - incoming separation energies.
G4double computeTotalEnergy() const
Compute the current total energy.

◆ computeRecoilKinematics()

void G4INCL::Nucleus::computeRecoilKinematics ( )

Compute the recoil momentum and spin of the nucleus.

Definition at line 268 of file G4INCLNucleus.cc.

268 {
269 // If the remnant consists of only one nucleon, we need to apply a special
270 // procedure to put it on mass shell.
271 if(theA==1) {
273 computeOneNucleonRecoilKinematics();
274 remnant=false;
275 return;
276 }
277
278 // Compute the recoil momentum and angular momentum
279 theMomentum = incomingMomentum;
280 theSpin = incomingAngularMomentum;
281
282 ParticleList outgoing = theStore->getOutgoingParticles();
283 for(ParticleIter p=outgoing.begin(); p!=outgoing.end(); ++p)
284 {
285 theMomentum -= (*p)->getMomentum();
286 theSpin -= (*p)->getAngularMomentum();
287 }
288
289 // Subtract orbital angular momentum
291 theSpin -= (thePosition-initialCenterOfMass).vector(theMomentum);
292
295 remnant=true;
296 }
ThreeVector theSpin
G4double theExcitationEnergy
void emitInsidePions()
Force emission of all pions inside the nucleus.
ThreeVector computeCenterOfMass() const
Compute the current center-of-mass position.
static NuclearMassFn getTableMass
Static pointer to the mass function for nuclei.
G4INCL::ThreeVector theMomentum
void setMass(G4double mass)
G4double adjustEnergyFromMomentum()
Recompute the energy to match the momentum.
G4INCL::ThreeVector thePosition
ParticleList const & getOutgoingParticles() const
Definition: G4INCLStore.hh:204

◆ computeSeparationEnergyBalance()

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

Outgoing - incoming separation energies.

Used by CDPP.

Definition at line 124 of file G4INCLNucleus.hh.

124 {
125 G4double S = 0.0;
126 ParticleList outgoing = theStore->getOutgoingParticles();
127 for(ParticleIter i = outgoing.begin(); i != outgoing.end(); ++i) {
128 const ParticleType t = (*i)->getType();
129 switch(t) {
130 case Proton:
131 case Neutron:
132 case DeltaPlusPlus:
133 case DeltaPlus:
134 case DeltaZero:
135 case DeltaMinus:
136 S += thePotential->getSeparationEnergy(*i);
137 break;
138 case Composite:
139 S += (*i)->getZ() * thePotential->getSeparationEnergy(Proton)
140 + ((*i)->getA() - (*i)->getZ()) * thePotential->getSeparationEnergy(Neutron);
141 break;
142 case PiPlus:
143 S += thePotential->getSeparationEnergy(Proton) - thePotential->getSeparationEnergy(Neutron);
144 break;
145 case PiMinus:
146 S += thePotential->getSeparationEnergy(Neutron) - thePotential->getSeparationEnergy(Proton);
147 break;
148 default:
149 break;
150 }
151 }
152
153 S -= theNpInitial * thePotential->getSeparationEnergy(Proton);
154 S -= theNnInitial * thePotential->getSeparationEnergy(Neutron);
155 return S;
156 }

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

◆ computeTotalEnergy()

G4double G4INCL::Nucleus::computeTotalEnergy ( ) const

Compute the current total energy.

Returns
the total energy [MeV]

Definition at line 254 of file G4INCLNucleus.cc.

254 {
255 G4double totalEnergy = 0.0;
256 ParticleList inside = theStore->getParticles();
257 for(ParticleIter p=inside.begin(); p!=inside.end(); ++p) {
258 if((*p)->isNucleon()) // Ugly: we should calculate everything using total energies!
259 totalEnergy += (*p)->getKineticEnergy() - (*p)->getPotentialEnergy();
260 else if((*p)->isResonance())
261 totalEnergy += (*p)->getEnergy() - (*p)->getPotentialEnergy() - ParticleTable::effectiveNucleonMass;
262 else
263 totalEnergy += (*p)->getEnergy() - (*p)->getPotentialEnergy();
264 }
265 return totalEnergy;
266 }
static const G4double effectiveNucleonMass

Referenced by computeExcitationEnergy(), and initializeParticles().

◆ containsDeltas()

G4bool G4INCL::Nucleus::containsDeltas ( )
inline

Returns true if the nucleus contains any deltas.

Definition at line 239 of file G4INCLNucleus.hh.

239 {
240 ParticleList inside = theStore->getParticles();
241 for(ParticleIter i=inside.begin(); i!=inside.end(); ++i)
242 if((*i)->isDelta()) return true;
243 return false;
244 }

◆ 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 395 of file G4INCLNucleus.cc.

395 {
396 /* If there is a pion potential, do nothing (deltas will be counted as
397 * excitation energy).
398 * If, however, the remnant is unphysical (Z<0 or Z>A), force the deltas to
399 * decay and get rid of all the pions. In case you're wondering, you can
400 * end up with Z<0 or Z>A if the remnant contains more pi- than protons or
401 * more pi+ than neutrons, respectively.
402 */
403 const G4bool unphysicalRemnant = (theZ<0 || theZ>theA);
404 if(thePotential->hasPionPotential() && !unphysicalRemnant)
405 return false;
406
407 // Build a list of deltas (avoid modifying the list you are iterating on).
408 ParticleList inside = theStore->getParticles();
409 ParticleList deltas;
410 for(ParticleIter i = inside.begin(); i != inside.end(); ++i)
411 if((*i)->isDelta()) deltas.push_back((*i));
412
413 // Loop over the deltas, make them decay
414 for(ParticleIter i = deltas.begin(); i != deltas.end(); ++i) {
415 DEBUG("Decay inside delta particle:" << std::endl
416 << (*i)->print() << std::endl);
417 // Create a forced-decay avatar. Note the last boolean parameter. Note
418 // also that if the remnant is unphysical we more or less explicitly give
419 // up energy conservation and CDPP by passing a NULL pointer for the
420 // nucleus.
421 IAvatar *decay;
422 if(unphysicalRemnant)
423 decay = new DecayAvatar((*i), 0.0, NULL, true);
424 else
425 decay = new DecayAvatar((*i), 0.0, this, true);
426 FinalState *fs = decay->getFinalState();
427
428 // The pion can be ejected only if we managed to satisfy energy
429 // conservation and if pion emission does not lead to negative excitation
430 // energies.
431 if(fs->getValidity()==ValidFS) {
432 // Apply the final state to the nucleus
433 applyFinalState(fs);
434 }
435 delete fs;
436 delete decay;
437 }
438
439 // If the remnant is unphysical, emit all the pions
440 if(unphysicalRemnant) {
441 DEBUG("Remnant is unphysical: Z=" << theZ << ", A=" << theA << std::endl);
443 }
444
445 return true;
446 }
G4bool hasPionPotential()
Do we have a pion potential?
void applyFinalState(FinalState *)

◆ 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 466 of file G4INCLNucleus.cc.

466 {
467 // Do the phase-space decay only if Z=0 or Z=A
468 if(theA<=1 || (theZ!=0 && theA!=theZ))
469 return false;
470
471 ParticleList decayProducts = ClusterDecay::decay(this);
472 for(ParticleIter j = decayProducts.begin(); j!=decayProducts.end(); ++j)
473 theStore->addToOutgoing(*j);
474
475 return true;
476 }
static ParticleList decay(Cluster *const c)
Carries out a cluster decay.

◆ decayOutgoingClusters()

G4bool G4INCL::Nucleus::decayOutgoingClusters ( )

Force the decay of unstable outgoing clusters.

Returns
true if any cluster was forced to decay.

Definition at line 448 of file G4INCLNucleus.cc.

448 {
449 ParticleList out = theStore->getOutgoingParticles();
450 ParticleList clusters;
451 for(ParticleIter i = out.begin(); i != out.end(); ++i) {
452 if((*i)->isCluster()) clusters.push_back((*i));
453 }
454 if(clusters.empty()) return false;
455
456 for(ParticleIter i = clusters.begin(); i != clusters.end(); ++i) {
457 Cluster *cluster = dynamic_cast<Cluster*>(*i); // Can't avoid using a cast here
458 cluster->deleteParticles(); // Don't need them
459 ParticleList decayProducts = ClusterDecay::decay(cluster);
460 for(ParticleIter j = decayProducts.begin(); j!=decayProducts.end(); ++j)
461 theStore->addToOutgoing(*j);
462 }
463 return true;
464 }

◆ decayOutgoingDeltas()

G4bool G4INCL::Nucleus::decayOutgoingDeltas ( )

Force the decay of outgoing deltas.

Returns
true if any delta was forced to decay.

Definition at line 342 of file G4INCLNucleus.cc.

342 {
343 ParticleList out = theStore->getOutgoingParticles();
344 ParticleList deltas;
345 for(ParticleIter i = out.begin(); i != out.end(); ++i) {
346 if((*i)->isDelta()) deltas.push_back((*i));
347 }
348 if(deltas.empty()) return false;
349
350 for(ParticleIter i = deltas.begin(); i != deltas.end(); ++i) {
351 DEBUG("Decay outgoing delta particle:" << std::endl
352 << (*i)->print() << std::endl);
353 const ThreeVector beta = -(*i)->boostVector();
354 const G4double deltaMass = (*i)->getMass();
355
356 // Set the delta momentum to zero and sample the decay in the CM frame.
357 // This makes life simpler if we are using real particle masses.
358 (*i)->setMomentum(ThreeVector());
359 (*i)->setEnergy((*i)->getMass());
360
361 // Use a DecayAvatar
362 IAvatar *decay = new DecayAvatar((*i), 0.0, NULL);
363 FinalState *fs = decay->getFinalState();
364 Particle * const pion = fs->getCreatedParticles().front();
365 Particle * const nucleon = fs->getModifiedParticles().front();
366
367 // Adjust the decay momentum if we are using the real masses
368 const G4double decayMomentum = KinematicsUtils::momentumInCM(deltaMass,
369 nucleon->getTableMass(),
370 pion->getTableMass());
371 ThreeVector newMomentum = pion->getMomentum();
372 newMomentum *= decayMomentum / newMomentum.mag();
373
374 pion->setTableMass();
375 pion->setMomentum(newMomentum);
376 pion->adjustEnergyFromMomentum();
377 pion->setEmissionTime(theStore->getBook()->getCurrentTime());
378 pion->boost(beta);
379
380 nucleon->setTableMass();
381 nucleon->setMomentum(-newMomentum);
382 nucleon->adjustEnergyFromMomentum();
383 nucleon->setEmissionTime(theStore->getBook()->getCurrentTime());
384 nucleon->boost(beta);
385
386 theStore->addToOutgoing(pion);
387
388 delete fs;
389 delete decay;
390 }
391
392 return true;
393 }
static G4double momentumInCM(Particle const *const p1, Particle const *const p2)
gives the momentum in the CM frame of two particles.

◆ deleteProjectileRemnant()

void G4INCL::Nucleus::deleteProjectileRemnant ( )
inline

Delete the projectile remnant.

Definition at line 403 of file G4INCLNucleus.hh.

403 {
404 delete theProjectileRemnant;
405 theProjectileRemnant = NULL;
406 }

Referenced by finalizeProjectileRemnant().

◆ dump()

std::string G4INCL::Nucleus::dump ( )

Definition at line 155 of file G4INCLNucleus.cc.

155 {
156 std::stringstream ss;
157 ss <<"(list ;; List of participants " << std::endl;
158 ParticleList participants = theStore->getParticipants();
159 for(ParticleIter i = participants.begin(); i != participants.end(); ++i) {
160 ss <<"(make-particle-avatar-map " << std::endl
161 << (*i)->dump()
162 << "(list ;; List of avatars in this particle" << std::endl
163 << ")) ;; Close the list of avatars and the particle-avatar-map" << std::endl;
164 }
165 ss << ")" << std::endl;
166 return ss.str();
167 }
ParticleList getParticipants()
Definition: G4INCLStore.cc:294

◆ emitInsidePions()

void G4INCL::Nucleus::emitInsidePions ( )

Force emission of all pions inside the nucleus.

Definition at line 478 of file G4INCLNucleus.cc.

478 {
479 /* Forcing emissions of all pions in the nucleus. This probably violates
480 * energy conservation (although the computation of the recoil kinematics
481 * might sweep this under the carpet).
482 */
483 WARN("Forcing emissions of all pions in the nucleus." << std::endl);
484
485 // Emit the pions with this kinetic energy
486 const G4double tinyPionEnergy = 0.1; // MeV
487
488 // Push out the emitted pions
489 ParticleList inside = theStore->getParticles();
490 for(ParticleIter i = inside.begin(); i != inside.end(); ++i) {
491 if((*i)->isPion()) {
492 (*i)->setEmissionTime(theStore->getBook()->getCurrentTime());
493 // Correction for real masses
494 const G4double theQValueCorrection = (*i)->getEmissionQValueCorrection(theA,theZ);
495 const G4double kineticEnergyOutside = (*i)->getKineticEnergy() - (*i)->getPotentialEnergy() + theQValueCorrection;
496 (*i)->setTableMass();
497 if(kineticEnergyOutside > 0.0)
498 (*i)->setEnergy((*i)->getMass()+kineticEnergyOutside);
499 else
500 (*i)->setEnergy((*i)->getMass()+tinyPionEnergy);
501 (*i)->adjustMomentumFromEnergy();
502 (*i)->setPotentialEnergy(0.);
503 theZ -= (*i)->getZ();
504 theStore->particleHasBeenEjected((*i)->getID());
505 theStore->addToOutgoing(*i);
506 }
507 }
508 }
#define WARN(x)

Referenced by computeRecoilKinematics(), and decayInsideDeltas().

◆ fillEventInfo()

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

Fill the event info which contains INCL output data

Definition at line 698 of file G4INCLNucleus.cc.

698 {
699 eventInfo->nParticles = 0;
700 G4bool isNucleonAbsorption = false;
701
702 G4bool isPionAbsorption = false;
703 // It is possible to have pion absorption event only if the
704 // projectile is pion.
705 if(eventInfo->projectileType == PiPlus ||
706 eventInfo->projectileType == PiMinus ||
707 eventInfo->projectileType == PiZero) {
708 isPionAbsorption = true;
709 }
710
711 // Forced CN
712 eventInfo->forcedCompoundNucleus = tryCN;
713
714 // Outgoing particles
715 ParticleList outgoingParticles = getStore()->getOutgoingParticles();
716
717 // Check if we have a nucleon absorption event: nucleon projectile
718 // and no ejected particles.
719 if(outgoingParticles.size() == 0 &&
720 (eventInfo->projectileType == Proton ||
721 eventInfo->projectileType == Neutron)) {
722 isNucleonAbsorption = true;
723 }
724
725 // Reset the remnant counter
726 eventInfo->nRemnants = 0;
727 eventInfo->history.clear();
728
729 for( ParticleIter i = outgoingParticles.begin(); i != outgoingParticles.end(); ++i ) {
730 // If the particle is a cluster and has excitation energy, treat it as a cluster
731 if((*i)->isCluster()) {
732 Cluster const * const c = dynamic_cast<Cluster *>(*i);
733// assert(c);
734#ifdef INCLXX_IN_GEANT4_MODE
735 if(!c)
736 continue;
737#endif
738 const G4double eStar = c->getExcitationEnergy();
739 if(std::abs(eStar)>1E-10) {
740 if(eStar<0.) {
741 WARN("Negative excitation energy in outgoing cluster! EStar = " << eStar << std::endl);
742 }
743 eventInfo->ARem[eventInfo->nRemnants] = c->getA();
744 eventInfo->ZRem[eventInfo->nRemnants] = c->getZ();
745 eventInfo->EStarRem[eventInfo->nRemnants] = eStar;
746 ThreeVector remnantSpin = c->getSpin();
747 Float_t remnantSpinMag;
748 if(eventInfo->ARem[eventInfo->nRemnants]%2==0) { // even-A nucleus
749 remnantSpinMag = (G4int) (remnantSpin.mag()/PhysicalConstants::hc + 0.5);
750 } else { // odd-A nucleus
751 remnantSpinMag = ((G4int) (remnantSpin.mag()/PhysicalConstants::hc)) + 0.5;
752 }
753 remnantSpin *= remnantSpinMag/remnantSpin.mag();
754 eventInfo->JRem[eventInfo->nRemnants] = remnantSpinMag;
755 eventInfo->jxRem[eventInfo->nRemnants] = remnantSpin.getX();
756 eventInfo->jyRem[eventInfo->nRemnants] = remnantSpin.getY();
757 eventInfo->jzRem[eventInfo->nRemnants] = remnantSpin.getZ();
758 eventInfo->EKinRem[eventInfo->nRemnants] = c->getKineticEnergy();
759 ThreeVector mom = c->getMomentum();
760 eventInfo->pxRem[eventInfo->nRemnants] = mom.getX();
761 eventInfo->pyRem[eventInfo->nRemnants] = mom.getY();
762 eventInfo->pzRem[eventInfo->nRemnants] = mom.getZ();
763 eventInfo->thetaRem[eventInfo->nRemnants] = Math::toDegrees(mom.theta());
764 eventInfo->phiRem[eventInfo->nRemnants] = Math::toDegrees(mom.phi());
765 eventInfo->nRemnants++;
766 continue; // don't add it as a particle
767 }
768 }
769
770 // We have a pion absorption event only if the projectile is
771 // pion and there are no ejected pions.
772 if(isPionAbsorption) {
773 if((*i)->isPion()) {
774 isPionAbsorption = false;
775 }
776 }
777 eventInfo->A[eventInfo->nParticles] = (*i)->getA();
778 eventInfo->Z[eventInfo->nParticles] = (*i)->getZ();
779 eventInfo->emissionTime[eventInfo->nParticles] = (*i)->getEmissionTime();
780 eventInfo->EKin[eventInfo->nParticles] = (*i)->getKineticEnergy();
781 ThreeVector mom = (*i)->getMomentum();
782 eventInfo->px[eventInfo->nParticles] = mom.getX();
783 eventInfo->py[eventInfo->nParticles] = mom.getY();
784 eventInfo->pz[eventInfo->nParticles] = mom.getZ();
785 eventInfo->theta[eventInfo->nParticles] = Math::toDegrees(mom.theta());
786 eventInfo->phi[eventInfo->nParticles] = Math::toDegrees(mom.phi());
787 eventInfo->origin[eventInfo->nParticles] = -1;
788 eventInfo->history.push_back("");
789 eventInfo->nParticles++;
790 }
791 eventInfo->nucleonAbsorption = isNucleonAbsorption;
792 eventInfo->pionAbsorption = isPionAbsorption;
793 eventInfo->nCascadeParticles = eventInfo->nParticles;
794
795 // Remnant characteristics
796 if(hasRemnant()) {
797 eventInfo->ARem[eventInfo->nRemnants] = getA();
798 eventInfo->ZRem[eventInfo->nRemnants] = getZ();
799 eventInfo->EStarRem[eventInfo->nRemnants] = getExcitationEnergy();
800 if(eventInfo->EStarRem[eventInfo->nRemnants]<0.) {
801 WARN("Negative excitation energy! EStarRem = " << eventInfo->EStarRem[eventInfo->nRemnants] << std::endl);
802 }
803 if(eventInfo->ARem[eventInfo->nRemnants]%2==0) { // even-A nucleus
804 eventInfo->JRem[eventInfo->nRemnants] = (G4int) (getSpin().mag()/PhysicalConstants::hc + 0.5);
805 } else { // odd-A nucleus
806 eventInfo->JRem[eventInfo->nRemnants] = ((G4int) (getSpin().mag()/PhysicalConstants::hc)) + 0.5;
807 }
808 eventInfo->EKinRem[eventInfo->nRemnants] = getKineticEnergy();
809 ThreeVector mom = getMomentum();
810 eventInfo->pxRem[eventInfo->nRemnants] = mom.getX();
811 eventInfo->pyRem[eventInfo->nRemnants] = mom.getY();
812 eventInfo->pzRem[eventInfo->nRemnants] = mom.getZ();
813 eventInfo->thetaRem[eventInfo->nRemnants] = Math::toDegrees(mom.theta());
814 eventInfo->phiRem[eventInfo->nRemnants] = Math::toDegrees(mom.phi());
815 eventInfo->nRemnants++;
816 }
817
818 // Global counters, flags, etc.
819 eventInfo->nCollisions = getStore()->getBook()->getAcceptedCollisions();
820 eventInfo->nBlockedCollisions = getStore()->getBook()->getBlockedCollisions();
821 eventInfo->nDecays = getStore()->getBook()->getAcceptedDecays();
822 eventInfo->nBlockedDecays = getStore()->getBook()->getBlockedDecays();
823 eventInfo->firstCollisionTime = getStore()->getBook()->getFirstCollisionTime();
824 eventInfo->firstCollisionXSec = getStore()->getBook()->getFirstCollisionXSec();
825 eventInfo->nReflectionAvatars = getStore()->getBook()->getAvatars(SurfaceAvatarType);
826 eventInfo->nCollisionAvatars = getStore()->getBook()->getAvatars(CollisionAvatarType);
827 eventInfo->nDecayAvatars = getStore()->getBook()->getAvatars(DecayAvatarType);
828 }
int G4int
Definition: G4Types.hh:66
G4int getAcceptedDecays() const
Definition: G4INCLBook.hh:87
G4double getFirstCollisionTime()
Definition: G4INCLBook.hh:77
G4int getAvatars(AvatarType type) const
Definition: G4INCLBook.hh:89
G4int getAcceptedCollisions() const
Definition: G4INCLBook.hh:85
G4int getBlockedCollisions() const
Definition: G4INCLBook.hh:86
G4double getFirstCollisionXSec()
Definition: G4INCLBook.hh:80
G4int getBlockedDecays() const
Definition: G4INCLBook.hh:88
ThreeVector const & getSpin() const
Get the spin of the nucleus.
Store * getStore() const
G4double getExcitationEnergy() const
Get the excitation energy of the nucleus.
G4bool hasRemnant() const
Does the nucleus give a cascade remnant?
G4int getZ() const
Returns the charge number.
G4double getKineticEnergy() const
Get the particle kinetic energy.
const G4INCL::ThreeVector & getMomentum() const
G4int getA() const
Returns the baryon number.
G4double mag() const
G4double toDegrees(G4double radians)
const G4double hc
[MeV*fm]
@ SurfaceAvatarType
@ CollisionAvatarType
@ DecayAvatarType
G4float Float_t

◆ 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 872 of file G4INCLNucleus.cc.

872 {
873 // Deal with the projectile remnant
874 if(theProjectileRemnant->getA()>1) {
875 // Set the mass
876 const G4double aMass = theProjectileRemnant->getInvariantMass();
877 theProjectileRemnant->setMass(aMass);
878
879 // Compute the excitation energy from the invariant mass
880 const G4double anExcitationEnergy = aMass
881 - ParticleTable::getTableMass(theProjectileRemnant->getA(), theProjectileRemnant->getZ());
882
883 // Set the excitation energy
884 theProjectileRemnant->setExcitationEnergy(anExcitationEnergy);
885
886 // Set the spin
887 theProjectileRemnant->setSpin(DeJongSpin::shoot(theProjectileRemnant->getNumberStoredComponents(), theProjectileRemnant->getA()));
888
889 // Set the emission time
890 theProjectileRemnant->setEmissionTime(anEmissionTime);
891
892 // Put it in the outgoing list
893 theStore->addToOutgoing(theProjectileRemnant);
894
895 // NULL theProjectileRemnant
896 theProjectileRemnant = NULL;
897 } else if(theProjectileRemnant->getA()==1) {
898 // Put the nucleon in the outgoing list
899 Particle *theNucleon = theProjectileRemnant->getParticles().front();
900 theStore->addToOutgoing(theNucleon);
901 // Delete the remnant
903 } else
905 }
ParticleList const & getParticles() const
void setExcitationEnergy(const G4double e)
Set the excitation energy of the cluster.
void setSpin(const ThreeVector &j)
Set the spin of the nucleus.
static ThreeVector shoot(const G4int Ap, const G4int Af)
void deleteProjectileRemnant()
Delete the projectile remnant.
void setEmissionTime(G4double t)
G4double getInvariantMass() const
Get the the particle invariant mass.
G4int getNumberStoredComponents() const
Get the number of the stored components.

◆ getBlockedDelta()

Particle * G4INCL::Nucleus::getBlockedDelta ( ) const
inline

Get the delta that could not decay.

Definition at line 108 of file G4INCLNucleus.hh.

108{ return blockedDelta; }

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

◆ getConservationBalance()

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

Compute charge, mass, energy and momentum balance.

Definition at line 830 of file G4INCLNucleus.cc.

830 {
831 ConservationBalance theBalance;
832 // Initialise balance variables with the incoming values
833 theBalance.Z = theEventInfo.Zp + theEventInfo.Zt;
834 theBalance.A = theEventInfo.Ap + theEventInfo.At;
835
836 theBalance.energy = getInitialEnergy();
837 theBalance.momentum = getIncomingMomentum();
838
839 // Process outgoing particles
840 ParticleList outgoingParticles = theStore->getOutgoingParticles();
841 for( ParticleIter i = outgoingParticles.begin(); i != outgoingParticles.end(); ++i ) {
842 theBalance.Z -= (*i)->getZ();
843 theBalance.A -= (*i)->getA();
844 // For outgoing clusters, the total energy automatically includes the
845 // excitation energy
846 theBalance.energy -= (*i)->getEnergy(); // Note that outgoing particles should have the real mass
847 theBalance.momentum -= (*i)->getMomentum();
848 }
849
850 // Remnant contribution, if present
851 if(hasRemnant()) {
852 theBalance.Z -= getZ();
853 theBalance.A -= getA();
854 theBalance.energy -= ParticleTable::getTableMass(getA(),getZ()) +
856 if(afterRecoil)
857 theBalance.energy -= getKineticEnergy();
858 theBalance.momentum -= getMomentum();
859 }
860
861 return theBalance;
862 }
const ThreeVector & getIncomingMomentum() const
Get the incoming momentum vector.
G4double getInitialEnergy() const
Get the initial energy.

◆ getCoulombRadius()

G4double G4INCL::Nucleus::getCoulombRadius ( ParticleSpecies const p) const
inline

Get the Coulomb radius for a given particle.

That's the radius of the sphere that the Coulomb trajectory of the incoming particle should intersect. The intersection point is used to determine the effective impact parameter of the trajectory and the new entrance angle.

If the particle is not a Cluster, the Coulomb radius reduces to the surface radius. We use a parametrisation for d, t, He3 and alphas. For heavier clusters we fall back to the surface radius.

Parameters
pthe particle species
Returns
Coulomb radius

Definition at line 352 of file G4INCLNucleus.hh.

352 {
353 if(p.theType == Composite) {
354 const G4int zp = p.theZ;
355 const G4int ap = p.theA;
356 G4double barr, radius = 0.;
357 if(zp==1 && ap==2) { // d
358 barr = 0.2565*Math::pow23((G4double)theA)-0.78;
359 radius = ParticleTable::eSquared*zp*theZ/barr - 2.5;
360 } else if((zp==1 || zp==2) && ap==3) { // t, He3
361 barr = 0.5*(0.5009*Math::pow23((G4double)theA)-1.16);
362 radius = ParticleTable::eSquared*theZ/barr - 0.5;
363 } else if(zp==2 && ap==4) { // alpha
364 barr = 0.5939*Math::pow23((G4double)theA)-1.64;
365 radius = ParticleTable::eSquared*zp*theZ/barr - 0.5;
366 } else if(zp>2) {
367 radius = getUniverseRadius();
368 }
369 if(radius<=0.) {
370 ERROR("Negative Coulomb radius! Using the universe radius" << std::endl);
371 radius = getUniverseRadius();
372 }
373 return radius;
374 } else
375 return getUniverseRadius();
376 }
G4double getUniverseRadius() const
Getter for theUniverseRadius.
static const G4double eSquared
Coulomb conversion factor, in MeV*fm.
G4double pow23(G4double x)

◆ getCreatedParticles()

ParticleList const & G4INCL::Nucleus::getCreatedParticles ( ) const
inline

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

Definition at line 100 of file G4INCLNucleus.hh.

100{ return justCreated; }

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

◆ getDensity()

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

◆ getExcitationEnergy()

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

Get the excitation energy of the nucleus.

Method computeRecoilKinematics() should be called first.

Definition at line 236 of file G4INCLNucleus.hh.

236{ return theExcitationEnergy; }

Referenced by fillEventInfo(), and getConservationBalance().

◆ getIncomingAngularMomentum()

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

Get the incoming angular-momentum vector.

Definition at line 214 of file G4INCLNucleus.hh.

214{ return incomingAngularMomentum; }

◆ getIncomingMomentum()

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

Get the incoming momentum vector.

Definition at line 222 of file G4INCLNucleus.hh.

222 {
223 return incomingMomentum;
224 }

Referenced by getConservationBalance().

◆ getInitialA()

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

Definition at line 94 of file G4INCLNucleus.hh.

94{ return theInitialA; };

◆ getInitialEnergy()

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

Get the initial energy.

Definition at line 230 of file G4INCLNucleus.hh.

230{ return initialEnergy; }

Referenced by getConservationBalance().

◆ getInitialInternalEnergy()

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

Definition at line 259 of file G4INCLNucleus.hh.

259{ return initialInternalEnergy; };

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

◆ getInitialZ()

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

Definition at line 95 of file G4INCLNucleus.hh.

95{ return theInitialZ; };

◆ getNumberOfEnteringNeutrons()

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

Definition at line 118 of file G4INCLNucleus.hh.

118{ return theNnInitial; };

◆ getNumberOfEnteringProtons()

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

Definition at line 117 of file G4INCLNucleus.hh.

117{ return theNpInitial; };

◆ getPotential()

◆ getProjectileChargeNumber()

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

Return the charge number of the projectile.

Definition at line 282 of file G4INCLNucleus.hh.

282{ return projectileZ; }

◆ getProjectileMassNumber()

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

Return the mass number of the projectile.

Definition at line 285 of file G4INCLNucleus.hh.

285{ return projectileA; }

◆ getProjectileRemnant()

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

Get the projectile remnant.

Definition at line 400 of file G4INCLNucleus.hh.

400{ return theProjectileRemnant; }

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

◆ getStore()

◆ 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 324 of file G4INCLNucleus.hh.

324 {
325 if(particle->isPion())
326 // Temporarily set RPION = RMAX
327 return getUniverseRadius();
328 //return 0.5*(theDensity->getTransmissionRadius(particle)+getUniverseRadius());
329 else {
330 const G4double pr = particle->getMomentum().mag()/thePotential->getFermiMomentum(particle);
331 if(pr>=1.)
332 return getUniverseRadius();
333 else
334 return theDensity->getMaxRFromP(pr);
335 }
336 }
G4double getMaxRFromP(G4double p) const
Get the maximum allowed radius for a given momentum.
G4double getFermiMomentum(const Particle *const p) const
Return the Fermi momentum for a particle.

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

◆ getTransmissionBarrier()

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

Get the transmission barrier.

Definition at line 297 of file G4INCLNucleus.hh.

297 {
298 const G4double theTransmissionRadius = theDensity->getTransmissionRadius(p);
299 const G4double theParticleZ = p->getZ();
300 return PhysicalConstants::eSquared*(theZ-theParticleZ)*theParticleZ/theTransmissionRadius;
301 }
G4double getTransmissionRadius(Particle const *const p) const
The radius used for calculating the transmission coefficient.
const G4double eSquared
Coulomb conversion factor [MeV*fm].

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

◆ getTryCompoundNucleus()

G4bool G4INCL::Nucleus::getTryCompoundNucleus ( )
inline

Definition at line 279 of file G4INCLNucleus.hh.

279{ return tryCN; }

◆ getUniverseRadius()

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

◆ getUpdatedParticles()

ParticleList const & G4INCL::Nucleus::getUpdatedParticles ( ) const
inline

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

Definition at line 105 of file G4INCLNucleus.hh.

105{ return toBeUpdated; }

Referenced by G4INCL::StandardPropagationModel::generateAllAvatars(), and G4INCL::StandardPropagationModel::propagate().

◆ hasRemnant()

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

Does the nucleus give a cascade remnant?

To be called after computeRecoilKinematics().

Definition at line 271 of file G4INCLNucleus.hh.

271{ return remnant; }

Referenced by fillEventInfo(), and getConservationBalance().

◆ 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 140 of file G4INCLNucleus.cc.

140 {
141 // Reset the variables connected with the projectile remnant
142 delete theProjectileRemnant;
143 theProjectileRemnant = NULL;
144
146 for(ParticleIter i = particles.begin(); i != particles.end(); ++i) {
148 theStore->add(*i);
149 }
150 particles.clear();
151 initialInternalEnergy = computeTotalEnergy();
152 initialCenterOfMass = thePosition;
153 }
ParticleList particles
virtual void initializeParticles()
Initialise the NuclearDensity pointer and sample the particles.
void updatePotentialEnergy(Particle *p)
Update the particle potential energy.

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

◆ insertParticle()

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

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

Definition at line 78 of file G4INCLNucleus.hh.

78 {
79 theZ += p->getZ();
80 theA += p->getA();
81 theStore->particleHasEntered(p);
82 if(p->isNucleon()) {
83 theNpInitial += Math::heaviside(ParticleTable::getIsospin(p->getType()));
84 theNnInitial += Math::heaviside(-ParticleTable::getIsospin(p->getType()));
85 }
86 if(!p->isTargetSpectator()) theStore->getBook()->incrementCascading();
87 };
void incrementCascading()
Definition: G4INCLBook.hh:73
static 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:289
G4int heaviside(G4int n)

Referenced by applyFinalState().

◆ isEventTransparent()

G4bool G4INCL::Nucleus::isEventTransparent ( ) const

Is the event transparent?

To be called at the end of the cascade.

Definition at line 510 of file G4INCLNucleus.cc.

510 {
511
512 // Forced transparent
513 if(forceTransparent)
514 return true;
515
516 ParticleList const &pL = theStore->getOutgoingParticles();
517 G4int outZ = 0, outA = 0;
518
519 // If any of the particles has undergone a collision, the event is not a
520 // transparent.
521 for(ParticleIter p = pL.begin(); p != pL.end(); ++p ) {
522 if( (*p)->getNumberOfCollisions() != 0 ) return false;
523 if( (*p)->getNumberOfDecays() != 0 ) return false;
524 outZ += (*p)->getZ();
525 outA += (*p)->getA();
526 }
527
528 // Add the geometrical spectators to the Z and A count
529 if(theProjectileRemnant) {
530 outZ += theProjectileRemnant->getZ();
531 outA += theProjectileRemnant->getA();
532 }
533
534 if(outZ!=projectileZ || outA!=projectileA) return false;
535
536 return true;
537
538 }

◆ isForcedTransparent()

G4bool G4INCL::Nucleus::isForcedTransparent ( )
inline

Returns true if a transparent event should be forced.

Definition at line 294 of file G4INCLNucleus.hh.

294{ return forceTransparent; }

◆ isNucleusNucleusCollision()

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

Is it a nucleus-nucleus collision?

Definition at line 385 of file G4INCLNucleus.hh.

385{ return isNucleusNucleus; }

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

◆ moveProjectileRemnantComponentsToOutgoing()

void G4INCL::Nucleus::moveProjectileRemnantComponentsToOutgoing ( )
inline

Move the components of the projectile remnant to the outgoing list.

Definition at line 409 of file G4INCLNucleus.hh.

409 {
410 theStore->addToOutgoing(theProjectileRemnant->getParticles());
411 theProjectileRemnant->clearParticles();
412 }

◆ print()

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

Print the nucleus info

Definition at line 318 of file G4INCLNucleus.cc.

319 {
320 std::stringstream ss;
321 ss << "Particles in the nucleus:" << std::endl
322 << "Participants:" << std::endl;
323 G4int counter = 1;
324 ParticleList participants = theStore->getParticipants();
325 for(ParticleIter p = participants.begin(); p != participants.end(); ++p) {
326 ss << "index = " << counter << std::endl
327 << (*p)->print();
328 counter++;
329 }
330 ss <<"Spectators:" << std::endl;
331 ParticleList spectators = theStore->getSpectators();
332 for(ParticleIter p = spectators.begin(); p != spectators.end(); ++p)
333 ss << (*p)->print();
334 ss <<"Outgoing:" << std::endl;
335 ParticleList outgoing = theStore->getOutgoingParticles();
336 for(ParticleIter p = outgoing.begin(); p != outgoing.end(); ++p)
337 ss << (*p)->print();
338
339 return ss.str();
340 }
ParticleList getSpectators()
Definition: G4INCLStore.cc:306

◆ propagateParticles()

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

Propagate the particles one time step.

Parameters
steplength of the time step

Definition at line 250 of file G4INCLNucleus.cc.

250 {
251 WARN("Useless Nucleus::propagateParticles -method called." << std::endl);
252 }

◆ setIncomingAngularMomentum()

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

Set the incoming angular-momentum vector.

Definition at line 209 of file G4INCLNucleus.hh.

209 {
210 incomingAngularMomentum = j;
211 }

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

◆ setIncomingMomentum()

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

Set the incoming momentum vector.

Definition at line 217 of file G4INCLNucleus.hh.

217 {
218 incomingMomentum = p;
219 }

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

◆ setInitialEnergy()

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

Set the initial energy.

Definition at line 227 of file G4INCLNucleus.hh.

227{ initialEnergy = e; }

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

◆ setNucleusNucleusCollision()

void G4INCL::Nucleus::setNucleusNucleusCollision ( )
inline

Set a nucleus-nucleus collision.

Definition at line 388 of file G4INCLNucleus.hh.

388{ isNucleusNucleus=true; }

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

◆ setParticleNucleusCollision()

void G4INCL::Nucleus::setParticleNucleusCollision ( )
inline

Set a particle-nucleus collision.

Definition at line 391 of file G4INCLNucleus.hh.

391{ isNucleusNucleus=false; }

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

◆ setProjectileChargeNumber()

void G4INCL::Nucleus::setProjectileChargeNumber ( G4int  n)
inline

Set the charge number of the projectile.

Definition at line 288 of file G4INCLNucleus.hh.

288{ projectileZ=n; }

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

◆ setProjectileMassNumber()

void G4INCL::Nucleus::setProjectileMassNumber ( G4int  n)
inline

Set the mass number of the projectile.

Definition at line 291 of file G4INCLNucleus.hh.

291{ projectileA=n; }

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

◆ setProjectileRemnant()

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

Set the projectile remnant.

Definition at line 394 of file G4INCLNucleus.hh.

394 {
395 delete theProjectileRemnant;
396 theProjectileRemnant = c;
397 }

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

◆ setStore()

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

Definition at line 254 of file G4INCLNucleus.hh.

254 {
255 delete theStore;
256 theStore = s;
257 };

◆ setUniverseRadius()

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

Setter for theUniverseRadius.

Definition at line 382 of file G4INCLNucleus.hh.

382{ theUniverseRadius=universeRadius; }

◆ updatePotentialEnergy()

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

Update the particle potential energy.

Definition at line 425 of file G4INCLNucleus.hh.

425 {
426 p->setPotentialEnergy(thePotential->computePotentialEnergy(p));
427 }
virtual G4double computePotentialEnergy(const Particle *const p) const =0

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

◆ useFusionKinematics()

void G4INCL::Nucleus::useFusionKinematics ( )

Adjust the kinematics for complete-fusion events.

Definition at line 864 of file G4INCLNucleus.cc.

864 {
865 setEnergy(initialEnergy);
866 setMomentum(incomingMomentum);
867 setSpin(incomingAngularMomentum);
870 }
virtual G4double getTableMass() const
Get the real particle mass.
virtual void setMomentum(const G4INCL::ThreeVector &momentum)
void setEnergy(G4double energy)
G4double mag2() const

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