Geant4 11.1.1
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, G4int strangess, Config const *const conf, const G4double universeRadius=-1.)
 
virtual ~Nucleus ()
 
 Nucleus (const Nucleus &rhs)
 Dummy copy constructor to silence Coverity warning.
 
Nucleusoperator= (const Nucleus &rhs)
 Dummy assignment operator to silence Coverity warning.
 
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
 
G4int getInitialS () const
 
void propagateParticles (G4double step)
 
G4int getNumberOfEnteringProtons () const
 
G4int getNumberOfEnteringNeutrons () const
 
G4int getNumberOfEnteringPions () const
 
G4int getNumberOfEnteringKaons () 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 decayInsideStrangeParticles ()
 Force the transformation of strange particles into a Lambda;.
 
G4bool decayOutgoingPionResonances (G4double timeThreshold)
 Force the decay of outgoing PionResonances (eta/omega).
 
G4bool decayOutgoingSigmaZero (G4double timeThreshold)
 Force the decay of outgoing Neutral Sigma.
 
G4bool decayOutgoingNeutralKaon ()
 Force the transformation of outgoing Neutral Kaon into propation eigenstate.
 
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 emitInsideStrangeParticles ()
 Force emission of all strange particles inside the nucleus.
 
G4int emitInsideLambda ()
 Force emission of all Lambda (desexitation code with strangeness not implanted yet)
 
G4bool emitInsideKaon ()
 Force emission of all Kaon 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.
 
G4bool containsAntiKaon ()
 Returns true if the nucleus contains any anti Kaons.
 
G4bool containsLambda ()
 Returns true if the nucleus contains any Lambda.
 
G4bool containsSigma ()
 Returns true if the nucleus contains any Sigma.
 
G4bool containsKaon ()
 Returns true if the nucleus contains any Kaons.
 
G4bool containsEtas ()
 Returns true if the nucleus contains any etas.
 
G4bool containsOmegas ()
 Returns true if the nucleus contains any omegas.
 
std::string print ()
 
StoregetStore () const
 
void setStore (Store *str)
 
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 ()
 
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 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 finalizeProjectileRemnant (const G4double emissionTime)
 Finalise the projectile remnant.
 
void updatePotentialEnergy (Particle *p) const
 Update the particle potential energy.
 
void setDensity (NuclearDensity const *const d)
 Setter for theDensity.
 
NuclearDensity const * getDensity () const
 Getter for theDensity.
 
NuclearPotential::INuclearPotential const * getPotential () const
 Getter for thePotential.
 
- Public Member Functions inherited from G4INCL::Cluster
 Cluster (const G4int Z, const G4int A, const G4int S, const G4bool createParticleSampler=true)
 Standard Cluster constructor.
 
template<class Iterator >
 Cluster (Iterator begin, Iterator end)
 
virtual ~Cluster ()
 
 Cluster (const Cluster &rhs)
 Copy constructor.
 
Clusteroperator= (const Cluster &rhs)
 Assignment operator.
 
void swap (Cluster &rhs)
 Helper method for the assignment operator.
 
ParticleSpecies getSpecies () const
 Get the particle species.
 
void deleteParticles ()
 
void clearParticles ()
 
void setZ (const G4int Z)
 Set the charge number of the cluster.
 
void setA (const G4int A)
 Set the mass number of the cluster.
 
void setS (const G4int S)
 Set the strangess number of the cluster.
 
G4double getExcitationEnergy () const
 Get the excitation energy of the cluster.
 
void setExcitationEnergy (const G4double e)
 Set the excitation energy of the cluster.
 
virtual G4double getTableMass () const
 Get the real particle mass.
 
ParticleList const & getParticles () const
 
void removeParticle (Particle *const p)
 Remove a particle from the cluster components.
 
void addParticle (Particle *const p)
 
void updateClusterParameters ()
 Set total cluster mass, energy, size, etc. from the particles.
 
void addParticles (ParticleList const &pL)
 Add a list of particles to the cluster.
 
ParticleList getParticleList () const
 Returns the list of particles that make up the cluster.
 
std::string print () const
 
virtual void initializeParticles ()
 Initialise the NuclearDensity pointer and sample the particles.
 
void internalBoostToCM ()
 Boost to the CM of the component particles.
 
void putParticlesOffShell ()
 Put the cluster components off shell.
 
void setPosition (const ThreeVector &position)
 Set the position of the cluster.
 
void boost (const ThreeVector &aBoostVector)
 Boost the cluster with the indicated velocity.
 
void freezeInternalMotion ()
 Freeze the internal motion of the particles.
 
virtual void rotatePosition (const G4double angle, const ThreeVector &axis)
 Rotate position of all the particles.
 
virtual void rotateMomentum (const G4double angle, const ThreeVector &axis)
 Rotate momentum of all the particles.
 
virtual void makeProjectileSpectator ()
 Make all the components projectile spectators, too.
 
virtual void makeTargetSpectator ()
 Make all the components target spectators, too.
 
virtual void makeParticipant ()
 Make all the components participants, too.
 
ThreeVector const & getSpin () const
 Get the spin of the nucleus.
 
void setSpin (const ThreeVector &j)
 Set the spin of the nucleus.
 
G4INCL::ThreeVector getAngularMomentum () const
 Get the total angular momentum (orbital + spin)
 
- Public Member Functions inherited from G4INCL::Particle
 Particle ()
 
 Particle (ParticleType t, G4double energy, ThreeVector const &momentum, ThreeVector const &position)
 
 Particle (ParticleType t, ThreeVector const &momentum, ThreeVector const &position)
 
virtual ~Particle ()
 
 Particle (const Particle &rhs)
 Copy constructor.
 
Particleoperator= (const Particle &rhs)
 Assignment operator.
 
G4INCL::ParticleType getType () const
 
virtual G4INCL::ParticleSpecies getSpecies () const
 Get the particle species.
 
void setType (ParticleType t)
 
G4bool isNucleon () const
 
ParticipantType getParticipantType () const
 
void setParticipantType (ParticipantType const p)
 
G4bool isParticipant () const
 
G4bool isTargetSpectator () const
 
G4bool isProjectileSpectator () const
 
virtual void makeParticipant ()
 
virtual void makeTargetSpectator ()
 
virtual void makeProjectileSpectator ()
 
G4bool isPion () const
 Is this a pion?
 
G4bool isEta () const
 Is this an eta?
 
G4bool isOmega () const
 Is this an omega?
 
G4bool isEtaPrime () const
 Is this an etaprime?
 
G4bool isPhoton () const
 Is this a photon?
 
G4bool isResonance () const
 Is it a resonance?
 
G4bool isDelta () const
 Is it a Delta?
 
G4bool isSigma () const
 Is this a Sigma?
 
G4bool isKaon () const
 Is this a Kaon?
 
G4bool isAntiKaon () const
 Is this an antiKaon?
 
G4bool isLambda () const
 Is this a Lambda?
 
G4bool isNucleonorLambda () const
 Is this a Nucleon or a Lambda?
 
G4bool isHyperon () const
 Is this an Hyperon?
 
G4bool isMeson () const
 Is this a Meson?
 
G4bool isBaryon () const
 Is this a Baryon?
 
G4bool isStrange () const
 Is this an Strange?
 
G4int getA () const
 Returns the baryon number.
 
G4int getZ () const
 Returns the charge number.
 
G4int getS () const
 Returns the strangeness number.
 
G4double getBeta () const
 
ThreeVector boostVector () const
 
void boost (const ThreeVector &aBoostVector)
 
void lorentzContract (const ThreeVector &aBoostVector, const ThreeVector &refPos)
 Lorentz-contract the particle position around some center.
 
G4double getMass () const
 Get the cached particle mass.
 
G4double getINCLMass () const
 Get the INCL particle mass.
 
virtual G4double getTableMass () const
 Get the tabulated particle mass.
 
G4double getRealMass () const
 Get the real particle mass.
 
void setRealMass ()
 Set the mass of the Particle to its real mass.
 
void setTableMass ()
 Set the mass of the Particle to its table mass.
 
void setINCLMass ()
 Set the mass of the Particle to its table mass.
 
G4double getEmissionQValueCorrection (const G4int AParent, const G4int ZParent) const
 Computes correction on the emission Q-value.
 
G4double getTransferQValueCorrection (const G4int AFrom, const G4int ZFrom, const G4int ATo, const G4int ZTo) const
 Computes correction on the transfer Q-value.
 
G4double getEmissionQValueCorrection (const G4int AParent, const G4int ZParent, const G4int SParent) const
 Computes correction on the emission Q-value for hypernuclei.
 
G4double getTransferQValueCorrection (const G4int AFrom, const G4int ZFrom, const G4int SFrom, const G4int ATo, const G4int ZTo, const G4int STo) const
 Computes correction on the transfer Q-value for hypernuclei.
 
G4double getInvariantMass () const
 Get the the particle invariant mass.
 
G4double getKineticEnergy () const
 Get the particle kinetic energy.
 
G4double getPotentialEnergy () const
 Get the particle potential energy.
 
void setPotentialEnergy (G4double v)
 Set the particle potential energy.
 
G4double getEnergy () const
 
void setMass (G4double mass)
 
void setEnergy (G4double energy)
 
const G4INCL::ThreeVectorgetMomentum () const
 
virtual G4INCL::ThreeVector getAngularMomentum () const
 
virtual void setMomentum (const G4INCL::ThreeVector &momentum)
 
const G4INCL::ThreeVectorgetPosition () const
 
virtual void setPosition (const G4INCL::ThreeVector &position)
 
G4double getHelicity ()
 
void setHelicity (G4double h)
 
void propagate (G4double step)
 
G4int getNumberOfCollisions () const
 Return the number of collisions undergone by the particle.
 
void setNumberOfCollisions (G4int n)
 Set the number of collisions undergone by the particle.
 
void incrementNumberOfCollisions ()
 Increment the number of collisions undergone by the particle.
 
G4int getNumberOfDecays () const
 Return the number of decays undergone by the particle.
 
void setNumberOfDecays (G4int n)
 Set the number of decays undergone by the particle.
 
void incrementNumberOfDecays ()
 Increment the number of decays undergone by the particle.
 
void setOutOfWell ()
 Mark the particle as out of its potential well.
 
G4bool isOutOfWell () const
 Check if the particle is out of its potential well.
 
void setEmissionTime (G4double t)
 
G4double getEmissionTime ()
 
ThreeVector getTransversePosition () const
 Transverse component of the position w.r.t. the momentum.
 
ThreeVector getLongitudinalPosition () const
 Longitudinal component of the position w.r.t. the momentum.
 
const ThreeVectoradjustMomentumFromEnergy ()
 Rescale the momentum to match the total energy.
 
G4double adjustEnergyFromMomentum ()
 Recompute the energy to match the momentum.
 
G4bool isCluster () const
 
void setFrozenMomentum (const ThreeVector &momentum)
 Set the frozen particle momentum.
 
void setFrozenEnergy (const G4double energy)
 Set the frozen particle momentum.
 
ThreeVector getFrozenMomentum () const
 Get the frozen particle momentum.
 
G4double getFrozenEnergy () const
 Get the frozen particle momentum.
 
ThreeVector getPropagationVelocity () const
 Get the propagation velocity of the particle.
 
void freezePropagation ()
 Freeze particle propagation.
 
void thawPropagation ()
 Unfreeze particle propagation.
 
virtual void rotatePositionAndMomentum (const G4double angle, const ThreeVector &axis)
 Rotate the particle position and momentum.
 
virtual void rotatePosition (const G4double angle, const ThreeVector &axis)
 Rotate the particle position.
 
virtual void rotateMomentum (const G4double angle, const ThreeVector &axis)
 Rotate the particle momentum.
 
std::string print () const
 
std::string dump () const
 
long getID () const
 
ParticleList const * getParticles () const
 
G4double getReflectionMomentum () const
 Return the reflection momentum.
 
void setUncorrelatedMomentum (const G4double p)
 Set the uncorrelated momentum.
 
void rpCorrelate ()
 Make the particle follow a strict r-p correlation.
 
void rpDecorrelate ()
 Make the particle not follow a strict r-p correlation.
 
G4double getCosRPAngle () const
 Get the cosine of the angle between position and momentum.
 
G4double getParticleBias () const
 Get the particle bias.
 
void setParticleBias (G4double ParticleBias)
 Set the particle bias.
 
std::vector< G4intgetBiasCollisionVector () const
 Get the vector list of biased vertices on the particle path.
 
void setBiasCollisionVector (std::vector< G4int > BiasCollisionVector)
 Set the vector list of biased vertices on the particle path.
 
G4int getNumberOfKaon () const
 Number of Kaon inside de nucleus.
 
void setNumberOfKaon (const G4int NK)
 
G4int getParentResonancePDGCode () const
 
void setParentResonancePDGCode (const G4int parentPDGCode)
 
G4int getParentResonanceID () const
 
void setParentResonanceID (const G4int parentID)
 

Additional Inherited Members

- Static Public Member Functions inherited from G4INCL::Particle
static G4double getTotalBias ()
 General bias vector function.
 
static void setINCLBiasVector (std::vector< G4double > NewVector)
 
static void FillINCLBiasVector (G4double newBias)
 
static G4double getBiasFromVector (std::vector< G4int > VectorBias)
 
static std::vector< G4intMergeVectorBias (Particle const *const p1, Particle const *const p2)
 
static std::vector< G4intMergeVectorBias (std::vector< G4int > p1, Particle const *const p2)
 
- Static Public Attributes inherited from G4INCL::Particle
static std::vector< G4doubleINCLBiasVector
 Time ordered vector of all bias applied.
 
static G4ThreadLocal G4int nextBiasedCollisionID = 0
 
- Protected Member Functions inherited from G4INCL::Particle
void swap (Particle &rhs)
 Helper method for the assignment operator.
 
- Protected Attributes inherited from G4INCL::Cluster
ParticleList particles
 
G4double theExcitationEnergy
 
ThreeVector theSpin
 
ParticleSamplertheParticleSampler
 
- Protected Attributes inherited from G4INCL::Particle
G4int theZ
 
G4int theA
 
G4int theS
 
ParticipantType theParticipantType
 
G4INCL::ParticleType theType
 
G4double theEnergy
 
G4doublethePropagationEnergy
 
G4double theFrozenEnergy
 
G4INCL::ThreeVector theMomentum
 
G4INCL::ThreeVectorthePropagationMomentum
 
G4INCL::ThreeVector theFrozenMomentum
 
G4INCL::ThreeVector thePosition
 
G4int nCollisions
 
G4int nDecays
 
G4double thePotentialEnergy
 
long ID
 
G4bool rpCorrelated
 
G4double uncorrelatedMomentum
 
G4double theParticleBias
 
G4int theNKaon
 The number of Kaons inside the nucleus (update during the cascade)
 
G4int theParentResonancePDGCode
 
G4int theParentResonanceID
 

Detailed Description

Definition at line 65 of file G4INCLNucleus.hh.

Constructor & Destructor Documentation

◆ Nucleus() [1/2]

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

Definition at line 68 of file G4INCLNucleus.cc.

69 : Cluster(charge,mass,strangess,true),
70 theInitialZ(charge), theInitialA(mass), theInitialS(strangess),
71 theNpInitial(0), theNnInitial(0),
72 theNpionplusInitial(0), theNpionminusInitial(0),
73 theNkaonplusInitial(0), theNkaonminusInitial(0),
74 initialInternalEnergy(0.),
75 incomingAngularMomentum(0.,0.,0.), incomingMomentum(0.,0.,0.),
76 initialCenterOfMass(0.,0.,0.),
77 remnant(true),
78 initialEnergy(0.),
79 tryCN(false),
80 theUniverseRadius(universeRadius),
81 isNucleusNucleus(false),
82 theProjectileRemnant(NULL),
83 theDensity(NULL),
84 thePotential(NULL)
85 {
86 PotentialType potentialType;
87 G4bool pionPotential;
88 if(conf) {
89 potentialType = conf->getPotentialType();
90 pionPotential = conf->getPionPotential();
91 } else { // By default we don't use energy dependent
92 // potential. This is convenient for some tests.
93 potentialType = IsospinPotential;
94 pionPotential = true;
95 }
96
97 thePotential = NuclearPotential::createPotential(potentialType, theA, theZ, pionPotential);
98
101
103
104 theParticleSampler->setPotential(thePotential);
105 theParticleSampler->setDensity(theDensity);
106
107 if(theUniverseRadius<0)
108 theUniverseRadius = theDensity->getMaximumRadius();
109 theStore = new Store(conf);
110 }
bool G4bool
Definition: G4Types.hh:86
ParticleSampler * theParticleSampler
Cluster(const G4int Z, const G4int A, const G4int S, const G4bool createParticleSampler=true)
Standard Cluster constructor.
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.
NuclearDensity const * createDensity(const G4int A, const G4int Z, const G4int S)
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.
void setProtonSeparationEnergy(const G4double s)
Setter for protonSeparationEnergy.

◆ ~Nucleus()

G4INCL::Nucleus::~Nucleus ( )
virtual

Definition at line 112 of file G4INCLNucleus.cc.

112 {
113 delete theStore;
115 /* We don't delete the potential and the density here any more -- Factories
116 * are caching them
117 delete thePotential;
118 delete theDensity;*/
119 }
void deleteProjectileRemnant()
Delete the projectile remnant.

◆ Nucleus() [2/2]

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

Dummy copy constructor to silence Coverity warning.

Member Function Documentation

◆ applyFinalState()

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

Apply reaction final state information to the nucleus.

Definition at line 136 of file G4INCLNucleus.cc.

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

Referenced by decayInsideDeltas(), and decayInsideStrangeParticles().

◆ computeCenterOfMass()

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.

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:253

Referenced by computeRecoilKinematics().

◆ computeExcitationEnergy()

G4double G4INCL::Nucleus::computeExcitationEnergy ( ) const

Compute the current excitation energy.

Returns
the excitation energy [MeV]

Definition at line 281 of file G4INCLNucleus.cc.

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.

◆ computeRecoilKinematics()

void G4INCL::Nucleus::computeRecoilKinematics ( )

Compute the recoil momentum and spin of the nucleus.

Definition at line 235 of file G4INCLNucleus.cc.

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) {
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 }
G4INCL::ThreeVector getAngularMomentum() const
Get the total angular momentum (orbital + spin)
ThreeVector theSpin
G4double theExcitationEnergy
void emitInsidePions()
Force emission of all pions inside the nucleus.
ThreeVector computeCenterOfMass() const
Compute the current center-of-mass position.
G4INCL::ThreeVector theMomentum
void setMass(G4double mass)
G4double adjustEnergyFromMomentum()
Recompute the energy to match the momentum.
const G4INCL::ThreeVector & getMomentum() const
G4INCL::ThreeVector thePosition
ParticleList const & getOutgoingParticles() const
Definition: G4INCLStore.hh:223
G4ThreadLocal NuclearMassFn getTableMass
Static pointer to the mass function for nuclei.

◆ computeSeparationEnergyBalance()

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

Outgoing - incoming separation energies.

Used by CDPP.

Definition at line 128 of file G4INCLNucleus.hh.

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 case Lambda:
141 case PiPlus:
142 case PiMinus:
143 case KPlus:
144 case KMinus:
145 case KZero:
146 case KZeroBar:
147 case KShort:
148 case KLong:
149 case SigmaPlus:
150 case SigmaZero:
151 case SigmaMinus:
152 S += thePotential->getSeparationEnergy(*i);
153 break;
154 case Composite:
155 S += (*i)->getZ() * thePotential->getSeparationEnergy(Proton)
156 + ((*i)->getA() + (*i)->getS() - (*i)->getZ()) * thePotential->getSeparationEnergy(Neutron)
157 - (*i)->getS() * thePotential->getSeparationEnergy(Lambda);
158 break;
159 default:
160 break;
161 }
162 }
163
164 S -= theNpInitial * thePotential->getSeparationEnergy(Proton);
165 S -= theNnInitial * thePotential->getSeparationEnergy(Neutron);
166 S -= theNpionplusInitial*thePotential->getSeparationEnergy(PiPlus);;
167 S -= theNkaonplusInitial*thePotential->getSeparationEnergy(KPlus);
168 S -= theNpionminusInitial*thePotential->getSeparationEnergy(PiMinus);
169 S -= theNkaonminusInitial*thePotential->getSeparationEnergy(KMinus);
170 return S;
171 }
G4double S(G4double temp)

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

218 {
219 G4double totalEnergy = 0.0;
220 ParticleList const &inside = theStore->getParticles();
221 for(ParticleIter p=inside.begin(), e=inside.end(); p!=e; ++p) {
222 if((*p)->isNucleon()) // Ugly: we should calculate everything using total energies!
223 totalEnergy += (*p)->getKineticEnergy() - (*p)->getPotentialEnergy();
224 else if((*p)->isResonance())
225 totalEnergy += (*p)->getEnergy() - (*p)->getPotentialEnergy() - ParticleTable::effectiveNucleonMass;
226 else if((*p)->isHyperon())
227 totalEnergy += (*p)->getEnergy() - (*p)->getPotentialEnergy() - ParticleTable::getRealMass((*p)->getType());
228 else
229 totalEnergy += (*p)->getEnergy() - (*p)->getPotentialEnergy();
230 }
231
232 return totalEnergy;
233 }
G4double getRealMass(const G4INCL::ParticleType t)
Get particle mass (in MeV/c^2)
const G4double effectiveNucleonMass

Referenced by computeExcitationEnergy(), and initializeParticles().

◆ containsAntiKaon()

G4bool G4INCL::Nucleus::containsAntiKaon ( )
inline

Returns true if the nucleus contains any anti Kaons.

Definition at line 295 of file G4INCLNucleus.hh.

295 {
296 ParticleList const &inside = theStore->getParticles();
297 for(ParticleIter i=inside.begin(), e=inside.end(); i!=e; ++i)
298 if((*i)->isAntiKaon()) return true;
299 return false;
300 }

◆ containsDeltas()

G4bool G4INCL::Nucleus::containsDeltas ( )
inline

Returns true if the nucleus contains any deltas.

Definition at line 287 of file G4INCLNucleus.hh.

287 {
288 ParticleList const &inside = theStore->getParticles();
289 for(ParticleIter i=inside.begin(), e=inside.end(); i!=e; ++i)
290 if((*i)->isDelta()) return true;
291 return false;
292 }

◆ containsEtas()

G4bool G4INCL::Nucleus::containsEtas ( )
inline

Returns true if the nucleus contains any etas.

Definition at line 327 of file G4INCLNucleus.hh.

327 {
328 ParticleList const &inside = theStore->getParticles();
329 for(ParticleIter i=inside.begin(), e=inside.end(); i!=e; ++i)
330 if((*i)->isEta()) return true;
331 return false;
332 }

◆ containsKaon()

G4bool G4INCL::Nucleus::containsKaon ( )
inline

Returns true if the nucleus contains any Kaons.

Definition at line 319 of file G4INCLNucleus.hh.

319 {
320 ParticleList const &inside = theStore->getParticles();
321 for(ParticleIter i=inside.begin(), e=inside.end(); i!=e; ++i)
322 if((*i)->isKaon()) return true;
323 return false;
324 }

◆ containsLambda()

G4bool G4INCL::Nucleus::containsLambda ( )
inline

Returns true if the nucleus contains any Lambda.

Definition at line 303 of file G4INCLNucleus.hh.

303 {
304 ParticleList const &inside = theStore->getParticles();
305 for(ParticleIter i=inside.begin(), e=inside.end(); i!=e; ++i)
306 if((*i)->isLambda()) return true;
307 return false;
308 }

◆ containsOmegas()

G4bool G4INCL::Nucleus::containsOmegas ( )
inline

Returns true if the nucleus contains any omegas.

Definition at line 335 of file G4INCLNucleus.hh.

335 {
336 ParticleList const &inside = theStore->getParticles();
337 for(ParticleIter i=inside.begin(), e=inside.end(); i!=e; ++i)
338 if((*i)->isOmega()) return true;
339 return false;
340 }

◆ containsSigma()

G4bool G4INCL::Nucleus::containsSigma ( )
inline

Returns true if the nucleus contains any Sigma.

Definition at line 311 of file G4INCLNucleus.hh.

311 {
312 ParticleList const &inside = theStore->getParticles();
313 for(ParticleIter i=inside.begin(), e=inside.end(); i!=e; ++i)
314 if((*i)->isSigma()) return true;
315 return false;
316 }

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

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:" << '\n'
382 << (*i)->print() << '\n');
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 << '\n');
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" << '\n');
412 }
413
414 return true;
415 }
#define INCL_WARN(x)
G4bool hasPionPotential() const
Do we have a pion potential?
void applyFinalState(FinalState *)
ParticleList decay(Cluster *const c)
Carries out a cluster decay.

◆ decayInsideStrangeParticles()

G4bool G4INCL::Nucleus::decayInsideStrangeParticles ( )

Force the transformation of strange particles into a Lambda;.

Returns
true if any strange particles was forced to absorb.

Definition at line 417 of file G4INCLNucleus.cc.

417 {
418
419 /* Transform each strange particles into a lambda
420 * Every Kaon (KPlus and KZero) are emited
421 */
422 const G4bool unphysicalRemnant = (theZ<0 || theZ>theA);
423 if(unphysicalRemnant){
425 INCL_WARN("Remnant is unphysical: Z=" << theZ << ", A=" << theA << ", too much strange particles? -> all emit" << '\n');
426 return false;
427 }
428
429 /* Build a list of particles with a strangeness == -1 except Lambda,
430 * and two other one for proton and neutron
431 */
432 ParticleList const &inside = theStore->getParticles();
433 ParticleList stranges;
434 ParticleList protons;
435 ParticleList neutrons;
436 for(ParticleIter i=inside.begin(), e=inside.end(); i!=e; ++i){
437 if((*i)->isSigma() || (*i)->isAntiKaon()) stranges.push_back((*i));
438 else if((*i)->isNucleon() && (*i)->getZ() == 1) protons.push_back((*i));
439 else if((*i)->isNucleon() && (*i)->getZ() == 0) neutrons.push_back((*i));
440 }
441
442 if((stranges.size() > protons.size()) || (stranges.size() > neutrons.size())){
443 INCL_WARN("Remnant is unphysical: Nproton=" << protons.size() << ", Nneutron=" << neutrons.size() << ", Strange particles : " << stranges.size() << '\n');
445 return false;
446 }
447
448 // Loop over the strange particles, make them absorbe
449 ParticleIter protonIter = protons.begin();
450 ParticleIter neutronIter = neutrons.begin();
451 for(ParticleIter i=stranges.begin(), e=stranges.end(); i!=e; ++i) {
452 INCL_DEBUG("Absorbe inside strange particles:" << '\n'
453 << (*i)->print() << '\n');
454 IAvatar *decay;
455 if((*i)->getType() == SigmaMinus){
456 decay = new DecayAvatar((*protonIter), (*i), 0.0, this, true);
457 ++protonIter;
458 }
459 else if((*i)->getType() == SigmaPlus){
460 decay = new DecayAvatar((*neutronIter), (*i), 0.0, this, true);
461 ++neutronIter;
462 }
463 else if(Random::shoot()*(protons.size() + neutrons.size()) < protons.size()){
464 decay = new DecayAvatar((*protonIter), (*i), 0.0, this, true);
465 ++protonIter;
466 }
467 else {
468 decay = new DecayAvatar((*neutronIter), (*i), 0.0, this, true);
469 ++neutronIter;
470 }
471 FinalState *fs = decay->getFinalState();
472 applyFinalState(fs);
473 delete fs;
474 delete decay;
475 }
476
477 return true;
478 }
void emitInsideStrangeParticles()
Force emission of all strange particles inside the nucleus.
G4double shoot()
Definition: G4INCLRandom.cc:93

◆ decayMe()

G4bool G4INCL::Nucleus::decayMe ( )

Force the phase-space decay of the Nucleus.

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

Returns
true if the nucleus was forced to decay.

Definition at line 656 of file G4INCLNucleus.cc.

656 {
657 // Do the phase-space decay only if Z=0 or N=0
658 if(theA<=1 || (theZ!=0 && (theA+theS)!=theZ))
659 return false;
660
661 ParticleList decayProducts = ClusterDecay::decay(this);
662 for(ParticleIter j=decayProducts.begin(), e=decayProducts.end(); j!=e; ++j){
663 (*j)->setBiasCollisionVector(this->getBiasCollisionVector());
664 theStore->addToOutgoing(*j);
665 }
666
667 return true;
668 }
std::vector< G4int > getBiasCollisionVector() const
Get the vector list of biased vertices on the particle path.

◆ decayOutgoingClusters()

G4bool G4INCL::Nucleus::decayOutgoingClusters ( )

Force the decay of unstable outgoing clusters.

Returns
true if any cluster was forced to decay.

Definition at line 631 of file G4INCLNucleus.cc.

631 {
632 ParticleList const &out = theStore->getOutgoingParticles();
633 ParticleList clusters;
634 for(ParticleIter i=out.begin(), e=out.end(); i!=e; ++i) {
635 if((*i)->isCluster()) clusters.push_back((*i));
636 }
637 if(clusters.empty()) return false;
638
639 for(ParticleIter i=clusters.begin(), e=clusters.end(); i!=e; ++i) {
640 Cluster *cluster = dynamic_cast<Cluster*>(*i); // Can't avoid using a cast here
641// assert(cluster);
642#ifdef INCLXX_IN_GEANT4_MODE
643 if(!cluster)
644 continue;
645#endif
646 cluster->deleteParticles(); // Don't need them
647 ParticleList decayProducts = ClusterDecay::decay(cluster);
648 for(ParticleIter j=decayProducts.begin(), end=decayProducts.end(); j!=end; ++j){
649 (*j)->setBiasCollisionVector(cluster->getBiasCollisionVector());
650 theStore->addToOutgoing(*j);
651 }
652 }
653 return true;
654 }

◆ decayOutgoingDeltas()

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.

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:" << '\n'
318 << (*i)->print() << '\n');
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(nucleon->getEmissionTime());
344 pion->boost(beta);
345 pion->setBiasCollisionVector(nucleon->getBiasCollisionVector());
346
347 nucleon->setTableMass();
348 nucleon->setMomentum(-newMomentum);
349 nucleon->adjustEnergyFromMomentum();
350 nucleon->boost(beta);
351
352 theStore->addToOutgoing(pion);
353
354 delete fs;
355 delete decay;
356 }
357
358 return true;
359 }
G4double momentumInCM(Particle const *const p1, Particle const *const p2)
gives the momentum in the CM frame of two particles.
G4bool pion(G4int ityp)
G4bool nucleon(G4int ityp)

◆ decayOutgoingNeutralKaon()

G4bool G4INCL::Nucleus::decayOutgoingNeutralKaon ( )

Force the transformation of outgoing Neutral Kaon into propation eigenstate.

Returns
true if any kaon was forced to decay.

Definition at line 608 of file G4INCLNucleus.cc.

608 {
609 ParticleList const &out = theStore->getOutgoingParticles();
610 ParticleList neutralkaon;
611 for(ParticleIter i=out.begin(), e=out.end(); i!=e; ++i) {
612 if((*i)->getType() == KZero || (*i)->getType() == KZeroBar) neutralkaon.push_back((*i));
613 }
614 if(neutralkaon.empty()) return false;
615
616 for(ParticleIter i=neutralkaon.begin(), e=neutralkaon.end(); i!=e; ++i) {
617 INCL_DEBUG("Transform outgoing neutral kaon:" << '\n'
618 << (*i)->print() << '\n');
619
620 // Use a DecayAvatar
621 IAvatar *decay = new DecayAvatar((*i), 0.0, NULL);
622 FinalState *fs = decay->getFinalState();
623
624 delete fs;
625 delete decay;
626 }
627
628 return true;
629 }

◆ decayOutgoingPionResonances()

G4bool G4INCL::Nucleus::decayOutgoingPionResonances ( G4double  timeThreshold)

Force the decay of outgoing PionResonances (eta/omega).

Returns
true if any eta was forced to decay.

Definition at line 480 of file G4INCLNucleus.cc.

480 {
481 ParticleList const &out = theStore->getOutgoingParticles();
482 ParticleList pionResonances;
483 for(ParticleIter i=out.begin(), e=out.end(); i!=e; ++i) {
484// if((*i)->isEta() || (*i)->isOmega()) pionResonances.push_back((*i));
485 if(((*i)->isEta() && timeThreshold > ParticleTable::getWidth(Eta)) || ((*i)->isOmega() && timeThreshold > ParticleTable::getWidth(Omega))) pionResonances.push_back((*i));
486 }
487 if(pionResonances.empty()) return false;
488
489 for(ParticleIter i=pionResonances.begin(), e=pionResonances.end(); i!=e; ++i) {
490 INCL_DEBUG("Decay outgoing pionResonances particle:" << '\n'
491 << (*i)->print() << '\n');
492 const ThreeVector beta = -(*i)->boostVector();
493 const G4double pionResonanceMass = (*i)->getMass();
494
495 // Set the pionResonance momentum to zero and sample the decay in the CM frame.
496 // This makes life simpler if we are using real particle masses.
497 (*i)->setMomentum(ThreeVector());
498 (*i)->setEnergy((*i)->getMass());
499
500 // Use a DecayAvatar
501 IAvatar *decay = new DecayAvatar((*i), 0.0, NULL);
502 FinalState *fs = decay->getFinalState();
503
504 Particle * const theModifiedParticle = fs->getModifiedParticles().front();
505 ParticleList const &created = fs->getCreatedParticles();
506 Particle * const theCreatedParticle1 = created.front();
507
508 if (created.size() == 1) {
509
510 // Adjust the decay momentum if we are using the real masses
511 const G4double decayMomentum = KinematicsUtils::momentumInCM(pionResonanceMass,theModifiedParticle->getTableMass(),theCreatedParticle1->getTableMass());
512 ThreeVector newMomentum = theCreatedParticle1->getMomentum();
513 newMomentum *= decayMomentum / newMomentum.mag();
514
515 theCreatedParticle1->setTableMass();
516 theCreatedParticle1->setMomentum(newMomentum);
517 theCreatedParticle1->adjustEnergyFromMomentum();
518 //theCreatedParticle1->setEmissionTime(nucleon->getEmissionTime());
519 theCreatedParticle1->boost(beta);
520 theCreatedParticle1->setBiasCollisionVector(theModifiedParticle->getBiasCollisionVector());
521
522 theModifiedParticle->setTableMass();
523 theModifiedParticle->setMomentum(-newMomentum);
524 theModifiedParticle->adjustEnergyFromMomentum();
525 theModifiedParticle->boost(beta);
526
527 theStore->addToOutgoing(theCreatedParticle1);
528 }
529 else if (created.size() == 2) {
530 Particle * const theCreatedParticle2 = created.back();
531
532 theCreatedParticle1->boost(beta);
533 theCreatedParticle1->setBiasCollisionVector(theModifiedParticle->getBiasCollisionVector());
534 theCreatedParticle2->boost(beta);
535 theCreatedParticle2->setBiasCollisionVector(theModifiedParticle->getBiasCollisionVector());
536 theModifiedParticle->boost(beta);
537
538 theStore->addToOutgoing(theCreatedParticle1);
539 theStore->addToOutgoing(theCreatedParticle2);
540 }
541 else {
542 INCL_ERROR("Wrong number (< 2) of created particles during the decay of a pion resonance");
543 }
544 delete fs;
545 delete decay;
546 }
547
548 return true;
549 }
G4double getWidth(const ParticleType t)
Get particle width (in s)

◆ decayOutgoingSigmaZero()

G4bool G4INCL::Nucleus::decayOutgoingSigmaZero ( G4double  timeThreshold)

Force the decay of outgoing Neutral Sigma.

Returns
true if any Sigma was forced to decay.

Definition at line 551 of file G4INCLNucleus.cc.

551 {
552 ParticleList const &out = theStore->getOutgoingParticles();
553 ParticleList neutralsigma;
554 for(ParticleIter i=out.begin(), e=out.end(); i!=e; ++i) {
555 if((*i)->getType() == SigmaZero && timeThreshold > ParticleTable::getWidth(SigmaZero)) neutralsigma.push_back((*i));
556 }
557 if(neutralsigma.empty()) return false;
558
559 for(ParticleIter i=neutralsigma.begin(), e=neutralsigma.end(); i!=e; ++i) {
560 INCL_DEBUG("Decay outgoing neutral sigma:" << '\n'
561 << (*i)->print() << '\n');
562 const ThreeVector beta = -(*i)->boostVector();
563 const G4double neutralsigmaMass = (*i)->getMass();
564
565 // Set the neutral sigma momentum to zero and sample the decay in the CM frame.
566 // This makes life simpler if we are using real particle masses.
567 (*i)->setMomentum(ThreeVector());
568 (*i)->setEnergy((*i)->getMass());
569
570 // Use a DecayAvatar
571 IAvatar *decay = new DecayAvatar((*i), 0.0, NULL);
572 FinalState *fs = decay->getFinalState();
573
574 Particle * const theModifiedParticle = fs->getModifiedParticles().front();
575 ParticleList const &created = fs->getCreatedParticles();
576 Particle * const theCreatedParticle = created.front();
577
578 if (created.size() == 1) {
579
580 // Adjust the decay momentum if we are using the real masses
581 const G4double decayMomentum = KinematicsUtils::momentumInCM(neutralsigmaMass,theModifiedParticle->getTableMass(),theCreatedParticle->getTableMass());
582 ThreeVector newMomentum = theCreatedParticle->getMomentum();
583 newMomentum *= decayMomentum / newMomentum.mag();
584
585 theCreatedParticle->setTableMass();
586 theCreatedParticle->setMomentum(newMomentum);
587 theCreatedParticle->adjustEnergyFromMomentum();
588 theCreatedParticle->boost(beta);
589 theCreatedParticle->setBiasCollisionVector(theModifiedParticle->getBiasCollisionVector());
590
591 theModifiedParticle->setTableMass();
592 theModifiedParticle->setMomentum(-newMomentum);
593 theModifiedParticle->adjustEnergyFromMomentum();
594 theModifiedParticle->boost(beta);
595
596 theStore->addToOutgoing(theCreatedParticle);
597 }
598 else {
599 INCL_ERROR("Wrong number (!= 1) of created particles during the decay of a sigma zero");
600 }
601 delete fs;
602 delete decay;
603 }
604
605 return true;
606 }

◆ deleteProjectileRemnant()

void G4INCL::Nucleus::deleteProjectileRemnant ( )
inline

Delete the projectile remnant.

Definition at line 442 of file G4INCLNucleus.hh.

442 {
443 delete theProjectileRemnant;
444 theProjectileRemnant = NULL;
445 }

Referenced by ~Nucleus().

◆ emitInsideKaon()

G4bool G4INCL::Nucleus::emitInsideKaon ( )

Force emission of all Kaon inside the nucleus.

Definition at line 796 of file G4INCLNucleus.cc.

796 {
797 /* Forcing emissions of all Kaon (not antiKaons) in the nucleus.
798 * This probably violates energy conservation
799 * (although the computation of the recoil kinematics
800 * might sweep this under the carpet).
801 */
802 INCL_DEBUG("Forcing emissions of all Kaon in the nucleus." << '\n');
803
804 // Emit the Kaon with this kinetic energy (not supposed to append
805 const G4double tinyEnergy = 0.1; // MeV
806
807 // Push out the emitted kaon
808 ParticleList const &inside = theStore->getParticles();
809 ParticleList toEject;
810 for(ParticleIter i=inside.begin(), e=inside.end(); i!=e; ++i) {
811 if((*i)->isKaon()) {
812 Particle * const theKaon = *i;
813 INCL_DEBUG("Forcing emission of the following particle: "
814 << theKaon->print() << '\n');
815 theKaon->setEmissionTime(theStore->getBook().getCurrentTime());
816 // Correction for real masses
817 const G4double theQValueCorrection = theKaon->getEmissionQValueCorrection(theA,theZ,theS);
818 const G4double kineticEnergyOutside = theKaon->getKineticEnergy() - theKaon->getPotentialEnergy() + theQValueCorrection;
819 theKaon->setTableMass();
820 if(kineticEnergyOutside > 0.0)
821 theKaon->setEnergy(theKaon->getMass()+kineticEnergyOutside);
822 else
823 theKaon->setEnergy(theKaon->getMass()+tinyEnergy);
824 theKaon->adjustMomentumFromEnergy();
825 theKaon->setPotentialEnergy(0.);
826 theZ -= theKaon->getZ();
827 theS -= theKaon->getS();
828 toEject.push_back(theKaon);
829 }
830 }
831 for(ParticleIter i=toEject.begin(), e=toEject.end(); i!=e; ++i) {
832 theStore->particleHasBeenEjected(*i);
833 theStore->addToOutgoing(*i);
834 (*i)->setParticleBias(Particle::getTotalBias());
835 }
836 theNKaon -= 1;
837 return toEject.size() != 0;
838 }
G4int theNKaon
The number of Kaons inside the nucleus (update during the cascade)
static G4double getTotalBias()
General bias vector function.

◆ emitInsideLambda()

G4int G4INCL::Nucleus::emitInsideLambda ( )

Force emission of all Lambda (desexitation code with strangeness not implanted yet)

Definition at line 753 of file G4INCLNucleus.cc.

753 {
754 /* Forcing emissions of all Lambda in the nucleus.
755 * This probably violates energy conservation
756 * (although the computation of the recoil kinematics
757 * might sweep this under the carpet).
758 */
759 INCL_DEBUG("Forcing emissions of all Lambda in the nucleus." << '\n');
760
761 // Emit the Lambda with this kinetic energy
762 const G4double tinyEnergy = 0.1; // MeV
763
764 // Push out the emitted Lambda
765 ParticleList const &inside = theStore->getParticles();
766 ParticleList toEject;
767 for(ParticleIter i=inside.begin(), e=inside.end(); i!=e; ++i) {
768 if((*i)->isLambda()) {
769 Particle * const theLambda = *i;
770 INCL_DEBUG("Forcing emission of the following particle: "
771 << theLambda->print() << '\n');
772 theLambda->setEmissionTime(theStore->getBook().getCurrentTime());
773 // Correction for real masses
774 const G4double theQValueCorrection = theLambda->getEmissionQValueCorrection(theA,theZ,theS); // Does it work for strange particles? Should be check
775 const G4double kineticEnergyOutside = theLambda->getKineticEnergy() - theLambda->getPotentialEnergy() + theQValueCorrection;
776 theLambda->setTableMass();
777 if(kineticEnergyOutside > 0.0)
778 theLambda->setEnergy(theLambda->getMass()+kineticEnergyOutside);
779 else
780 theLambda->setEnergy(theLambda->getMass()+tinyEnergy);
781 theLambda->adjustMomentumFromEnergy();
782 theLambda->setPotentialEnergy(0.);
783 theA -= theLambda->getA();
784 theS -= theLambda->getS();
785 toEject.push_back(theLambda);
786 }
787 }
788 for(ParticleIter i=toEject.begin(), e=toEject.end(); i!=e; ++i) {
789 theStore->particleHasBeenEjected(*i);
790 theStore->addToOutgoing(*i);
791 (*i)->setParticleBias(Particle::getTotalBias());
792 }
793 return (G4int)toEject.size();
794 }
int G4int
Definition: G4Types.hh:85

◆ emitInsidePions()

void G4INCL::Nucleus::emitInsidePions ( )

Force emission of all pions inside the nucleus.

Definition at line 670 of file G4INCLNucleus.cc.

670 {
671 /* Forcing emissions of all pions in the nucleus. This probably violates
672 * energy conservation (although the computation of the recoil kinematics
673 * might sweep this under the carpet).
674 */
675 INCL_WARN("Forcing emissions of all pions in the nucleus." << '\n');
676
677 // Emit the pions with this kinetic energy
678 const G4double tinyPionEnergy = 0.1; // MeV
679
680 // Push out the emitted pions
681 ParticleList const &inside = theStore->getParticles();
682 ParticleList toEject;
683 for(ParticleIter i=inside.begin(), e=inside.end(); i!=e; ++i) {
684 if((*i)->isPion()) {
685 Particle * const thePion = *i;
686 INCL_DEBUG("Forcing emission of the following particle: "
687 << thePion->print() << '\n');
688 thePion->setEmissionTime(theStore->getBook().getCurrentTime());
689 // Correction for real masses
690 const G4double theQValueCorrection = thePion->getEmissionQValueCorrection(theA,theZ,theS);
691 const G4double kineticEnergyOutside = thePion->getKineticEnergy() - thePion->getPotentialEnergy() + theQValueCorrection;
692 thePion->setTableMass();
693 if(kineticEnergyOutside > 0.0)
694 thePion->setEnergy(thePion->getMass()+kineticEnergyOutside);
695 else
696 thePion->setEnergy(thePion->getMass()+tinyPionEnergy);
697 thePion->adjustMomentumFromEnergy();
698 thePion->setPotentialEnergy(0.);
699 theZ -= thePion->getZ();
700 toEject.push_back(thePion);
701 }
702 }
703 for(ParticleIter i=toEject.begin(), e=toEject.end(); i!=e; ++i) {
704 theStore->particleHasBeenEjected(*i);
705 theStore->addToOutgoing(*i);
706 (*i)->setParticleBias(Particle::getTotalBias());
707 }
708 }

Referenced by computeRecoilKinematics(), and decayInsideDeltas().

◆ emitInsideStrangeParticles()

void G4INCL::Nucleus::emitInsideStrangeParticles ( )

Force emission of all strange particles inside the nucleus.

Definition at line 710 of file G4INCLNucleus.cc.

710 {
711 /* Forcing emissions of Sigmas and antiKaons.
712 * This probably violates energy conservation
713 * (although the computation of the recoil kinematics
714 * might sweep this under the carpet).
715 */
716 INCL_DEBUG("Forcing emissions of all strange particles in the nucleus." << '\n');
717
718 // Emit the strange particles with this kinetic energy
719 const G4double tinyEnergy = 0.1; // MeV
720
721 // Push out the emitted strange particles
722 ParticleList const &inside = theStore->getParticles();
723 ParticleList toEject;
724 for(ParticleIter i=inside.begin(), e=inside.end(); i!=e; ++i) {
725 if((*i)->isSigma() || (*i)->isAntiKaon()) {
726 Particle * const theParticle = *i;
727 INCL_DEBUG("Forcing emission of the following particle: "
728 << theParticle->print() << '\n');
729 theParticle->setEmissionTime(theStore->getBook().getCurrentTime());
730 // Correction for real masses
731 const G4double theQValueCorrection = theParticle->getEmissionQValueCorrection(theA,theZ,theS); // Does it work for strange particles? should be check
732 const G4double kineticEnergyOutside = theParticle->getKineticEnergy() - theParticle->getPotentialEnergy() + theQValueCorrection;
733 theParticle->setTableMass();
734 if(kineticEnergyOutside > 0.0)
735 theParticle->setEnergy(theParticle->getMass()+kineticEnergyOutside);
736 else
737 theParticle->setEnergy(theParticle->getMass()+tinyEnergy);
738 theParticle->adjustMomentumFromEnergy();
739 theParticle->setPotentialEnergy(0.);
740 theA -= theParticle->getA();
741 theZ -= theParticle->getZ();
742 theS -= theParticle->getS();
743 toEject.push_back(theParticle);
744 }
745 }
746 for(ParticleIter i=toEject.begin(), e=toEject.end(); i!=e; ++i) {
747 theStore->particleHasBeenEjected(*i);
748 theStore->addToOutgoing(*i);
749 (*i)->setParticleBias(Particle::getTotalBias());
750 }
751 }

Referenced by decayInsideStrangeParticles().

◆ fillEventInfo()

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

Fill the event info which contains INCL output data

Definition at line 1010 of file G4INCLNucleus.cc.

1010 {
1011 eventInfo->nParticles = 0;
1012 G4bool isNucleonAbsorption = false;
1013
1014 G4bool isPionAbsorption = false;
1015 // It is possible to have pion absorption event only if the
1016 // projectile is pion.
1017 if(eventInfo->projectileType == PiPlus ||
1018 eventInfo->projectileType == PiMinus ||
1019 eventInfo->projectileType == PiZero) {
1020 isPionAbsorption = true;
1021 }
1022
1023 // Forced CN
1024 eventInfo->forcedCompoundNucleus = tryCN;
1025
1026 // Outgoing particles
1027 ParticleList const &outgoingParticles = getStore()->getOutgoingParticles();
1028
1029 // Check if we have a nucleon absorption event: nucleon projectile
1030 // and no ejected particles.
1031 if(outgoingParticles.size() == 0 &&
1032 (eventInfo->projectileType == Proton ||
1033 eventInfo->projectileType == Neutron)) {
1034 isNucleonAbsorption = true;
1035 }
1036
1037 // Reset the remnant counter
1038 eventInfo->nRemnants = 0;
1039 eventInfo->history.clear();
1040
1041 for(ParticleIter i=outgoingParticles.begin(), e=outgoingParticles.end(); i!=e; ++i ) {
1042 // We have a pion absorption event only if the projectile is
1043 // pion and there are no ejected pions.
1044 if(isPionAbsorption) {
1045 if((*i)->isPion()) {
1046 isPionAbsorption = false;
1047 }
1048 }
1049
1050 eventInfo->ParticleBias[eventInfo->nParticles] = (*i)->getParticleBias();
1051
1052 eventInfo->A[eventInfo->nParticles] = (G4INCL::Short_t)(*i)->getA();
1053 eventInfo->Z[eventInfo->nParticles] = (G4INCL::Short_t)(*i)->getZ();
1054 eventInfo->S[eventInfo->nParticles] = (G4INCL::Short_t)(*i)->getS();
1055 eventInfo->emissionTime[eventInfo->nParticles] = (*i)->getEmissionTime();
1056 eventInfo->EKin[eventInfo->nParticles] = (*i)->getKineticEnergy();
1057 ThreeVector mom = (*i)->getMomentum();
1058 eventInfo->px[eventInfo->nParticles] = mom.getX();
1059 eventInfo->py[eventInfo->nParticles] = mom.getY();
1060 eventInfo->pz[eventInfo->nParticles] = mom.getZ();
1061 eventInfo->theta[eventInfo->nParticles] = Math::toDegrees(mom.theta());
1062 eventInfo->phi[eventInfo->nParticles] = Math::toDegrees(mom.phi());
1063 eventInfo->origin[eventInfo->nParticles] = -1;
1064 eventInfo->parentResonancePDGCode[eventInfo->nParticles] = (*i)->getParentResonancePDGCode();
1065 eventInfo->parentResonanceID[eventInfo->nParticles] = (*i)->getParentResonanceID();
1066 eventInfo->history.push_back("");
1067 if ((*i)->getType() != Composite) {
1068 ParticleSpecies pt((*i)->getType());
1069 eventInfo->PDGCode[eventInfo->nParticles] = pt.getPDGCode();
1070 }
1071 else {
1072 ParticleSpecies pt((*i)->getA(), (*i)->getZ(), (*i)->getS());
1073 eventInfo->PDGCode[eventInfo->nParticles] = pt.getPDGCode();
1074 }
1075 eventInfo->nParticles++;
1076 }
1077 eventInfo->nucleonAbsorption = isNucleonAbsorption;
1078 eventInfo->pionAbsorption = isPionAbsorption;
1079 eventInfo->nCascadeParticles = eventInfo->nParticles;
1080
1081 // Projectile-like remnant characteristics
1082 if(theProjectileRemnant && theProjectileRemnant->getA()>0) {
1083 eventInfo->ARem[eventInfo->nRemnants] = (G4INCL::Short_t)theProjectileRemnant->getA();
1084 eventInfo->ZRem[eventInfo->nRemnants] = (G4INCL::Short_t)theProjectileRemnant->getZ();
1085 eventInfo->SRem[eventInfo->nRemnants] = (G4INCL::Short_t)theProjectileRemnant->getS();
1086 G4double eStar = theProjectileRemnant->getExcitationEnergy();
1087 if(std::abs(eStar)<1E-10)
1088 eStar = 0.0; // blame rounding and set the excitation energy to zero
1089 eventInfo->EStarRem[eventInfo->nRemnants] = eStar;
1090 if(eventInfo->EStarRem[eventInfo->nRemnants]<0.) {
1091 INCL_WARN("Negative excitation energy in projectile-like remnant! EStarRem = " << eventInfo->EStarRem[eventInfo->nRemnants] << '\n');
1092 }
1093 const ThreeVector &spin = theProjectileRemnant->getSpin();
1094 if(eventInfo->ARem[eventInfo->nRemnants]%2==0) { // even-A nucleus
1095 eventInfo->JRem[eventInfo->nRemnants] = (G4int) (spin.mag()/PhysicalConstants::hc + 0.5);
1096 } else { // odd-A nucleus
1097 eventInfo->JRem[eventInfo->nRemnants] = ((G4int) (spin.mag()/PhysicalConstants::hc)) + 0.5;
1098 }
1099 eventInfo->EKinRem[eventInfo->nRemnants] = theProjectileRemnant->getKineticEnergy();
1100 const ThreeVector &mom = theProjectileRemnant->getMomentum();
1101 eventInfo->pxRem[eventInfo->nRemnants] = mom.getX();
1102 eventInfo->pyRem[eventInfo->nRemnants] = mom.getY();
1103 eventInfo->pzRem[eventInfo->nRemnants] = mom.getZ();
1104 eventInfo->jxRem[eventInfo->nRemnants] = spin.getX() / PhysicalConstants::hc;
1105 eventInfo->jyRem[eventInfo->nRemnants] = spin.getY() / PhysicalConstants::hc;
1106 eventInfo->jzRem[eventInfo->nRemnants] = spin.getZ() / PhysicalConstants::hc;
1107 eventInfo->thetaRem[eventInfo->nRemnants] = Math::toDegrees(mom.theta());
1108 eventInfo->phiRem[eventInfo->nRemnants] = Math::toDegrees(mom.phi());
1109 eventInfo->nRemnants++;
1110 }
1111
1112 // Target-like remnant characteristics
1113 if(hasRemnant()) {
1114 eventInfo->ARem[eventInfo->nRemnants] = (G4INCL::Short_t)getA();
1115 eventInfo->ZRem[eventInfo->nRemnants] = (G4INCL::Short_t)getZ();
1116 eventInfo->SRem[eventInfo->nRemnants] = (G4INCL::Short_t)getS();
1117 eventInfo->EStarRem[eventInfo->nRemnants] = getExcitationEnergy();
1118 if(eventInfo->EStarRem[eventInfo->nRemnants]<0.) {
1119 INCL_WARN("Negative excitation energy in target-like remnant! EStarRem = " << eventInfo->EStarRem[eventInfo->nRemnants] << " eventNumber=" << eventInfo->eventNumber << '\n');
1120 }
1121 const ThreeVector &spin = getSpin();
1122 if(eventInfo->ARem[eventInfo->nRemnants]%2==0) { // even-A nucleus
1123 eventInfo->JRem[eventInfo->nRemnants] = (G4int) (spin.mag()/PhysicalConstants::hc + 0.5);
1124 } else { // odd-A nucleus
1125 eventInfo->JRem[eventInfo->nRemnants] = ((G4int) (spin.mag()/PhysicalConstants::hc)) + 0.5;
1126 }
1127 eventInfo->EKinRem[eventInfo->nRemnants] = getKineticEnergy();
1128 const ThreeVector &mom = getMomentum();
1129 eventInfo->pxRem[eventInfo->nRemnants] = mom.getX();
1130 eventInfo->pyRem[eventInfo->nRemnants] = mom.getY();
1131 eventInfo->pzRem[eventInfo->nRemnants] = mom.getZ();
1132 eventInfo->jxRem[eventInfo->nRemnants] = spin.getX() / PhysicalConstants::hc;
1133 eventInfo->jyRem[eventInfo->nRemnants] = spin.getY() / PhysicalConstants::hc;
1134 eventInfo->jzRem[eventInfo->nRemnants] = spin.getZ() / PhysicalConstants::hc;
1135 eventInfo->thetaRem[eventInfo->nRemnants] = Math::toDegrees(mom.theta());
1136 eventInfo->phiRem[eventInfo->nRemnants] = Math::toDegrees(mom.phi());
1137 eventInfo->nRemnants++;
1138 }
1139
1140 // Global counters, flags, etc.
1141 Book const &theBook = theStore->getBook();
1142 eventInfo->nCollisions = theBook.getAcceptedCollisions();
1143 eventInfo->nBlockedCollisions = theBook.getBlockedCollisions();
1144 eventInfo->nDecays = theBook.getAcceptedDecays();
1145 eventInfo->nBlockedDecays = theBook.getBlockedDecays();
1146 eventInfo->firstCollisionTime = theBook.getFirstCollisionTime();
1147 eventInfo->firstCollisionXSec = theBook.getFirstCollisionXSec();
1148 eventInfo->firstCollisionSpectatorPosition = theBook.getFirstCollisionSpectatorPosition();
1149 eventInfo->firstCollisionSpectatorMomentum = theBook.getFirstCollisionSpectatorMomentum();
1150 eventInfo->firstCollisionIsElastic = theBook.getFirstCollisionIsElastic();
1151 eventInfo->nReflectionAvatars = theBook.getAvatars(SurfaceAvatarType);
1152 eventInfo->nCollisionAvatars = theBook.getAvatars(CollisionAvatarType);
1153 eventInfo->nDecayAvatars = theBook.getAvatars(DecayAvatarType);
1154 eventInfo->nEnergyViolationInteraction = theBook.getEnergyViolationInteraction();
1155 }
G4int getAcceptedCollisions() const
Definition: G4INCLBook.hh:100
ThreeVector const & getSpin() const
Get the spin of the nucleus.
G4double getExcitationEnergy() const
Get the excitation energy of the cluster.
Store * getStore() const
G4double getExcitationEnergy() const
Get the excitation energy of the nucleus.
G4bool hasRemnant() const
Does the nucleus give a cascade remnant?
G4int getS() const
Returns the strangeness number.
G4int getZ() const
Returns the charge number.
G4double getKineticEnergy() const
Get the particle kinetic energy.
G4int getA() const
Returns the baryon number.
G4double getX() const
G4double toDegrees(G4double radians)
const G4double hc
[MeV*fm]
short Short_t
@ SurfaceAvatarType
@ CollisionAvatarType
@ DecayAvatarType

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

1213 {
1214 // Deal with the projectile remnant
1215 const G4int prA = theProjectileRemnant->getA();
1216 if(prA>=1) {
1217 // Set the mass
1218 const G4double aMass = theProjectileRemnant->getInvariantMass();
1219 theProjectileRemnant->setMass(aMass);
1220
1221 // Compute the excitation energy from the invariant mass
1222 const G4double anExcitationEnergy = aMass
1223 - ParticleTable::getTableMass(prA, theProjectileRemnant->getZ(), theProjectileRemnant->getS());
1224
1225 // Set the excitation energy
1226 theProjectileRemnant->setExcitationEnergy(anExcitationEnergy);
1227
1228 // No spin!
1229 theProjectileRemnant->setSpin(ThreeVector());
1230
1231 // Set the emission time
1232 theProjectileRemnant->setEmissionTime(anEmissionTime);
1233 }
1234 }
void setExcitationEnergy(const G4double e)
Set the excitation energy of the cluster.
void setSpin(const ThreeVector &j)
Set the spin of the nucleus.
void setEmissionTime(G4double t)
G4double getInvariantMass() const
Get the the particle invariant mass.

◆ getConservationBalance()

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

Compute charge, mass, energy and momentum balance.

Definition at line 1157 of file G4INCLNucleus.cc.

1157 {
1158 ConservationBalance theBalance;
1159 // Initialise balance variables with the incoming values
1160 theBalance.Z = theEventInfo.Zp + theEventInfo.Zt;
1161 theBalance.A = theEventInfo.Ap + theEventInfo.At;
1162 theBalance.S = theEventInfo.Sp + theEventInfo.St;
1163
1164 theBalance.energy = getInitialEnergy();
1165 theBalance.momentum = getIncomingMomentum();
1166
1167 // Process outgoing particles
1168 ParticleList const &outgoingParticles = theStore->getOutgoingParticles();
1169 for(ParticleIter i=outgoingParticles.begin(), e=outgoingParticles.end(); i!=e; ++i ) {
1170 theBalance.Z -= (*i)->getZ();
1171 theBalance.A -= (*i)->getA();
1172 theBalance.S -= (*i)->getS();
1173 // For outgoing clusters, the total energy automatically includes the
1174 // excitation energy
1175 theBalance.energy -= (*i)->getEnergy(); // Note that outgoing particles should have the real mass
1176 theBalance.momentum -= (*i)->getMomentum();
1177 }
1178
1179 // Projectile-like remnant contribution, if present
1180 if(theProjectileRemnant && theProjectileRemnant->getA()>0) {
1181 theBalance.Z -= theProjectileRemnant->getZ();
1182 theBalance.A -= theProjectileRemnant->getA();
1183 theBalance.S -= theProjectileRemnant->getS();
1184 theBalance.energy -= ParticleTable::getTableMass(theProjectileRemnant->getA(),theProjectileRemnant->getZ(),theProjectileRemnant->getS()) +
1185 theProjectileRemnant->getExcitationEnergy();
1186 theBalance.energy -= theProjectileRemnant->getKineticEnergy();
1187 theBalance.momentum -= theProjectileRemnant->getMomentum();
1188 }
1189
1190 // Target-like remnant contribution, if present
1191 if(hasRemnant()) {
1192 theBalance.Z -= getZ();
1193 theBalance.A -= getA();
1194 theBalance.S -= getS();
1195 theBalance.energy -= ParticleTable::getTableMass(getA(),getZ(),getS()) +
1197 if(afterRecoil)
1198 theBalance.energy -= getKineticEnergy();
1199 theBalance.momentum -= getMomentum();
1200 }
1201
1202 return theBalance;
1203 }
const ThreeVector & getIncomingMomentum() const
Get the incoming momentum vector.
G4double getInitialEnergy() const
Get the initial energy.

◆ getDensity()

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

Getter for theDensity.

Definition at line 470 of file G4INCLNucleus.hh.

470{ return theDensity; };

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

◆ getExcitationEnergy()

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

Get the excitation energy of the nucleus.

Method computeRecoilKinematics() should be called first.

Definition at line 284 of file G4INCLNucleus.hh.

284{ return theExcitationEnergy; }

Referenced by fillEventInfo(), and getConservationBalance().

◆ getIncomingAngularMomentum()

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

Get the incoming angular-momentum vector.

Definition at line 262 of file G4INCLNucleus.hh.

262{ return incomingAngularMomentum; }

◆ getIncomingMomentum()

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

Get the incoming momentum vector.

Definition at line 270 of file G4INCLNucleus.hh.

270 {
271 return incomingMomentum;
272 }

Referenced by getConservationBalance().

◆ getInitialA()

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

Definition at line 108 of file G4INCLNucleus.hh.

108{ return theInitialA; };

◆ getInitialEnergy()

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

Get the initial energy.

Definition at line 278 of file G4INCLNucleus.hh.

278{ return initialEnergy; }

Referenced by getConservationBalance().

◆ getInitialInternalEnergy()

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

Definition at line 353 of file G4INCLNucleus.hh.

353{ return initialInternalEnergy; };

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

◆ getInitialS()

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

Definition at line 110 of file G4INCLNucleus.hh.

110{ return theInitialS; };

◆ getInitialZ()

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

Definition at line 109 of file G4INCLNucleus.hh.

109{ return theInitialZ; };

◆ getNumberOfEnteringKaons()

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

Definition at line 122 of file G4INCLNucleus.hh.

122{ return theNkaonplusInitial+theNkaonminusInitial; };

◆ getNumberOfEnteringNeutrons()

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

Definition at line 120 of file G4INCLNucleus.hh.

120{ return theNnInitial; };

◆ getNumberOfEnteringPions()

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

Definition at line 121 of file G4INCLNucleus.hh.

121{ return theNpionplusInitial+theNpionminusInitial; };

◆ getNumberOfEnteringProtons()

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

Definition at line 119 of file G4INCLNucleus.hh.

119{ return theNpInitial; };

◆ getPotential()

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

◆ getProjectileRemnant()

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

Get the projectile remnant.

Definition at line 439 of file G4INCLNucleus.hh.

439{ return theProjectileRemnant; }

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

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

402 {
403 if(particle->isNucleon() || particle->isLambda() || particle->isResonance()){
404 const G4double pr = particle->getReflectionMomentum()/thePotential->getFermiMomentum(particle);
405 if(pr>=1.)
406 return getUniverseRadius();
407 else
408 return theDensity->getMaxRFromP(particle->getType(), pr);
409 }
410 else {
411 // Temporarily set RPION = RMAX
412 return getUniverseRadius();
413 //return 0.5*(theDensity->getTransmissionRadius(particle)+getUniverseRadius());
414 }
415 }
G4double getMaxRFromP(const ParticleType t, const 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.
G4double getUniverseRadius() const
Getter for theUniverseRadius.

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

375 {
376 const G4double theTransmissionRadius = theDensity->getTransmissionRadius(p);
377 const G4double theParticleZ = p->getZ();
378 return PhysicalConstants::eSquared*(theZ-theParticleZ)*theParticleZ/theTransmissionRadius;
379 }
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 372 of file G4INCLNucleus.hh.

372{ return tryCN; }

◆ getUniverseRadius()

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

◆ hasRemnant()

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

Does the nucleus give a cascade remnant?

To be called after computeRecoilKinematics().

Definition at line 365 of file G4INCLNucleus.hh.

365{ 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 121 of file G4INCLNucleus.cc.

121 {
122 // Reset the variables connected with the projectile remnant
123 delete theProjectileRemnant;
124 theProjectileRemnant = NULL;
125
127 for(ParticleIter i=particles.begin(), e=particles.end(); i!=e; ++i) {
129 }
130 theStore->add(particles);
131 particles.clear();
132 initialInternalEnergy = computeTotalEnergy();
133 initialCenterOfMass = thePosition;
134 }
ParticleList particles
virtual void initializeParticles()
Initialise the NuclearDensity pointer and sample the particles.
void updatePotentialEnergy(Particle *p) const
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 83 of file G4INCLNucleus.hh.

83 {
84 theZ += p->getZ();
85 theA += p->getA();
86 theS += p->getS();
87 theStore->particleHasEntered(p);
88 if(p->isNucleon()) {
89 theNpInitial += Math::heaviside(ParticleTable::getIsospin(p->getType()));
90 theNnInitial += Math::heaviside(-ParticleTable::getIsospin(p->getType()));
91 }
92 if(p->isPion()) {
93 theNpionplusInitial += Math::heaviside(ParticleTable::getIsospin(p->getType()));
94 theNpionminusInitial += Math::heaviside(-ParticleTable::getIsospin(p->getType()));
95 }
96 if(p->isKaon() || p->isAntiKaon()) {
97 theNkaonplusInitial += Math::heaviside(ParticleTable::getIsospin(p->getType()));
98 theNkaonminusInitial += Math::heaviside(-ParticleTable::getIsospin(p->getType()));
99 }
100 if(!p->isTargetSpectator()) theStore->getBook().incrementCascading();
101 };
void incrementCascading()
Definition: G4INCLBook.hh:77
void particleHasEntered(Particle *const particle)
Move a particle from incoming to inside.
Definition: G4INCLStore.cc:188
G4int heaviside(G4int n)
G4int getIsospin(const ParticleType t)
Get the isospin of a particle.

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

840 {
841
842 Book const &theBook = theStore->getBook();
843 const G4int nEventCollisions = theBook.getAcceptedCollisions();
844 const G4int nEventDecays = theBook.getAcceptedDecays();
845 const G4int nEventClusters = theBook.getEmittedClusters();
846 if(nEventCollisions==0 && nEventDecays==0 && nEventClusters==0)
847 return true;
848
849 return false;
850
851 }

◆ isNucleusNucleusCollision()

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

Is it a nucleus-nucleus collision?

Definition at line 424 of file G4INCLNucleus.hh.

424{ return isNucleusNucleus; }

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

◆ operator=()

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

Dummy assignment operator to silence Coverity warning.

◆ print()

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

Print the nucleus info

Definition at line 288 of file G4INCLNucleus.cc.

289 {
290 std::stringstream ss;
291 ss << "Particles in the nucleus:" << '\n'
292 << "Inside:" << '\n';
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 << '\n'
297 << (*p)->print();
298 counter++;
299 }
300 ss <<"Outgoing:" << '\n';
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 }

◆ propagateParticles()

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

Propagate the particles one time step.

Parameters
steplength of the time step

Definition at line 214 of file G4INCLNucleus.cc.

214 {
215 INCL_WARN("Useless Nucleus::propagateParticles -method called." << '\n');
216 }

◆ setDensity()

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

Setter for theDensity.

Definition at line 463 of file G4INCLNucleus.hh.

463 {
464 theDensity=d;
466 theParticleSampler->setDensity(theDensity);
467 };

◆ setIncomingAngularMomentum()

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

Set the incoming angular-momentum vector.

Definition at line 257 of file G4INCLNucleus.hh.

257 {
258 incomingAngularMomentum = j;
259 }

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

265 {
266 incomingMomentum = p;
267 }

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

275{ 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 427 of file G4INCLNucleus.hh.

427{ isNucleusNucleus=true; }

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

◆ setParticleNucleusCollision()

void G4INCL::Nucleus::setParticleNucleusCollision ( )
inline

Set a particle-nucleus collision.

Definition at line 430 of file G4INCLNucleus.hh.

430{ isNucleusNucleus=false; }

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

◆ setProjectileRemnant()

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

Set the projectile remnant.

Definition at line 433 of file G4INCLNucleus.hh.

433 {
434 delete theProjectileRemnant;
435 theProjectileRemnant = c;
436 }

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

◆ setStore()

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

Definition at line 348 of file G4INCLNucleus.hh.

348 {
349 delete theStore;
350 theStore = str;
351 };

◆ setUniverseRadius()

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

Setter for theUniverseRadius.

Definition at line 421 of file G4INCLNucleus.hh.

421{ theUniverseRadius=universeRadius; }

◆ updatePotentialEnergy()

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

Update the particle potential energy.

Definition at line 458 of file G4INCLNucleus.hh.

458 {
459 p->setPotentialEnergy(thePotential->computePotentialEnergy(p));
460 }
virtual G4double computePotentialEnergy(const Particle *const p) const =0

Referenced by G4INCL::ReflectionChannel::fillFinalState(), and initializeParticles().

◆ useFusionKinematics()

void G4INCL::Nucleus::useFusionKinematics ( )

Adjust the kinematics for complete-fusion events.

Definition at line 1205 of file G4INCLNucleus.cc.

1205 {
1206 setEnergy(initialEnergy);
1207 setMomentum(incomingMomentum);
1208 setSpin(incomingAngularMomentum);
1211 }
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: