Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4INCLNucleus.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // INCL++ intra-nuclear cascade model
27 // Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
28 // Davide Mancusi, CEA
29 // Alain Boudard, CEA
30 // Sylvie Leray, CEA
31 // Joseph Cugnon, University of Liege
32 //
33 #define INCLXX_IN_GEANT4_MODE 1
34 
35 #include "globals.hh"
36 
37 /*
38  * G4INCLNucleus.hh
39  *
40  * \date Jun 5, 2009
41  * \author Pekka Kaitaniemi
42  */
43 
44 #ifndef G4INCLNUCLEUS_HH_
45 #define G4INCLNUCLEUS_HH_
46 
47 #include <list>
48 #include <string>
49 
50 #include "G4INCLParticle.hh"
51 #include "G4INCLEventInfo.hh"
52 #include "G4INCLCluster.hh"
53 #include "G4INCLFinalState.hh"
54 #include "G4INCLStore.hh"
55 #include "G4INCLGlobals.hh"
56 #include "G4INCLParticleTable.hh"
57 #include "G4INCLConfig.hh"
58 #include "G4INCLConfigEnums.hh"
59 #include "G4INCLCluster.hh"
61 
62 namespace G4INCL {
63 
64  class Nucleus : public Cluster {
65  public:
66  Nucleus(G4int mass, G4int charge, Config const * const conf, const G4double universeRadius=-1.);
67  virtual ~Nucleus();
68 
69  /// \brief Dummy copy constructor to silence Coverity warning
70  Nucleus(const Nucleus &rhs);
71 
72  /// \brief Dummy assignment operator to silence Coverity warning
73  Nucleus &operator=(const Nucleus &rhs);
74 
75  /**
76  * Call the Cluster method to generate the initial distribution of
77  * particles. At the beginning all particles are assigned as spectators.
78  */
79  void initializeParticles();
80 
81  /// \brief Insert a new particle (e.g. a projectile) in the nucleus.
83  theZ += p->getZ();
84  theA += p->getA();
85  theStore->particleHasEntered(p);
86  if(p->isNucleon()) {
87  theNpInitial += Math::heaviside(ParticleTable::getIsospin(p->getType()));
88  theNnInitial += Math::heaviside(-ParticleTable::getIsospin(p->getType()));
89  }
90  if(!p->isTargetSpectator()) theStore->getBook().incrementCascading();
91  };
92 
93  /**
94  * Apply reaction final state information to the nucleus.
95  */
97 
98  G4int getInitialA() const { return theInitialA; };
99  G4int getInitialZ() const { return theInitialZ; };
100 
101  /**
102  * Get the list of particles that were created by the last applied final state
103  */
104  ParticleList const &getCreatedParticles() const { return justCreated; }
105 
106  /**
107  * Get the list of particles that were updated by the last applied final state
108  */
109  ParticleList const &getUpdatedParticles() const { return toBeUpdated; }
110 
111  /// \brief Get the delta that could not decay
112  Particle *getBlockedDelta() const { return blockedDelta; }
113 
114  /**
115  * Propagate the particles one time step.
116  *
117  * @param step length of the time step
118  */
119  void propagateParticles(G4double step);
120 
121  G4int getNumberOfEnteringProtons() const { return theNpInitial; };
122  G4int getNumberOfEnteringNeutrons() const { return theNnInitial; };
123 
124  /** \brief Outgoing - incoming separation energies.
125  *
126  * Used by CDPP.
127  */
129  G4double S = 0.0;
130  ParticleList const &outgoing = theStore->getOutgoingParticles();
131  for(ParticleIter i=outgoing.begin(), e=outgoing.end(); i!=e; ++i) {
132  const ParticleType t = (*i)->getType();
133  switch(t) {
134  case Proton:
135  case Neutron:
136  case DeltaPlusPlus:
137  case DeltaPlus:
138  case DeltaZero:
139  case DeltaMinus:
140  S += thePotential->getSeparationEnergy(*i);
141  break;
142  case Composite:
143  S += (*i)->getZ() * thePotential->getSeparationEnergy(Proton)
144  + ((*i)->getA() - (*i)->getZ()) * thePotential->getSeparationEnergy(Neutron);
145  break;
146  case PiPlus:
147  S += thePotential->getSeparationEnergy(Proton) - thePotential->getSeparationEnergy(Neutron);
148  break;
149  case PiMinus:
150  S += thePotential->getSeparationEnergy(Neutron) - thePotential->getSeparationEnergy(Proton);
151  break;
152  default:
153  break;
154  }
155  }
156 
157  S -= theNpInitial * thePotential->getSeparationEnergy(Proton);
158  S -= theNnInitial * thePotential->getSeparationEnergy(Neutron);
159  return S;
160  }
161 
162  /** \brief Force the decay of outgoing deltas.
163  *
164  * \return true if any delta was forced to decay.
165  */
167 
168  /** \brief Force the decay of deltas inside the nucleus.
169  *
170  * \return true if any delta was forced to decay.
171  */
173 
174  /** \brief Force the decay of unstable outgoing clusters.
175  *
176  * \return true if any cluster was forced to decay.
177  */
179 
180  /** \brief Force the phase-space decay of the Nucleus.
181  *
182  * Only applied if Z==0 or Z==A.
183  *
184  * \return true if the nucleus was forced to decay.
185  */
186  G4bool decayMe();
187 
188  /// \brief Force emission of all pions inside the nucleus.
189  void emitInsidePions();
190 
191  /** \brief Compute the recoil momentum and spin of the nucleus. */
193 
194  /** \brief Compute the current center-of-mass position.
195  *
196  * \return the center-of-mass position vector [fm].
197  */
199 
200  /** \brief Compute the current total energy.
201  *
202  * \return the total energy [MeV]
203  */
205 
206  /** \brief Compute the current excitation energy.
207  *
208  * \return the excitation energy [MeV]
209  */
211 
212  /** \brief Set the incoming angular-momentum vector. */
214  incomingAngularMomentum = j;
215  }
216 
217  /** \brief Get the incoming angular-momentum vector. */
218  const ThreeVector &getIncomingAngularMomentum() const { return incomingAngularMomentum; }
219 
220  /** \brief Set the incoming momentum vector. */
222  incomingMomentum = p;
223  }
224 
225  /** \brief Get the incoming momentum vector. */
227  return incomingMomentum;
228  }
229 
230  /** \brief Set the initial energy. */
231  void setInitialEnergy(const G4double e) { initialEnergy = e; }
232 
233  /** \brief Get the initial energy. */
234  G4double getInitialEnergy() const { return initialEnergy; }
235 
236  /** \brief Get the excitation energy of the nucleus.
237  *
238  * Method computeRecoilKinematics() should be called first.
239  */
241 
242  ///\brief Returns true if the nucleus contains any deltas.
244  ParticleList const &inside = theStore->getParticles();
245  for(ParticleIter i=inside.begin(), e=inside.end(); i!=e; ++i)
246  if((*i)->isDelta()) return true;
247  return false;
248  }
249 
250  /**
251  * Print the nucleus info
252  */
253  std::string print();
254 
255  Store* getStore() const {return theStore; };
256  void setStore(Store *s) {
257  delete theStore;
258  theStore = s;
259  };
260 
261  G4double getInitialInternalEnergy() const { return initialInternalEnergy; };
262 
263  /** \brief Is the event transparent?
264  *
265  * To be called at the end of the cascade.
266  **/
267  G4bool isEventTransparent() const;
268 
269  /** \brief Does the nucleus give a cascade remnant?
270  *
271  * To be called after computeRecoilKinematics().
272  **/
273  G4bool hasRemnant() const { return remnant; }
274 
275  /**
276  * Fill the event info which contains INCL output data
277  */
278  void fillEventInfo(EventInfo *eventInfo);
279 
280  G4bool getTryCompoundNucleus() { return tryCN; }
281 
282  /// \brief Return the charge number of the projectile
283  G4int getProjectileChargeNumber() const { return projectileZ; }
284 
285  /// \brief Return the mass number of the projectile
286  G4int getProjectileMassNumber() const { return projectileA; }
287 
288  /// \brief Set the charge number of the projectile
289  void setProjectileChargeNumber(G4int n) { projectileZ=n; }
290 
291  /// \brief Set the mass number of the projectile
292  void setProjectileMassNumber(G4int n) { projectileA=n; }
293 
294  /// \brief Get the transmission barrier
296  const G4double theTransmissionRadius = theDensity->getTransmissionRadius(p);
297  const G4double theParticleZ = p->getZ();
298  return PhysicalConstants::eSquared*(theZ-theParticleZ)*theParticleZ/theTransmissionRadius;
299  }
300 
301  /// \brief Struct for conservation laws
306  };
307 
308  /// \brief Compute charge, mass, energy and momentum balance
309  ConservationBalance getConservationBalance(EventInfo const &theEventInfo, const G4bool afterRecoil) const;
310 
311  /// \brief Adjust the kinematics for complete-fusion events
312  void useFusionKinematics();
313 
314  /** \brief Get the maximum allowed radius for a given particle.
315  *
316  * Calls the NuclearDensity::getMaxRFromP() method for nucleons and deltas,
317  * and the NuclearDensity::getTrasmissionRadius() method for pions.
318  *
319  * \param particle pointer to a particle
320  * \return surface radius
321  */
322  G4double getSurfaceRadius(Particle const * const particle) const {
323  if(particle->isPion())
324  // Temporarily set RPION = RMAX
325  return getUniverseRadius();
326  //return 0.5*(theDensity->getTransmissionRadius(particle)+getUniverseRadius());
327  else {
328  const G4double pr = particle->getReflectionMomentum()/thePotential->getFermiMomentum(particle);
329  if(pr>=1.)
330  return getUniverseRadius();
331  else
332  return theDensity->getMaxRFromP(particle->getType(), pr);
333  }
334  }
335 
336  /// \brief Getter for theUniverseRadius.
337  G4double getUniverseRadius() const { return theUniverseRadius; }
338 
339  /// \brief Setter for theUniverseRadius.
340  void setUniverseRadius(const G4double universeRadius) { theUniverseRadius=universeRadius; }
341 
342  /// \brief Is it a nucleus-nucleus collision?
343  G4bool isNucleusNucleusCollision() const { return isNucleusNucleus; }
344 
345  /// \brief Set a nucleus-nucleus collision
346  void setNucleusNucleusCollision() { isNucleusNucleus=true; }
347 
348  /// \brief Set a particle-nucleus collision
349  void setParticleNucleusCollision() { isNucleusNucleus=false; }
350 
351  /// \brief Set the projectile remnant
353  delete theProjectileRemnant;
354  theProjectileRemnant = c;
355  }
356 
357  /// \brief Get the projectile remnant
358  ProjectileRemnant *getProjectileRemnant() const { return theProjectileRemnant; }
359 
360  /// \brief Delete the projectile remnant
362  delete theProjectileRemnant;
363  theProjectileRemnant = NULL;
364  }
365 
366  /** \brief Finalise the projectile remnant
367  *
368  * Complete the treatment of the projectile remnant. If it contains
369  * nucleons, assign its excitation energy and spin. Move stuff to the
370  * outgoing list, if appropriate.
371  *
372  * \param emissionTime the emission time of the projectile remnant
373  */
374  void finalizeProjectileRemnant(const G4double emissionTime);
375 
376  /// \brief Update the particle potential energy.
377  inline void updatePotentialEnergy(Particle *p) const {
378  p->setPotentialEnergy(thePotential->computePotentialEnergy(p));
379  }
380 
381  /// \brief Setter for theDensity
382  void setDensity(NuclearDensity const * const d) {
383  theDensity=d;
385  theParticleSampler->setDensity(theDensity);
386  };
387 
388  /// \brief Getter for theDensity
389  NuclearDensity const *getDensity() const { return theDensity; };
390 
391  /// \brief Getter for thePotential
392  NuclearPotential::INuclearPotential const *getPotential() const { return thePotential; };
393 
394  private:
395  /** \brief Compute the recoil kinematics for a 1-nucleon remnant.
396  *
397  * Puts the remnant nucleon on mass shell and tries to enforce approximate
398  * energy conservation by modifying the masses of the outgoing particles.
399  */
400  void computeOneNucleonRecoilKinematics();
401 
402  private:
403  G4int theInitialZ, theInitialA;
404  /// \brief The number of entering protons
405  G4int theNpInitial;
406  /// \brief The number of entering neutrons
407  G4int theNnInitial;
408  G4double initialInternalEnergy;
409  ThreeVector incomingAngularMomentum, incomingMomentum;
410  ThreeVector initialCenterOfMass;
411  G4bool remnant;
412 
413  ParticleList toBeUpdated;
414  ParticleList justCreated;
415  Particle *blockedDelta;
416  G4double initialEnergy;
417  Store *theStore;
418  G4bool tryCN;
419 
420  /// \brief The charge number of the projectile
421  G4int projectileZ;
422  /// \brief The mass number of the projectile
423  G4int projectileA;
424 
425  /// \brief The radius of the universe
426  G4double theUniverseRadius;
427 
428  /** \brief true if running a nucleus-nucleus collision
429  *
430  * Tells INCL whether to make a projectile-like pre-fragment or not.
431  */
432  G4bool isNucleusNucleus;
433 
434  /** \brief Pointer to the quasi-projectile
435  *
436  * Owned by the Nucleus object.
437  */
438  ProjectileRemnant *theProjectileRemnant;
439 
440  /// \brief Pointer to the NuclearDensity object
441  NuclearDensity const *theDensity;
442 
443  /// \brief Pointer to the NuclearPotential object
444  NuclearPotential::INuclearPotential const *thePotential;
445 
446  };
447 
448 }
449 
450 #endif /* G4INCLNUCLEUS_HH_ */
G4int getNumberOfEnteringNeutrons() const
G4int getA() const
Returns the baryon number.
ConservationBalance getConservationBalance(EventInfo const &theEventInfo, const G4bool afterRecoil) const
Compute charge, mass, energy and momentum balance.
void initializeParticles()
G4bool containsDeltas()
Returns true if the nucleus contains any deltas.
void updatePotentialEnergy(Particle *p) const
Update the particle potential energy.
G4double getReflectionMomentum() const
Return the reflection momentum.
void setIncomingAngularMomentum(const ThreeVector &j)
Set the incoming angular-momentum vector.
void setIncomingMomentum(const ThreeVector &p)
Set the incoming momentum vector.
const G4double eSquared
Coulomb conversion factor [MeV*fm].
G4int getInitialZ() const
ParticleList const & getParticles() const
Definition: G4INCLStore.hh:231
std::string print()
G4int getProjectileChargeNumber() const
Return the charge number of the projectile.
const ThreeVector & getIncomingMomentum() const
Get the incoming momentum vector.
G4double getFermiMomentum(const Particle *const p) const
Return the Fermi momentum for a particle.
virtual ~Nucleus()
const XML_Char * s
G4bool decayOutgoingClusters()
Force the decay of unstable outgoing clusters.
void setInitialEnergy(const G4double e)
Set the initial energy.
G4int heaviside(G4int n)
G4bool isNucleusNucleusCollision() const
Is it a nucleus-nucleus collision?
const char * p
Definition: xmltok.h:285
G4int getInitialA() const
void applyFinalState(FinalState *)
void setDensity(NuclearDensity const *const d)
Setter for theDensity.
G4bool isTargetSpectator() const
const ThreeVector & getIncomingAngularMomentum() const
Get the incoming angular-momentum vector.
Store * getStore() const
Class for constructing a projectile-like remnant.
void setParticleNucleusCollision()
Set a particle-nucleus collision.
G4int getProjectileMassNumber() const
Return the mass number of the projectile.
Struct for conservation laws.
G4double getSurfaceRadius(Particle const *const particle) const
Get the maximum allowed radius for a given particle.
G4bool hasRemnant() const
Does the nucleus give a cascade remnant?
Nucleus & operator=(const Nucleus &rhs)
Dummy assignment operator to silence Coverity warning.
int G4int
Definition: G4Types.hh:78
G4double getInitialInternalEnergy() const
void useFusionKinematics()
Adjust the kinematics for complete-fusion events.
G4double getInitialEnergy() const
Get the initial energy.
G4double getSeparationEnergy(const Particle *const p) const
Return the separation energy for a particle.
G4bool decayOutgoingDeltas()
Force the decay of outgoing deltas.
ParticleList const & getOutgoingParticles() const
Definition: G4INCLStore.hh:201
Simple container for output of event results.
void setDensity(NuclearDensity const *const d)
Setter for theDensity.
Book & getBook()
Definition: G4INCLStore.hh:237
bool G4bool
Definition: G4Types.hh:79
G4int getZ() const
Returns the charge number.
void setPotentialEnergy(G4double v)
Set the particle potential energy.
G4double computeSeparationEnergyBalance() const
Outgoing - incoming separation energies.
void setUniverseRadius(const G4double universeRadius)
Setter for theUniverseRadius.
G4double getExcitationEnergy() const
Get the excitation energy of the nucleus.
ParticleList const & getUpdatedParticles() const
G4double computeExcitationEnergy() const
Compute the current excitation energy.
const G4int n
G4int getNumberOfEnteringProtons() const
void deleteProjectileRemnant()
Delete the projectile remnant.
ParticleList const & getCreatedParticles() const
G4bool decayMe()
Force the phase-space decay of the Nucleus.
ParticleSampler * theParticleSampler
ThreeVector computeCenterOfMass() const
Compute the current center-of-mass position.
void incrementCascading()
Definition: G4INCLBook.hh:76
G4bool getTryCompoundNucleus()
NuclearPotential::INuclearPotential const * getPotential() const
Getter for thePotential.
G4double theExcitationEnergy
void setProjectileChargeNumber(G4int n)
Set the charge number of the projectile.
void propagateParticles(G4double step)
G4bool decayInsideDeltas()
Force the decay of deltas inside the nucleus.
void finalizeProjectileRemnant(const G4double emissionTime)
Finalise the projectile remnant.
G4double getTransmissionBarrier(Particle const *const p)
Get the transmission barrier.
G4int getIsospin(const ParticleType t)
Get the isospin of a particle.
void emitInsidePions()
Force emission of all pions inside the nucleus.
G4INCL::ParticleType getType() const
NuclearDensity const * getDensity() const
Getter for theDensity.
void setProjectileRemnant(ProjectileRemnant *const c)
Set the projectile remnant.
void setStore(Store *s)
G4bool isEventTransparent() const
Is the event transparent?
void fillEventInfo(EventInfo *eventInfo)
G4bool isNucleon() const
G4double computeTotalEnergy() const
Compute the current total energy.
ProjectileRemnant * getProjectileRemnant() const
Get the projectile remnant.
void setProjectileMassNumber(G4int n)
Set the mass number of the projectile.
G4double getUniverseRadius() const
Getter for theUniverseRadius.
void insertParticle(Particle *p)
Insert a new particle (e.g. a projectile) in the nucleus.
virtual G4double computePotentialEnergy(const Particle *const p) const =0
double G4double
Definition: G4Types.hh:76
Nucleus(G4int mass, G4int charge, Config const *const conf, const G4double universeRadius=-1.)
G4double getTransmissionRadius(Particle const *const p) const
The radius used for calculating the transmission coefficient.
void computeRecoilKinematics()
Compute the recoil momentum and spin of the nucleus.
Particle * getBlockedDelta() const
Get the delta that could not decay.
G4bool isPion() const
Is this a pion?
void setNucleusNucleusCollision()
Set a nucleus-nucleus collision.
G4double getMaxRFromP(const ParticleType t, const G4double p) const
Get the maximum allowed radius for a given momentum.
ParticleList::const_iterator ParticleIter
void particleHasEntered(Particle *const particle)
Move a particle from incoming to inside.
Definition: G4INCLStore.cc:247