Geant4 11.2.2
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., AnnihilationType AType=Def)
 
virtual ~Nucleus ()
 
 Nucleus (const Nucleus &rhs)
 Dummy copy constructor to silence Coverity warning.
 
Nucleusoperator= (const Nucleus &rhs)
 Dummy assignment operator to silence Coverity warning.
 
AnnihilationType getAType () const
 
void setAType (AnnihilationType type)
 
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
 
G4int getNumberOfEnteringantiProtons () 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.
 
AnnihilationType getAnnihilationType () const
 Getter for theAnnihilationType.
 
void setAnnihilationType (const AnnihilationType at)
 Setter for theAnnihilationType.
 
- 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
 
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
 
void setType (ParticleType t)
 
G4bool isNucleon () const
 
ParticipantType getParticipantType () const
 
void setParticipantType (ParticipantType const p)
 
G4bool isParticipant () const
 
G4bool isTargetSpectator () const
 
G4bool isProjectileSpectator () const
 
G4bool isPion () const
 Is this a pion?
 
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 a Strange?
 
G4bool isXi () const
 Is this a Xi?
 
G4bool isAntiNucleon () const
 Is this an antinucleon?
 
G4bool isAntiSigma () const
 Is this an antiSigma?
 
G4bool isAntiXi () const
 Is this an antiXi?
 
G4bool isAntiLambda () const
 Is this an antiLambda?
 
G4bool isAntiHyperon () const
 Is this an antiHyperon?
 
G4bool isAntiBaryon () const
 Is this an antiBaryon?
 
G4bool isAntiNucleonorAntiLambda () const
 Is this an antiNucleon or an antiLambda?
 
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.
 
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 getEmissionPbarQvalueCorrection (const G4int AParent, const G4int ZParent, const G4bool Victim) const
 
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 void setMomentum (const G4INCL::ThreeVector &momentum)
 
const G4INCL::ThreeVectorgetPosition () const
 
G4double getHelicity ()
 
void setHelicity (G4double h)
 
void propagate (G4double step)
 
G4int getNumberOfCollisions () const
 Return the number of collisions undergone by the particle.
 
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.
 
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 67 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.,
AnnihilationType AType = Def )

Definition at line 70 of file G4INCLNucleus.cc.

72 : Cluster(charge,mass,strangess,true),
73 theInitialZ(charge), theInitialA(mass), theInitialS(strangess),
74 theNpInitial(0), theNnInitial(0),
75 theNpionplusInitial(0), theNpionminusInitial(0),
76 theNkaonplusInitial(0), theNkaonminusInitial(0),
77 theNantiprotonInitial(0),
78 initialInternalEnergy(0.),
79 incomingAngularMomentum(0.,0.,0.), incomingMomentum(0.,0.,0.),
80 initialCenterOfMass(0.,0.,0.),
81 remnant(true),
82 initialEnergy(0.),
83 tryCN(false),
84 theUniverseRadius(universeRadius),
85 isNucleusNucleus(false),
86 theProjectileRemnant(NULL),
87 theDensity(NULL),
88 thePotential(NULL),
89 theAType(AType)
90 {
91 PotentialType potentialType;
92 G4bool pionPotential;
93 if(conf) {
94 potentialType = conf->getPotentialType();
95 pionPotential = conf->getPionPotential();
96 } else { // By default we don't use energy dependent
97 // potential. This is convenient for some tests.
98 potentialType = IsospinPotential;
99 pionPotential = true;
100 }
101
102 thePotential = NuclearPotential::createPotential(potentialType, theA, theZ, pionPotential);
103
106
107 if (theAType==PType) theDensity = NuclearDensityFactory::createDensity(theA+1, theZ+1, theS);
108 else if (theAType==NType) theDensity = NuclearDensityFactory::createDensity(theA+1, theZ, theS);
109 else
111
112 theParticleSampler->setPotential(thePotential);
113 theParticleSampler->setDensity(theDensity);
114
115 if(theUniverseRadius<0)
116 theUniverseRadius = theDensity->getMaximumRadius();
117 theStore = new Store(conf);
118 }
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 120 of file G4INCLNucleus.cc.

120 {
121 delete theStore;
123 /* We don't delete the potential and the density here any more -- Factories
124 * are caching them
125 delete thePotential;
126 delete theDensity;*/
127 }
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 152 of file G4INCLNucleus.cc.

152 {
153 if(!finalstate) // do nothing if no final state was returned
154 return;
155
156 G4double totalEnergy = 0.0;
157
158 FinalStateValidity const validity = finalstate->getValidity();
159 if(validity == ValidFS) {
160
161 ParticleList const &created = finalstate->getCreatedParticles();
162 for(ParticleIter iter=created.begin(), e=created.end(); iter!=e; ++iter) {
163 theStore->add((*iter));
164 if(!(*iter)->isOutOfWell()) {
165 totalEnergy += (*iter)->getEnergy() - (*iter)->getPotentialEnergy();
166 }
167 }
168
169 ParticleList const &deleted = finalstate->getDestroyedParticles();
170 for(ParticleIter iter=deleted.begin(), e=deleted.end(); iter!=e; ++iter) {
171 theStore->particleHasBeenDestroyed(*iter);
172 }
173
174 ParticleList const &modified = finalstate->getModifiedParticles();
175 for(ParticleIter iter=modified.begin(), e=modified.end(); iter!=e; ++iter) {
176 theStore->particleHasBeenUpdated(*iter);
177 totalEnergy += (*iter)->getEnergy() - (*iter)->getPotentialEnergy();
178 }
179
180 ParticleList const &out = finalstate->getOutgoingParticles();
181 for(ParticleIter iter=out.begin(), e=out.end(); iter!=e; ++iter) {
182 if((*iter)->isCluster()) {
183 Cluster *clusterOut = dynamic_cast<Cluster*>((*iter));
184// assert(clusterOut);
185#ifdef INCLXX_IN_GEANT4_MODE
186 if(!clusterOut)
187 continue;
188#endif
189 ParticleList const &components = clusterOut->getParticles();
190 for(ParticleIter in=components.begin(), end=components.end(); in!=end; ++in)
191 theStore->particleHasBeenEjected(*in);
192 } else {
193 theStore->particleHasBeenEjected(*iter);
194 }
195 totalEnergy += (*iter)->getEnergy(); // No potential here because the particle is gone
196 theA -= (*iter)->getA();
197 theZ -= (*iter)->getZ();
198 theS -= (*iter)->getS();
199 theStore->addToOutgoing(*iter);
200 (*iter)->setEmissionTime(theStore->getBook().getCurrentTime());
201 }
202
203 ParticleList const &entering = finalstate->getEnteringParticles();
204 for(ParticleIter iter=entering.begin(), e=entering.end(); iter!=e; ++iter) {
205 insertParticle(*iter);
206 totalEnergy += (*iter)->getEnergy() - (*iter)->getPotentialEnergy();
207 }
208
209 // actually perform the removal of the scheduled avatars
210 theStore->removeScheduledAvatars();
211 } else if(validity == ParticleBelowFermiFS || validity == ParticleBelowZeroFS) {
212 INCL_DEBUG("A Particle is entering below the Fermi sea:" << '\n' << finalstate->print() << '\n');
213 tryCN = true;
214 ParticleList const &entering = finalstate->getEnteringParticles();
215 for(ParticleIter iter=entering.begin(), e=entering.end(); iter!=e; ++iter) {
216 insertParticle(*iter);
217 }
218 }
219
220 if(validity==ValidFS &&
221 std::abs(totalEnergy - finalstate->getTotalEnergyBeforeInteraction()) > 0.1) {
222 INCL_ERROR("Energy nonconservation! Energy at the beginning of the event = "
223 << finalstate->getTotalEnergyBeforeInteraction()
224 <<" and after interaction = "
225 << totalEnergy << '\n'
226 << finalstate->print());
227 }
228 }
#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.
void add(Particle *p)
Book & getBook()
void particleHasBeenDestroyed(Particle *const)
void particleHasBeenUpdated(Particle *const)
Notify the Store about a particle update.
void removeScheduledAvatars()
Remove avatars that have been scheduled.
void particleHasBeenEjected(Particle *const)
ParticleList::const_iterator ParticleIter

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

