Geant4_10
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 
70  Nucleus(const Nucleus &rhs);
71 
73  Nucleus &operator=(const Nucleus &rhs);
74 
79  void initializeParticles();
80 
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 
97 
98  G4int getInitialA() const { return theInitialA; };
99  G4int getInitialZ() const { return theInitialZ; };
100 
104  ParticleList const &getCreatedParticles() const { return justCreated; }
105 
109  ParticleList const &getUpdatedParticles() const { return toBeUpdated; }
110 
112  Particle *getBlockedDelta() const { return blockedDelta; }
113 
119  void propagateParticles(G4double step);
120 
121  G4int getNumberOfEnteringProtons() const { return theNpInitial; };
122  G4int getNumberOfEnteringNeutrons() const { return theNnInitial; };
123 
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 
167 
173 
179 
186  G4bool decayMe();
187 
189  void emitInsidePions();
190 
193 
199 
205 
211 
214  incomingAngularMomentum = j;
215  }
216 
218  const ThreeVector &getIncomingAngularMomentum() const { return incomingAngularMomentum; }
219 
222  incomingMomentum = p;
223  }
224 
227  return incomingMomentum;
228  }
229 
231  void setInitialEnergy(const G4double e) { initialEnergy = e; }
232 
234  G4double getInitialEnergy() const { return initialEnergy; }
235 
241 
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 
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 
267  G4bool isEventTransparent() const;
268 
273  G4bool hasRemnant() const { return remnant; }
274 
278  void fillEventInfo(EventInfo *eventInfo);
279 
280  G4bool getTryCompoundNucleus() { return tryCN; }
281 
283  G4int getProjectileChargeNumber() const { return projectileZ; }
284 
286  G4int getProjectileMassNumber() const { return projectileA; }
287 
289  void setProjectileChargeNumber(G4int n) { projectileZ=n; }
290 
292  void setProjectileMassNumber(G4int n) { projectileA=n; }
293 
296  const G4double theTransmissionRadius = theDensity->getTransmissionRadius(p);
297  const G4double theParticleZ = p->getZ();
298  return PhysicalConstants::eSquared*(theZ-theParticleZ)*theParticleZ/theTransmissionRadius;
299  }
300 
306  };
307 
309  ConservationBalance getConservationBalance(EventInfo const &theEventInfo, const G4bool afterRecoil) const;
310 
312  void useFusionKinematics();
313 
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 
337  G4double getUniverseRadius() const { return theUniverseRadius; }
338 
340  void setUniverseRadius(const G4double universeRadius) { theUniverseRadius=universeRadius; }
341 
343  G4bool isNucleusNucleusCollision() const { return isNucleusNucleus; }
344 
346  void setNucleusNucleusCollision() { isNucleusNucleus=true; }
347 
349  void setParticleNucleusCollision() { isNucleusNucleus=false; }
350 
353  delete theProjectileRemnant;
354  theProjectileRemnant = c;
355  }
356 
358  ProjectileRemnant *getProjectileRemnant() const { return theProjectileRemnant; }
359 
362  delete theProjectileRemnant;
363  theProjectileRemnant = NULL;
364  }
365 
374  void finalizeProjectileRemnant(const G4double emissionTime);
375 
377  inline void updatePotentialEnergy(Particle *p) const {
378  p->setPotentialEnergy(thePotential->computePotentialEnergy(p));
379  }
380 
382  void setDensity(NuclearDensity const * const d) {
383  theDensity=d;
385  theParticleSampler->setDensity(theDensity);
386  };
387 
389  NuclearDensity const *getDensity() const { return theDensity; };
390 
392  NuclearPotential::INuclearPotential const *getPotential() const { return thePotential; };
393 
394  private:
400  void computeOneNucleonRecoilKinematics();
401 
402  private:
403  G4int theInitialZ, theInitialA;
405  G4int theNpInitial;
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 
421  G4int projectileZ;
423  G4int projectileA;
424 
426  G4double theUniverseRadius;
427 
432  G4bool isNucleusNucleus;
433 
438  ProjectileRemnant *theProjectileRemnant;
439 
441  NuclearDensity const *theDensity;
442 
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.
Float_t d
Definition: plot.C:237
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
Definition: expat.h:262
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.
Char_t n[5]
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.
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.)
tuple c
Definition: test.py:13
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