289 {
290 ThreeVector cm(0.,0.,0.);
291 G4double totalMass = 0.0;
292 ParticleList const &inside = theStore->getParticles();
293 for(ParticleIter p=inside.begin(), e=inside.end(); p!=e; ++p) {
294 const G4double mass = (*p)->getMass();
295 cm += (*p)->getPosition() * mass;
296 totalMass += mass;
297 }
298 cm /= totalMass;
299 return cm;
300 }
ParticleList const & getParticles() const

Referenced by computeRecoilKinematics().

◆ computeExcitationEnergy()

G4double G4INCL::Nucleus::computeExcitationEnergy ( ) const

Compute the current excitation energy.

Returns
the excitation energy [MeV]

Definition at line 302 of file G4INCLNucleus.cc.

302 {
303 const G4double totalEnergy = computeTotalEnergy();
304 const G4double separationEnergies = computeSeparationEnergyBalance();
305
306G4double eSep = 0;
308} else if (getAType() == AnnihilationType::PType) {
309} else if (getAType() == AnnihilationType::NType) {
318}
319
320 if (eSep > 0. && (totalEnergy - initialInternalEnergy - separationEnergies - eSep) < 0.) {
321 INCL_DEBUG("Negative Excitation Energy due to a Nbar Annihilation process (separation energy of the nucleon annihilated...); E* = " << (totalEnergy - initialInternalEnergy - separationEnergies - eSep) << '\n');
322 }
323
324 return totalEnergy - initialInternalEnergy - separationEnergies - eSep;
325
326 }
G4double computeSeparationEnergyBalance() const
Outgoing - incoming separation energies.
G4double computeTotalEnergy() const
Compute the current total energy.
AnnihilationType getAType() const
G4double getNeutronSeparationEnergy()
Getter for neutronSeparationEnergy.
G4double getProtonSeparationEnergy()
Getter for protonSeparationEnergy.
@ NbarPTypeInFlight
@ NbarNTypeInFlight

◆ computeRecoilKinematics()

void G4INCL::Nucleus::computeRecoilKinematics ( )

Compute the recoil momentum and spin of the nucleus.

Definition at line 256 of file G4INCLNucleus.cc.

256 {
257 // If the remnant consists of only one nucleon, we need to apply a special
258 // procedure to put it on mass shell.
259 if(theA==1) {
261 computeOneNucleonRecoilKinematics();
262 remnant=false;
263 return;
264 }
265
266 // Compute the recoil momentum and angular momentum
267 theMomentum = incomingMomentum;
268 theSpin = incomingAngularMomentum;
269
270 ParticleList const &outgoing = theStore->getOutgoingParticles();
271 for(ParticleIter p=outgoing.begin(), e=outgoing.end(); p!=e; ++p) {
272 theMomentum -= (*p)->getMomentum();
273 theSpin -= (*p)->getAngularMomentum();
274 }
275 if(theProjectileRemnant) {
276 theMomentum -= theProjectileRemnant->getMomentum();
277 theSpin -= theProjectileRemnant->getAngularMomentum();
278 }
279
280 // Subtract orbital angular momentum
282 theSpin -= (thePosition-initialCenterOfMass).vector(theMomentum);
283
286 remnant=true;
287 }
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
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 137 of file G4INCLNucleus.hh.

137 {
138 G4double S = 0.0;
139 ParticleList const &outgoing = theStore->getOutgoingParticles();
140 for(ParticleIter i=outgoing.begin(), e=outgoing.end(); i!=e; ++i) {
141 const ParticleType t = (*i)->getType();
142 switch(t) {
143 case Proton:
144 case Neutron:
145 case DeltaPlusPlus:
146 case DeltaPlus:
147 case DeltaZero:
148 case DeltaMinus:
149 case Lambda:
150 case PiPlus:
151 case PiMinus:
152 case KPlus:
153 case KMinus:
154 case KZero:
155 case KZeroBar:
156 case KShort:
157 case KLong:
158 case SigmaPlus:
159 case SigmaZero:
160 case SigmaMinus:
161 case antiProton:
162 //case antiNeutron:
163 //case antiLambda:
164 S += thePotential->getSeparationEnergy(*i);
165 break;
166 case Composite:
167 S += (*i)->getZ() * thePotential->getSeparationEnergy(Proton)
168 + ((*i)->getA() + (*i)->getS() - (*i)->getZ()) * thePotential->getSeparationEnergy(Neutron)
169 - (*i)->getS() * thePotential->getSeparationEnergy(Lambda);
170 break;
171 default:
172 break;
173 }
174 }
175
176 S -= theNpInitial * thePotential->getSeparationEnergy(Proton);
177 S -= theNnInitial * thePotential->getSeparationEnergy(Neutron);
178 S -= theNpionplusInitial*thePotential->getSeparationEnergy(PiPlus);;
179 S -= theNkaonplusInitial*thePotential->getSeparationEnergy(KPlus);
180 S -= theNpionminusInitial*thePotential->getSeparationEnergy(PiMinus);
181 S -= theNkaonminusInitial*thePotential->getSeparationEnergy(KMinus);
182 S -= theNantiprotonInitial*thePotential->getSeparationEnergy(antiProton);
183 return S;
184 }
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 234 of file G4INCLNucleus.cc.

234 {
235 G4double totalEnergy = 0.0;
236 ParticleList const &inside = theStore->getParticles();
237 for(ParticleIter p=inside.begin(), e=inside.end(); p!=e; ++p) {
238 if((*p)->isNucleon()) // Ugly: we should calculate everything using total energies!
239 totalEnergy += (*p)->getKineticEnergy() - (*p)->getPotentialEnergy();
240 else if((*p)->isResonance())
241 totalEnergy += (*p)->getEnergy() - (*p)->getPotentialEnergy() - ParticleTable::effectiveNucleonMass;
242 else if((*p)->isHyperon())
243 totalEnergy += (*p)->getEnergy() - (*p)->getPotentialEnergy() - ParticleTable::getRealMass((*p)->getType());
244 else if((*p)->isAntiNucleon())
245 totalEnergy += (*p)->getEnergy() - (*p)->getPotentialEnergy() + ParticleTable::getINCLMass(Proton) - ParticleTable::getProtonSeparationEnergy();
246 else if((*p)->isAntiLambda())
247 totalEnergy += (*p)->getEnergy() - (*p)->getPotentialEnergy() + ParticleTable::getRealMass((*p)->getType()) - ParticleTable::getSeparationEnergyINCL(Lambda, theA, theZ);
248 //std::cout << ParticleTable::getRealMass((*p)->getType()) << std::endl;}
249 else
250 totalEnergy += (*p)->getEnergy() - (*p)->getPotentialEnergy();
251 }
252
253 return totalEnergy;
254 }
G4double getRealMass(const G4INCL::ParticleType t)
Get particle mass (in MeV/c^2)
G4double getINCLMass(const G4int A, const G4int Z, const G4int S)
Get INCL nuclear mass (in MeV/c^2)
G4double getSeparationEnergyINCL(const ParticleType t, const G4int, const G4int)
Return INCL's default separation energy.
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 308 of file G4INCLNucleus.hh.

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

◆ containsDeltas()

G4bool G4INCL::Nucleus::containsDeltas ( )
inline

Returns true if the nucleus contains any deltas.

Definition at line 300 of file G4INCLNucleus.hh.

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

◆ containsEtas()

G4bool G4INCL::Nucleus::containsEtas ( )
inline

Returns true if the nucleus contains any etas.

Definition at line 340 of file G4INCLNucleus.hh.

340 {
341 ParticleList const &inside = theStore->getParticles();
342 for(ParticleIter i=inside.begin(), e=inside.end(); i!=e; ++i)
343 if((*i)->isEta()) return true;
344 return false;
345 }

◆ containsKaon()

G4bool G4INCL::Nucleus::containsKaon ( )
inline

Returns true if the nucleus contains any Kaons.

Definition at line 332 of file G4INCLNucleus.hh.

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

◆ containsLambda()

G4bool G4INCL::Nucleus::containsLambda ( )
inline

Returns true if the nucleus contains any Lambda.

Definition at line 316 of file G4INCLNucleus.hh.

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

◆ containsOmegas()

G4bool G4INCL::Nucleus::containsOmegas ( )
inline

Returns true if the nucleus contains any omegas.

Definition at line 348 of file G4INCLNucleus.hh.

348 {
349 ParticleList const &inside = theStore->getParticles();
350 for(ParticleIter i=inside.begin(), e=inside.end(); i!=e; ++i)
351 if((*i)->isOmega()) return true;
352 return false;
353 }

◆ containsSigma()

G4bool G4INCL::Nucleus::containsSigma ( )
inline

Returns true if the nucleus contains any Sigma.

Definition at line 324 of file G4INCLNucleus.hh.

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

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

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

459 {
460
461 /* Transform each strange particles into a lambda
462 * Every Kaon (KPlus and KZero) are emited
463 */
464 const G4bool unphysicalRemnant = (theZ<0 || theZ>theA);
465 if(unphysicalRemnant){
467 INCL_WARN("Remnant is unphysical: Z=" << theZ << ", A=" << theA << ", too much strange particles? -> all emit" << '\n');
468 return false;
469 }
470
471 /* Build a list of particles with a strangeness == -1 except Lambda,
472 * and two other one for proton and neutron
473 */
474 ParticleList const &inside = theStore->getParticles();
475 ParticleList stranges;
476 ParticleList protons;
477 ParticleList neutrons;
478 for(ParticleIter i=inside.begin(), e=inside.end(); i!=e; ++i){
479 if((*i)->isSigma() || (*i)->isAntiKaon()) stranges.push_back((*i));
480 else if((*i)->isNucleon() && (*i)->getZ() == 1) protons.push_back((*i));
481 else if((*i)->isNucleon() && (*i)->getZ() == 0) neutrons.push_back((*i));
482 }
483
484 if((stranges.size() > protons.size()) || (stranges.size() > neutrons.size())){
485 INCL_WARN("Remnant is unphysical: Nproton=" << protons.size() << ", Nneutron=" << neutrons.size() << ", Strange particles : " << stranges.size() << '\n');
487 return false;
488 }
489
490 // Loop over the strange particles, make them absorbe
491 ParticleIter protonIter = protons.begin();
492 ParticleIter neutronIter = neutrons.begin();
493 for(ParticleIter i=stranges.begin(), e=stranges.end(); i!=e; ++i) {
494 INCL_DEBUG("Absorbe inside strange particles:" << '\n'
495 << (*i)->print() << '\n');
496 IAvatar *decay;
497 if((*i)->getType() == SigmaMinus){
498 decay = new DecayAvatar((*protonIter), (*i), 0.0, this, true);
499 ++protonIter;
500 }
501 else if((*i)->getType() == SigmaPlus){
502 decay = new DecayAvatar((*neutronIter), (*i), 0.0, this, true);
503 ++neutronIter;
504 }
505 else if(Random::shoot()*(protons.size() + neutrons.size()) < protons.size()){
506 decay = new DecayAvatar((*protonIter), (*i), 0.0, this, true);
507 ++protonIter;
508 }
509 else {
510 decay = new DecayAvatar((*neutronIter), (*i), 0.0, this, true);
511 ++neutronIter;
512 }
513 FinalState *fs = decay->getFinalState();
514 applyFinalState(fs);
515 delete fs;
516 delete decay;
517 }
518
519 return true;
520 }
void emitInsideStrangeParticles()
Force emission of all strange particles inside the nucleus.
G4double shoot()

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

698 {
699 // Do the phase-space decay only if Z=0 or N=0
700 if(theA<=1 || (theZ!=0 && (theA+theS)!=theZ))
701 return false;
702
703 ParticleList decayProducts = ClusterDecay::decay(this);
704 for(ParticleIter j=decayProducts.begin(), e=decayProducts.end(); j!=e; ++j){
705 (*j)->setBiasCollisionVector(this->getBiasCollisionVector());
706 theStore->addToOutgoing(*j);
707 }
708
709 return true;
710 }
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 673 of file G4INCLNucleus.cc.

673 {
674 ParticleList const &out = theStore->getOutgoingParticles();
675 ParticleList clusters;
676 for(ParticleIter i=out.begin(), e=out.end(); i!=e; ++i) {
677 if((*i)->isCluster()) clusters.push_back((*i));
678 }
679 if(clusters.empty()) return false;
680
681 for(ParticleIter i=clusters.begin(), e=clusters.end(); i!=e; ++i) {
682 Cluster *cluster = dynamic_cast<Cluster*>(*i); // Can't avoid using a cast here
683// assert(cluster);
684#ifdef INCLXX_IN_GEANT4_MODE
685 if(!cluster)
686 continue;
687#endif
688 cluster->deleteParticles(); // Don't need them
689 ParticleList decayProducts = ClusterDecay::decay(cluster);
690 for(ParticleIter j=decayProducts.begin(), end=decayProducts.end(); j!=end; ++j){
691 (*j)->setBiasCollisionVector(cluster->getBiasCollisionVector());
692 theStore->addToOutgoing(*j);
693 }
694 }
695 return true;
696 }

◆ decayOutgoingDeltas()

G4bool G4INCL::Nucleus::decayOutgoingDeltas ( )

Force the decay of outgoing deltas.

Returns
true if any delta was forced to decay.

Definition at line 350 of file G4INCLNucleus.cc.

350 {
351 ParticleList const &out = theStore->getOutgoingParticles();
352 ParticleList deltas;
353 for(ParticleIter i=out.begin(), e=out.end(); i!=e; ++i) {
354 if((*i)->isDelta()) deltas.push_back((*i));
355 }
356 if(deltas.empty()) return false;
357
358 for(ParticleIter i=deltas.begin(), e=deltas.end(); i!=e; ++i) {
359 INCL_DEBUG("Decay outgoing delta particle:" << '\n'
360 << (*i)->print() << '\n');
361 const ThreeVector beta = -(*i)->boostVector();
362 const G4double deltaMass = (*i)->getMass();
363
364 // Set the delta momentum to zero and sample the decay in the CM frame.
365 // This makes life simpler if we are using real particle masses.
366 (*i)->setMomentum(ThreeVector());
367 (*i)->setEnergy((*i)->getMass());
368
369 // Use a DecayAvatar
370 IAvatar *decay = new DecayAvatar((*i), 0.0, NULL);
371 FinalState *fs = decay->getFinalState();
372 Particle * const pion = fs->getCreatedParticles().front();
373 Particle * const nucleon = fs->getModifiedParticles().front();
374
375 // Adjust the decay momentum if we are using the real masses
376 const G4double decayMomentum = KinematicsUtils::momentumInCM(deltaMass,
377 nucleon->getTableMass(),
378 pion->getTableMass());
379 ThreeVector newMomentum = pion->getMomentum();
380 newMomentum *= decayMomentum / newMomentum.mag();
381
382 pion->setTableMass();
383 pion->setMomentum(newMomentum);
384 pion->adjustEnergyFromMomentum();
385 pion->setEmissionTime(nucleon->getEmissionTime());
386 pion->boost(beta);
387 pion->setBiasCollisionVector(nucleon->getBiasCollisionVector());
388
389 nucleon->setTableMass();
390 nucleon->setMomentum(-newMomentum);
391 nucleon->adjustEnergyFromMomentum();
392 nucleon->boost(beta);
393
394 theStore->addToOutgoing(pion);
395
396 delete fs;
397 delete decay;
398 }
399
400 return true;
401 }
G4double momentumInCM(Particle const *const p1, Particle const *const p2)
gives the momentum in the CM frame of two particles.
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 650 of file G4INCLNucleus.cc.

650 {
651 ParticleList const &out = theStore->getOutgoingParticles();
652 ParticleList neutralkaon;
653 for(ParticleIter i=out.begin(), e=out.end(); i!=e; ++i) {
654 if((*i)->getType() == KZero || (*i)->getType() == KZeroBar) neutralkaon.push_back((*i));
655 }
656 if(neutralkaon.empty()) return false;
657
658 for(ParticleIter i=neutralkaon.begin(), e=neutralkaon.end(); i!=e; ++i) {
659 INCL_DEBUG("Transform outgoing neutral kaon:" << '\n'
660 << (*i)->print() << '\n');
661
662 // Use a DecayAvatar
663 IAvatar *decay = new DecayAvatar((*i), 0.0, NULL);
664 FinalState *fs = decay->getFinalState();
665
666 delete fs;
667 delete decay;
668 }
669
670 return true;
671 }

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

522 {
523 ParticleList const &out = theStore->getOutgoingParticles();
524 ParticleList pionResonances;
525 for(ParticleIter i=out.begin(), e=out.end(); i!=e; ++i) {
526// if((*i)->isEta() || (*i)->isOmega()) pionResonances.push_back((*i));
527 if(((*i)->isEta() && timeThreshold > ParticleTable::getWidth(Eta)) || ((*i)->isOmega() && timeThreshold > ParticleTable::getWidth(Omega))) pionResonances.push_back((*i));
528 }
529 if(pionResonances.empty()) return false;
530
531 for(ParticleIter i=pionResonances.begin(), e=pionResonances.end(); i!=e; ++i) {
532 INCL_DEBUG("Decay outgoing pionResonances particle:" << '\n'
533 << (*i)->print() << '\n');
534 const ThreeVector beta = -(*i)->boostVector();
535 const G4double pionResonanceMass = (*i)->getMass();
536
537 // Set the pionResonance momentum to zero and sample the decay in the CM frame.
538 // This makes life simpler if we are using real particle masses.
539 (*i)->setMomentum(ThreeVector());
540 (*i)->setEnergy((*i)->getMass());
541
542 // Use a DecayAvatar
543 IAvatar *decay = new DecayAvatar((*i), 0.0, NULL);
544 FinalState *fs = decay->getFinalState();
545
546 Particle * const theModifiedParticle = fs->getModifiedParticles().front();
547 ParticleList const &created = fs->getCreatedParticles();
548 Particle * const theCreatedParticle1 = created.front();
549
550 if (created.size() == 1) {
551
552 // Adjust the decay momentum if we are using the real masses
553 const G4double decayMomentum = KinematicsUtils::momentumInCM(pionResonanceMass,theModifiedParticle->getTableMass(),theCreatedParticle1->getTableMass());
554 ThreeVector newMomentum = theCreatedParticle1->getMomentum();
555 newMomentum *= decayMomentum / newMomentum.mag();
556
557 theCreatedParticle1->setTableMass();
558 theCreatedParticle1->setMomentum(newMomentum);
559 theCreatedParticle1->adjustEnergyFromMomentum();
560 //theCreatedParticle1->setEmissionTime(nucleon->getEmissionTime());
561 theCreatedParticle1->boost(beta);
562 theCreatedParticle1->setBiasCollisionVector(theModifiedParticle->getBiasCollisionVector());
563
564 theModifiedParticle->setTableMass();
565 theModifiedParticle->setMomentum(-newMomentum);
566 theModifiedParticle->adjustEnergyFromMomentum();
567 theModifiedParticle->boost(beta);
568
569 theStore->addToOutgoing(theCreatedParticle1);
570 }
571 else if (created.size() == 2) {
572 Particle * const theCreatedParticle2 = created.back();
573
574 theCreatedParticle1->boost(beta);
575 theCreatedParticle1->setBiasCollisionVector(theModifiedParticle->getBiasCollisionVector());
576 theCreatedParticle2->boost(beta);
577 theCreatedParticle2->setBiasCollisionVector(theModifiedParticle->getBiasCollisionVector());
578 theModifiedParticle->boost(beta);
579
580 theStore->addToOutgoing(theCreatedParticle1);
581 theStore->addToOutgoing(theCreatedParticle2);
582 }
583 else {
584 INCL_ERROR("Wrong number (< 2) of created particles during the decay of a pion resonance");
585 }
586 delete fs;
587 delete decay;
588 }
589
590 return true;
591 }
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 593 of file G4INCLNucleus.cc.

593 {
594 ParticleList const &out = theStore->getOutgoingParticles();
595 ParticleList neutralsigma;
596 for(ParticleIter i=out.begin(), e=out.end(); i!=e; ++i) {
597 if((*i)->getType() == SigmaZero && timeThreshold > ParticleTable::getWidth(SigmaZero)) neutralsigma.push_back((*i));
598 }
599 if(neutralsigma.empty()) return false;
600
601 for(ParticleIter i=neutralsigma.begin(), e=neutralsigma.end(); i!=e; ++i) {
602 INCL_DEBUG("Decay outgoing neutral sigma:" << '\n'
603 << (*i)->print() << '\n');
604 const ThreeVector beta = -(*i)->boostVector();
605 const G4double neutralsigmaMass = (*i)->getMass();
606
607 // Set the neutral sigma momentum to zero and sample the decay in the CM frame.
608 // This makes life simpler if we are using real particle masses.
609 (*i)->setMomentum(ThreeVector());
610 (*i)->setEnergy((*i)->getMass());
611
612 // Use a DecayAvatar
613 IAvatar *decay = new DecayAvatar((*i), 0.0, NULL);
614 FinalState *fs = decay->getFinalState();
615
616 Particle * const theModifiedParticle = fs->getModifiedParticles().front();
617 ParticleList const &created = fs->getCreatedParticles();
618 Particle * const theCreatedParticle = created.front();
619
620 if (created.size() == 1) {
621
622 // Adjust the decay momentum if we are using the real masses
623 const G4double decayMomentum = KinematicsUtils::momentumInCM(neutralsigmaMass,theModifiedParticle->getTableMass(),theCreatedParticle->getTableMass());
624 ThreeVector newMomentum = theCreatedParticle->getMomentum();
625 newMomentum *= decayMomentum / newMomentum.mag();
626
627 theCreatedParticle->setTableMass();
628 theCreatedParticle->setMomentum(newMomentum);
629 theCreatedParticle->adjustEnergyFromMomentum();
630 theCreatedParticle->boost(beta);
631 theCreatedParticle->setBiasCollisionVector(theModifiedParticle->getBiasCollisionVector());
632
633 theModifiedParticle->setTableMass();
634 theModifiedParticle->setMomentum(-newMomentum);
635 theModifiedParticle->adjustEnergyFromMomentum();
636 theModifiedParticle->boost(beta);
637
638 theStore->addToOutgoing(theCreatedParticle);
639 }
640 else {
641 INCL_ERROR("Wrong number (!= 1) of created particles during the decay of a sigma zero");
642 }
643 delete fs;
644 delete decay;
645 }
646
647 return true;
648 }

◆ deleteProjectileRemnant()

void G4INCL::Nucleus::deleteProjectileRemnant ( )
inline

Delete the projectile remnant.

Definition at line 456 of file G4INCLNucleus.hh.

456 {
457 delete theProjectileRemnant;
458 theProjectileRemnant = NULL;
459 }

Referenced by ~Nucleus().

◆ emitInsideKaon()

G4bool G4INCL::Nucleus::emitInsideKaon ( )

Force emission of all Kaon inside the nucleus.

Definition at line 838 of file G4INCLNucleus.cc.

838 {
839 /* Forcing emissions of all Kaon (not antiKaons) in the nucleus.
840 * This probably violates energy conservation
841 * (although the computation of the recoil kinematics
842 * might sweep this under the carpet).
843 */
844 INCL_DEBUG("Forcing emissions of all Kaon in the nucleus." << '\n');
845
846 // Emit the Kaon with this kinetic energy (not supposed to append
847 const G4double tinyEnergy = 0.1; // MeV
848
849 // Push out the emitted kaon
850 ParticleList const &inside = theStore->getParticles();
851 ParticleList toEject;
852 for(ParticleIter i=inside.begin(), e=inside.end(); i!=e; ++i) {
853 if((*i)->isKaon()) {
854 Particle * const theKaon = *i;
855 INCL_DEBUG("Forcing emission of the following particle: "
856 << theKaon->print() << '\n');
857 theKaon->setEmissionTime(theStore->getBook().getCurrentTime());
858 // Correction for real masses
859 const G4double theQValueCorrection = theKaon->getEmissionQValueCorrection(theA,theZ,theS);
860 const G4double kineticEnergyOutside = theKaon->getKineticEnergy() - theKaon->getPotentialEnergy() + theQValueCorrection;
861 theKaon->setTableMass();
862 if(kineticEnergyOutside > 0.0)
863 theKaon->setEnergy(theKaon->getMass()+kineticEnergyOutside);
864 else
865 theKaon->setEnergy(theKaon->getMass()+tinyEnergy);
866 theKaon->adjustMomentumFromEnergy();
867 theKaon->setPotentialEnergy(0.);
868 theZ -= theKaon->getZ();
869 theS -= theKaon->getS();
870 toEject.push_back(theKaon);
871 }
872 }
873 for(ParticleIter i=toEject.begin(), e=toEject.end(); i!=e; ++i) {
874 theStore->particleHasBeenEjected(*i);
875 theStore->addToOutgoing(*i);
876 (*i)->setParticleBias(Particle::getTotalBias());
877 }
878 theNKaon -= 1;
879 return toEject.size() != 0;
880 }
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 795 of file G4INCLNucleus.cc.

795 {
796 /* Forcing emissions of all Lambda in the nucleus.
797 * This probably violates energy conservation
798 * (although the computation of the recoil kinematics
799 * might sweep this under the carpet).
800 */
801 INCL_DEBUG("Forcing emissions of all Lambda in the nucleus." << '\n');
802
803 // Emit the Lambda with this kinetic energy
804 const G4double tinyEnergy = 0.1; // MeV
805
806 // Push out the emitted Lambda
807 ParticleList const &inside = theStore->getParticles();
808 ParticleList toEject;
809 for(ParticleIter i=inside.begin(), e=inside.end(); i!=e; ++i) {
810 if((*i)->isLambda()) {
811 Particle * const theLambda = *i;
812 INCL_DEBUG("Forcing emission of the following particle: "
813 << theLambda->print() << '\n');
814 theLambda->setEmissionTime(theStore->getBook().getCurrentTime());
815 // Correction for real masses
816 const G4double theQValueCorrection = theLambda->getEmissionQValueCorrection(theA,theZ,theS); // Does it work for strange particles? Should be check
817 const G4double kineticEnergyOutside = theLambda->getKineticEnergy() - theLambda->getPotentialEnergy() + theQValueCorrection;
818 theLambda->setTableMass();
819 if(kineticEnergyOutside > 0.0)
820 theLambda->setEnergy(theLambda->getMass()+kineticEnergyOutside);
821 else
822 theLambda->setEnergy(theLambda->getMass()+tinyEnergy);
823 theLambda->adjustMomentumFromEnergy();
824 theLambda->setPotentialEnergy(0.);
825 theA -= theLambda->getA();
826 theS -= theLambda->getS();
827 toEject.push_back(theLambda);
828 }
829 }
830 for(ParticleIter i=toEject.begin(), e=toEject.end(); i!=e; ++i) {
831 theStore->particleHasBeenEjected(*i);
832 theStore->addToOutgoing(*i);
833 (*i)->setParticleBias(Particle::getTotalBias());
834 }
835 return (G4int)toEject.size();
836 }
int G4int
Definition G4Types.hh:85

◆ emitInsidePions()

void G4INCL::Nucleus::emitInsidePions ( )

Force emission of all pions inside the nucleus.

Definition at line 712 of file G4INCLNucleus.cc.

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

Referenced by computeRecoilKinematics(), and decayInsideDeltas().

◆ emitInsideStrangeParticles()

void G4INCL::Nucleus::emitInsideStrangeParticles ( )

Force emission of all strange particles inside the nucleus.

Definition at line 752 of file G4INCLNucleus.cc.

752 {
753 /* Forcing emissions of Sigmas and antiKaons.
754 * This probably violates energy conservation
755 * (although the computation of the recoil kinematics
756 * might sweep this under the carpet).
757 */
758 INCL_DEBUG("Forcing emissions of all strange particles in the nucleus." << '\n');
759
760 // Emit the strange particles with this kinetic energy
761 const G4double tinyEnergy = 0.1; // MeV
762
763 // Push out the emitted strange particles
764 ParticleList const &inside = theStore->getParticles();
765 ParticleList toEject;
766 for(ParticleIter i=inside.begin(), e=inside.end(); i!=e; ++i) {
767 if((*i)->isSigma() || (*i)->isAntiKaon()) {
768 Particle * const theParticle = *i;
769 INCL_DEBUG("Forcing emission of the following particle: "
770 << theParticle->print() << '\n');
771 theParticle->setEmissionTime(theStore->getBook().getCurrentTime());
772 // Correction for real masses
773 const G4double theQValueCorrection = theParticle->getEmissionQValueCorrection(theA,theZ,theS); // Does it work for strange particles? should be check
774 const G4double kineticEnergyOutside = theParticle->getKineticEnergy() - theParticle->getPotentialEnergy() + theQValueCorrection;
775 theParticle->setTableMass();
776 if(kineticEnergyOutside > 0.0)
777 theParticle->setEnergy(theParticle->getMass()+kineticEnergyOutside);
778 else
779 theParticle->setEnergy(theParticle->getMass()+tinyEnergy);
780 theParticle->adjustMomentumFromEnergy();
781 theParticle->setPotentialEnergy(0.);
782 theA -= theParticle->getA();
783 theZ -= theParticle->getZ();
784 theS -= theParticle->getS();
785 toEject.push_back(theParticle);
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 }

Referenced by decayInsideStrangeParticles().

◆ fillEventInfo()

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

Fill the event info which contains INCL output data

Definition at line 1052 of file G4INCLNucleus.cc.

1052 {
1053 eventInfo->nParticles = 0;
1054 G4bool isNucleonAbsorption = false;
1055 G4bool isPionAbsorption = false;
1056 // It is possible to have pion absorption event only if the
1057 // projectile is pion.
1058 if(eventInfo->projectileType == PiPlus ||
1059 eventInfo->projectileType == PiMinus ||
1060 eventInfo->projectileType == PiZero) {
1061 isPionAbsorption = true;
1062 }
1063
1064 // Forced CN
1065 eventInfo->forcedCompoundNucleus = tryCN;
1066
1067 // Outgoing particles
1068 ParticleList const &outgoingParticles = getStore()->getOutgoingParticles();
1069
1070 // Check if we have a nucleon absorption event: nucleon projectile
1071 // and no ejected particles.
1072 if(outgoingParticles.size() == 0 &&
1073 (eventInfo->projectileType == Proton ||
1074 eventInfo->projectileType == Neutron)) {
1075 isNucleonAbsorption = true;
1076 }
1077
1078 // Reset the remnant counter
1079 eventInfo->nRemnants = 0;
1080 eventInfo->history.clear();
1081
1082 for(ParticleIter i=outgoingParticles.begin(), e=outgoingParticles.end(); i!=e; ++i ) {
1083 // We have a pion absorption event only if the projectile is
1084 // pion and there are no ejected pions.
1085 if(isPionAbsorption) {
1086 if((*i)->isPion()) {
1087 isPionAbsorption = false;
1088 }
1089 }
1090
1091 eventInfo->ParticleBias[eventInfo->nParticles] = (*i)->getParticleBias();
1092
1093#ifdef INCLXX_IN_GEANT4_MODE
1094 eventInfo->A[eventInfo->nParticles] = (G4INCL::Short_t)(*i)->getA();
1095 eventInfo->Z[eventInfo->nParticles] = (G4INCL::Short_t)(*i)->getZ();
1096 eventInfo->S[eventInfo->nParticles] = (G4INCL::Short_t)(*i)->getS();
1097#else
1098 eventInfo->A[eventInfo->nParticles] = (Short_t)(*i)->getA();
1099 eventInfo->Z[eventInfo->nParticles] = (Short_t)(*i)->getZ();
1100 eventInfo->S[eventInfo->nParticles] = (Short_t)(*i)->getS();
1101#endif
1102 eventInfo->emissionTime[eventInfo->nParticles] = (*i)->getEmissionTime();
1103 eventInfo->EKin[eventInfo->nParticles] = (*i)->getKineticEnergy();
1104 ThreeVector mom = (*i)->getMomentum();
1105 eventInfo->px[eventInfo->nParticles] = mom.getX();
1106 eventInfo->py[eventInfo->nParticles] = mom.getY();
1107 eventInfo->pz[eventInfo->nParticles] = mom.getZ();
1108 eventInfo->theta[eventInfo->nParticles] = Math::toDegrees(mom.theta());
1109 eventInfo->phi[eventInfo->nParticles] = Math::toDegrees(mom.phi());
1110 eventInfo->origin[eventInfo->nParticles] = -1;
1111#ifdef INCLXX_IN_GEANT4_MODE
1112 eventInfo->parentResonancePDGCode[eventInfo->nParticles] = (*i)->getParentResonancePDGCode();
1113 eventInfo->parentResonanceID[eventInfo->nParticles] = (*i)->getParentResonanceID();
1114#endif
1115 eventInfo->history.push_back("");
1116 if ((*i)->getType() != Composite) {
1117 ParticleSpecies pt((*i)->getType());
1118 eventInfo->PDGCode[eventInfo->nParticles] = pt.getPDGCode();
1119 }
1120 else {
1121 ParticleSpecies pt((*i)->getA(), (*i)->getZ(), (*i)->getS());
1122 eventInfo->PDGCode[eventInfo->nParticles] = pt.getPDGCode();
1123 }
1124 eventInfo->nParticles++;
1125 }
1126 eventInfo->nucleonAbsorption = isNucleonAbsorption;
1127 eventInfo->pionAbsorption = isPionAbsorption;
1128 eventInfo->nCascadeParticles = eventInfo->nParticles;
1129
1130 // Projectile-like remnant characteristics
1131 if(theProjectileRemnant && theProjectileRemnant->getA()>0) {
1132#ifdef INCLXX_IN_GEANT4_MODE
1133 eventInfo->ARem[eventInfo->nRemnants] = (G4INCL::Short_t)theProjectileRemnant->getA();
1134 eventInfo->ZRem[eventInfo->nRemnants] = (G4INCL::Short_t)theProjectileRemnant->getZ();
1135 eventInfo->SRem[eventInfo->nRemnants] = (G4INCL::Short_t)theProjectileRemnant->getS();
1136#else
1137 eventInfo->ARem[eventInfo->nRemnants] = (Short_t)theProjectileRemnant->getA();
1138 eventInfo->ZRem[eventInfo->nRemnants] = (Short_t)theProjectileRemnant->getZ();
1139 eventInfo->SRem[eventInfo->nRemnants] = (Short_t)theProjectileRemnant->getS();
1140#endif
1141 G4double eStar = theProjectileRemnant->getExcitationEnergy();
1142 if(std::abs(eStar)<1E-10)
1143 eStar = 0.0; // blame rounding and set the excitation energy to zero
1144 eventInfo->EStarRem[eventInfo->nRemnants] = eStar;
1145 if(eventInfo->EStarRem[eventInfo->nRemnants]<0.) {
1146 INCL_WARN("Negative excitation energy in projectile-like remnant! EStarRem = " << eventInfo->EStarRem[eventInfo->nRemnants] << '\n');
1147 }
1148 const ThreeVector &spin = theProjectileRemnant->getSpin();
1149 if(eventInfo->ARem[eventInfo->nRemnants]%2==0) { // even-A nucleus
1150 eventInfo->JRem[eventInfo->nRemnants] = (G4int) (spin.mag()/PhysicalConstants::hc + 0.5);
1151 } else { // odd-A nucleus
1152 eventInfo->JRem[eventInfo->nRemnants] = ((G4int) (spin.mag()/PhysicalConstants::hc)) + 0.5;
1153 }
1154 eventInfo->EKinRem[eventInfo->nRemnants] = theProjectileRemnant->getKineticEnergy();
1155 const ThreeVector &mom = theProjectileRemnant->getMomentum();
1156 eventInfo->pxRem[eventInfo->nRemnants] = mom.getX();
1157 eventInfo->pyRem[eventInfo->nRemnants] = mom.getY();
1158 eventInfo->pzRem[eventInfo->nRemnants] = mom.getZ();
1159 eventInfo->jxRem[eventInfo->nRemnants] = spin.getX() / PhysicalConstants::hc;
1160 eventInfo->jyRem[eventInfo->nRemnants] = spin.getY() / PhysicalConstants::hc;
1161 eventInfo->jzRem[eventInfo->nRemnants] = spin.getZ() / PhysicalConstants::hc;
1162 eventInfo->thetaRem[eventInfo->nRemnants] = Math::toDegrees(mom.theta());
1163 eventInfo->phiRem[eventInfo->nRemnants] = Math::toDegrees(mom.phi());
1164 eventInfo->nRemnants++;
1165 }
1166
1167 // Target-like remnant characteristics
1168 if(hasRemnant()) {
1169#ifdef INCLXX_IN_GEANT4_MODE
1170 eventInfo->ARem[eventInfo->nRemnants] = (G4INCL::Short_t)getA();
1171 eventInfo->ZRem[eventInfo->nRemnants] = (G4INCL::Short_t)getZ();
1172 eventInfo->SRem[eventInfo->nRemnants] = (G4INCL::Short_t)getS();
1173#else
1174 eventInfo->ARem[eventInfo->nRemnants] = (Short_t)getA();
1175 eventInfo->ZRem[eventInfo->nRemnants] = (Short_t)getZ();
1176 eventInfo->SRem[eventInfo->nRemnants] = (Short_t)getS();
1177#endif
1178 eventInfo->EStarRem[eventInfo->nRemnants] = getExcitationEnergy();
1179 if(eventInfo->EStarRem[eventInfo->nRemnants]<0.) {
1180 INCL_WARN("Negative excitation energy in target-like remnant! EStarRem = " << eventInfo->EStarRem[eventInfo->nRemnants] << " eventNumber=" << eventInfo->eventNumber << '\n');
1181 }
1182 const ThreeVector &spin = getSpin();
1183 if(eventInfo->ARem[eventInfo->nRemnants]%2==0) { // even-A nucleus
1184 eventInfo->JRem[eventInfo->nRemnants] = (G4int) (spin.mag()/PhysicalConstants::hc + 0.5);
1185 } else { // odd-A nucleus
1186 eventInfo->JRem[eventInfo->nRemnants] = ((G4int) (spin.mag()/PhysicalConstants::hc)) + 0.5;
1187 }
1188 eventInfo->EKinRem[eventInfo->nRemnants] = getKineticEnergy();
1189 const ThreeVector &mom = getMomentum();
1190 eventInfo->pxRem[eventInfo->nRemnants] = mom.getX();
1191 eventInfo->pyRem[eventInfo->nRemnants] = mom.getY();
1192 eventInfo->pzRem[eventInfo->nRemnants] = mom.getZ();
1193 eventInfo->jxRem[eventInfo->nRemnants] = spin.getX() / PhysicalConstants::hc;
1194 eventInfo->jyRem[eventInfo->nRemnants] = spin.getY() / PhysicalConstants::hc;
1195 eventInfo->jzRem[eventInfo->nRemnants] = spin.getZ() / PhysicalConstants::hc;
1196 eventInfo->thetaRem[eventInfo->nRemnants] = Math::toDegrees(mom.theta());
1197 eventInfo->phiRem[eventInfo->nRemnants] = Math::toDegrees(mom.phi());
1198 eventInfo->nRemnants++;
1199 }
1200
1201 // Global counters, flags, etc.
1202 Book const &theBook = theStore->getBook();
1203 eventInfo->nCollisions = theBook.getAcceptedCollisions();
1204 eventInfo->nBlockedCollisions = theBook.getBlockedCollisions();
1205 eventInfo->nDecays = theBook.getAcceptedDecays();
1206 eventInfo->nBlockedDecays = theBook.getBlockedDecays();
1207 eventInfo->firstCollisionTime = theBook.getFirstCollisionTime();
1208 eventInfo->firstCollisionXSec = theBook.getFirstCollisionXSec();
1209 eventInfo->firstCollisionSpectatorPosition = theBook.getFirstCollisionSpectatorPosition();
1210 eventInfo->firstCollisionSpectatorMomentum = theBook.getFirstCollisionSpectatorMomentum();
1211 eventInfo->firstCollisionIsElastic = theBook.getFirstCollisionIsElastic();
1212 eventInfo->nReflectionAvatars = theBook.getAvatars(SurfaceAvatarType);
1213 eventInfo->nCollisionAvatars = theBook.getAvatars(CollisionAvatarType);
1214 eventInfo->nDecayAvatars = theBook.getAvatars(DecayAvatarType);
1215 eventInfo->nEnergyViolationInteraction = theBook.getEnergyViolationInteraction();
1216 }
G4int getAcceptedCollisions() const
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 1277 of file G4INCLNucleus.cc.

1277 {
1278 // Deal with the projectile remnant
1279 const G4int prA = theProjectileRemnant->getA();
1280 if(prA>=1) {
1281 // Set the mass
1282 const G4double aMass = theProjectileRemnant->getInvariantMass();
1283 theProjectileRemnant->setMass(aMass);
1284
1285 // Compute the excitation energy from the invariant mass
1286 const G4double anExcitationEnergy = aMass
1287 - ParticleTable::getTableMass(prA, theProjectileRemnant->getZ(), theProjectileRemnant->getS());
1288
1289 // Set the excitation energy
1290 theProjectileRemnant->setExcitationEnergy(anExcitationEnergy);
1291
1292 // No spin!
1293 theProjectileRemnant->setSpin(ThreeVector());
1294
1295 // Set the emission time
1296 theProjectileRemnant->setEmissionTime(anEmissionTime);
1297 }
1298 }
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.

◆ getAnnihilationType()

AnnihilationType G4INCL::Nucleus::getAnnihilationType ( ) const
inline

Getter for theAnnihilationType.

Definition at line 490 of file G4INCLNucleus.hh.

490{ return theAType; }; //D

Referenced by G4INCL::PbarAtrestEntryChannel::ProtonIsTheVictim(), and G4INCL::StandardPropagationModel::shoot().

◆ getAType()

AnnihilationType G4INCL::Nucleus::getAType ( ) const

Definition at line 129 of file G4INCLNucleus.cc.

129 {
130 return theAType;
131 }

Referenced by computeExcitationEnergy().

◆ getConservationBalance()

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

Compute charge, mass, energy and momentum balance.

Definition at line 1220 of file G4INCLNucleus.cc.

1220 {
1221 ConservationBalance theBalance;
1222 // Initialise balance variables with the incoming values
1223 INCL_DEBUG("theEventInfo " << theEventInfo.Zt << " " << theEventInfo.At << '\n');
1224 theBalance.Z = theEventInfo.Zp + theEventInfo.Zt;
1225 theBalance.A = theEventInfo.Ap + theEventInfo.At;
1226 theBalance.S = theEventInfo.Sp + theEventInfo.St;
1227 INCL_DEBUG("theBalance Z and A " << theBalance.Z << " " << theBalance.A << '\n');
1228 theBalance.energy = getInitialEnergy();
1229 theBalance.momentum = getIncomingMomentum();
1230
1231 // Process outgoing particles
1232 ParticleList const &outgoingParticles = theStore->getOutgoingParticles();
1233 for(ParticleIter i=outgoingParticles.begin(), e=outgoingParticles.end(); i!=e; ++i ) {
1234 theBalance.Z -= (*i)->getZ();
1235 theBalance.A -= (*i)->getA();
1236 theBalance.S -= (*i)->getS();
1237 // For outgoing clusters, the total energy automatically includes the
1238 // excitation energy
1239 theBalance.energy -= (*i)->getEnergy(); // Note that outgoing particles should have the real mass
1240 theBalance.momentum -= (*i)->getMomentum();
1241 }
1242
1243 // Projectile-like remnant contribution, if present
1244 if(theProjectileRemnant && theProjectileRemnant->getA()>0) {
1245 theBalance.Z -= theProjectileRemnant->getZ();
1246 theBalance.A -= theProjectileRemnant->getA();
1247 theBalance.S -= theProjectileRemnant->getS();
1248 theBalance.energy -= ParticleTable::getTableMass(theProjectileRemnant->getA(),theProjectileRemnant->getZ(),theProjectileRemnant->getS()) +
1249 theProjectileRemnant->getExcitationEnergy();
1250 theBalance.energy -= theProjectileRemnant->getKineticEnergy();
1251 theBalance.momentum -= theProjectileRemnant->getMomentum();
1252 }
1253
1254 // Target-like remnant contribution, if present
1255 if(hasRemnant()) {
1256 theBalance.Z -= getZ();
1257 theBalance.A -= getA();
1258 theBalance.S -= getS();
1259 theBalance.energy -= ParticleTable::getTableMass(getA(),getZ(),getS()) +
1261 if(afterRecoil)
1262 theBalance.energy -= getKineticEnergy();
1263 theBalance.momentum -= getMomentum();
1264 }
1265
1266 return theBalance;
1267 }
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 484 of file G4INCLNucleus.hh.

484{ 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 297 of file G4INCLNucleus.hh.

297{ return theExcitationEnergy; }

Referenced by fillEventInfo(), and getConservationBalance().

◆ getIncomingAngularMomentum()

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

Get the incoming angular-momentum vector.

Definition at line 275 of file G4INCLNucleus.hh.

275{ return incomingAngularMomentum; }

◆ getIncomingMomentum()

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

Get the incoming momentum vector.

Definition at line 283 of file G4INCLNucleus.hh.

283 {
284 return incomingMomentum;
285 }

Referenced by getConservationBalance().

◆ getInitialA()

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

Definition at line 116 of file G4INCLNucleus.hh.

116{ return theInitialA; };

◆ getInitialEnergy()

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

Get the initial energy.

Definition at line 291 of file G4INCLNucleus.hh.

291{ return initialEnergy; }

Referenced by getConservationBalance().

◆ getInitialInternalEnergy()

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

Definition at line 367 of file G4INCLNucleus.hh.

367{ return initialInternalEnergy; };

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

◆ getInitialS()

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

Definition at line 118 of file G4INCLNucleus.hh.

118{ return theInitialS; };

◆ getInitialZ()

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

Definition at line 117 of file G4INCLNucleus.hh.

117{ return theInitialZ; };

◆ getNumberOfEnteringantiProtons()

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

Definition at line 131 of file G4INCLNucleus.hh.

131{ return theNantiprotonInitial; };

◆ getNumberOfEnteringKaons()

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

Definition at line 130 of file G4INCLNucleus.hh.

130{ return theNkaonplusInitial+theNkaonminusInitial; };

◆ getNumberOfEnteringNeutrons()

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

Definition at line 128 of file G4INCLNucleus.hh.

128{ return theNnInitial; };

◆ getNumberOfEnteringPions()

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

Definition at line 129 of file G4INCLNucleus.hh.

129{ return theNpionplusInitial+theNpionminusInitial; };

◆ getNumberOfEnteringProtons()

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

Definition at line 127 of file G4INCLNucleus.hh.

127{ 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 453 of file G4INCLNucleus.hh.

453{ 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 416 of file G4INCLNucleus.hh.

416 {
417 if(particle->isNucleon() || particle->isLambda() || particle->isResonance()){
418 const G4double pr = particle->getReflectionMomentum()/thePotential->getFermiMomentum(particle);
419 if(pr>=1.)
420 return getUniverseRadius();
421 else
422 return theDensity->getMaxRFromP(particle->getType(), pr);
423 }
424 else {
425 // Temporarily set RPION = RMAX
426 return getUniverseRadius();
427 //return 0.5*(theDensity->getTransmissionRadius(particle)+getUniverseRadius());
428 }
429 }
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 389 of file G4INCLNucleus.hh.

389 {
390 const G4double theTransmissionRadius = theDensity->getTransmissionRadius(p);
391 const G4double theParticleZ = p->getZ();
392 return PhysicalConstants::eSquared*(theZ-theParticleZ)*theParticleZ/theTransmissionRadius;
393 }
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 386 of file G4INCLNucleus.hh.

386{ return tryCN; }

◆ getUniverseRadius()

◆ hasRemnant()

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

Does the nucleus give a cascade remnant?

To be called after computeRecoilKinematics().

Definition at line 379 of file G4INCLNucleus.hh.

379{ 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 137 of file G4INCLNucleus.cc.

137 {
138 // Reset the variables connected with the projectile remnant
139 delete theProjectileRemnant;
140 theProjectileRemnant = NULL;
142
143 for(ParticleIter i=particles.begin(), e=particles.end(); i!=e; ++i) {
145 }
146 theStore->add(particles);
147 particles.clear();
148 initialInternalEnergy = computeTotalEnergy();
149 initialCenterOfMass = thePosition;
150 }
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 88 of file G4INCLNucleus.hh.

88 {
89 theZ += p->getZ();
90 theA += p->getA();
91 theS += p->getS();
92 theStore->particleHasEntered(p);
93 if(p->isNucleon()) {
94 theNpInitial += Math::heaviside(ParticleTable::getIsospin(p->getType()));
95 theNnInitial += Math::heaviside(-ParticleTable::getIsospin(p->getType()));
96 }
97 if(p->isPion()) {
98 theNpionplusInitial += Math::heaviside(ParticleTable::getIsospin(p->getType()));
99 theNpionminusInitial += Math::heaviside(-ParticleTable::getIsospin(p->getType()));
100 }
101 if(p->isKaon() || p->isAntiKaon()) {
102 theNkaonplusInitial += Math::heaviside(ParticleTable::getIsospin(p->getType()));
103 theNkaonminusInitial += Math::heaviside(-ParticleTable::getIsospin(p->getType()));
104 }
105 if(p->isAntiNucleon()) {
106 theNantiprotonInitial += Math::heaviside(ParticleTable::getIsospin(p->getType()));
107 }
108 if(!p->isTargetSpectator()) theStore->getBook().incrementCascading();
109 };
void incrementCascading()
Definition G4INCLBook.hh:77
void particleHasEntered(Particle *const particle)
Move a particle from incoming to inside.
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 882 of file G4INCLNucleus.cc.

882 {
883
884 Book const &theBook = theStore->getBook();
885 const G4int nEventCollisions = theBook.getAcceptedCollisions();
886 const G4int nEventDecays = theBook.getAcceptedDecays();
887 const G4int nEventClusters = theBook.getEmittedClusters();
888 if(nEventCollisions==0 && nEventDecays==0 && nEventClusters==0)
889 return true;
890
891 return false;
892
893 }

◆ isNucleusNucleusCollision()

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

Is it a nucleus-nucleus collision?

Definition at line 438 of file G4INCLNucleus.hh.

438{ 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 330 of file G4INCLNucleus.cc.

331 {
332 std::stringstream ss;
333 ss << "Particles in the nucleus:" << '\n'
334 << "Inside:" << '\n';
335 G4int counter = 1;
336 ParticleList const &inside = theStore->getParticles();
337 for(ParticleIter p=inside.begin(), e=inside.end(); p!=e; ++p) {
338 ss << "index = " << counter << '\n'
339 << (*p)->print();
340 counter++;
341 }
342 ss <<"Outgoing:" << '\n';
343 ParticleList const &outgoing = theStore->getOutgoingParticles();
344 for(ParticleIter p=outgoing.begin(), e=outgoing.end(); p!=e; ++p)
345 ss << (*p)->print();
346
347 return ss.str();
348 }

◆ propagateParticles()

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

Propagate the particles one time step.

Parameters
steplength of the time step

Definition at line 230 of file G4INCLNucleus.cc.

230 {
231 INCL_WARN("Useless Nucleus::propagateParticles -method called." << '\n');
232 }

◆ setAnnihilationType()

void G4INCL::Nucleus::setAnnihilationType ( const AnnihilationType at)
inline

Setter for theAnnihilationType.

Definition at line 493 of file G4INCLNucleus.hh.

493 {
494 theAType = at;
495 }; //D

◆ setAType()

void G4INCL::Nucleus::setAType ( AnnihilationType type)

Definition at line 133 of file G4INCLNucleus.cc.

133 {
134 theAType = type;
135 }

Referenced by G4INCL::BinaryCollisionAvatar::getChannel().

◆ setDensity()

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

Setter for theDensity.

Definition at line 477 of file G4INCLNucleus.hh.

477 {
478 theDensity=d;
480 theParticleSampler->setDensity(theDensity);
481 };

◆ setIncomingAngularMomentum()

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

Set the incoming angular-momentum vector.

Definition at line 270 of file G4INCLNucleus.hh.

270 {
271 incomingAngularMomentum = j;
272 }

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

◆ setIncomingMomentum()

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

Set the incoming momentum vector.

Definition at line 278 of file G4INCLNucleus.hh.

278 {
279 incomingMomentum = p;
280 }

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

◆ setInitialEnergy()

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

◆ setNucleusNucleusCollision()

void G4INCL::Nucleus::setNucleusNucleusCollision ( )
inline

Set a nucleus-nucleus collision.

Definition at line 441 of file G4INCLNucleus.hh.

441{ isNucleusNucleus=true; }

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

◆ setParticleNucleusCollision()

void G4INCL::Nucleus::setParticleNucleusCollision ( )
inline

Set a particle-nucleus collision.

Definition at line 444 of file G4INCLNucleus.hh.

444{ isNucleusNucleus=false; }

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

◆ setProjectileRemnant()

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

Set the projectile remnant.

Definition at line 447 of file G4INCLNucleus.hh.

447 {
448 delete theProjectileRemnant;
449 theProjectileRemnant = c;
450 }

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

◆ setStore()

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

Definition at line 362 of file G4INCLNucleus.hh.

362 {
363 delete theStore;
364 theStore = str;
365 };

◆ setUniverseRadius()

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

Setter for theUniverseRadius.

Definition at line 435 of file G4INCLNucleus.hh.

435{ theUniverseRadius=universeRadius; }

◆ updatePotentialEnergy()

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

Update the particle potential energy.

Definition at line 472 of file G4INCLNucleus.hh.

472 {
473 p->setPotentialEnergy(thePotential->computePotentialEnergy(p));
474 }
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 1269 of file G4INCLNucleus.cc.

1269 {
1270 setEnergy(initialEnergy);
1271 setMomentum(incomingMomentum);
1272 setSpin(incomingAngularMomentum);
1275 }
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: