Geant4  9.6.p02
 All Classes 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 
73  void initializeParticles();
74 
77  theZ += p->getZ();
78  theA += p->getA();
79  theStore->particleHasEntered(p);
80  if(p->isNucleon()) {
81  theNpInitial += Math::heaviside(ParticleTable::getIsospin(p->getType()));
82  theNnInitial += Math::heaviside(-ParticleTable::getIsospin(p->getType()));
83  }
84  if(!p->isTargetSpectator()) theStore->getBook()->incrementCascading();
85  };
86 
91 
92  G4int getInitialA() const { return theInitialA; };
93  G4int getInitialZ() const { return theInitialZ; };
94 
98  ParticleList const &getCreatedParticles() const { return justCreated; }
99 
103  ParticleList const &getUpdatedParticles() const { return toBeUpdated; }
104 
106  Particle *getBlockedDelta() const { return blockedDelta; }
107 
113  void propagateParticles(G4double step);
114 
115  G4int getNumberOfEnteringProtons() const { return theNpInitial; };
116  G4int getNumberOfEnteringNeutrons() const { return theNnInitial; };
117 
123  G4double S = 0.0;
124  ParticleList outgoing = theStore->getOutgoingParticles();
125  for(ParticleIter i = outgoing.begin(); i != outgoing.end(); ++i) {
126  const ParticleType t = (*i)->getType();
127  switch(t) {
128  case Proton:
129  case Neutron:
130  case DeltaPlusPlus:
131  case DeltaPlus:
132  case DeltaZero:
133  case DeltaMinus:
134  S += thePotential->getSeparationEnergy(*i);
135  break;
136  case Composite:
137  S += (*i)->getZ() * thePotential->getSeparationEnergy(Proton)
138  + ((*i)->getA() - (*i)->getZ()) * thePotential->getSeparationEnergy(Neutron);
139  break;
140  case PiPlus:
141  S += thePotential->getSeparationEnergy(Proton) - thePotential->getSeparationEnergy(Neutron);
142  break;
143  case PiMinus:
144  S += thePotential->getSeparationEnergy(Neutron) - thePotential->getSeparationEnergy(Proton);
145  break;
146  default:
147  break;
148  }
149  }
150 
151  S -= theNpInitial * thePotential->getSeparationEnergy(Proton);
152  S -= theNnInitial * thePotential->getSeparationEnergy(Neutron);
153  return S;
154  }
155 
161 
167 
173 
180  G4bool decayMe();
181 
183  void emitInsidePions();
184 
187 
193 
199 
205 
208  incomingAngularMomentum = j;
209  }
210 
212  const ThreeVector &getIncomingAngularMomentum() const { return incomingAngularMomentum; }
213 
216  incomingMomentum = p;
217  }
218 
221  return incomingMomentum;
222  }
223 
225  void setInitialEnergy(const G4double e) { initialEnergy = e; }
226 
228  G4double getInitialEnergy() const { return initialEnergy; }
229 
235 
238  ParticleList inside = theStore->getParticles();
239  for(ParticleIter i=inside.begin(); i!=inside.end(); ++i)
240  if((*i)->isDelta()) return true;
241  return false;
242  }
243 
247  std::string print();
248 
249  std::string dump();
250 
251  Store* getStore() const {return theStore; };
252  void setStore(Store *s) {
253  delete theStore;
254  theStore = s;
255  };
256 
257  G4double getInitialInternalEnergy() const { return initialInternalEnergy; };
258 
263  G4bool isEventTransparent() const;
264 
269  G4bool hasRemnant() const { return remnant; }
270 
274  // void fillEventInfo(Results::EventInfo *eventInfo);
275  void fillEventInfo(EventInfo *eventInfo);
276 
277  G4bool getTryCompoundNucleus() { return tryCN; }
278 
280  G4int getProjectileChargeNumber() const { return projectileZ; }
281 
283  G4int getProjectileMassNumber() const { return projectileA; }
284 
286  void setProjectileChargeNumber(G4int n) { projectileZ=n; }
287 
289  void setProjectileMassNumber(G4int n) { projectileA=n; }
290 
292  G4bool isForcedTransparent() { return forceTransparent; }
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->getMomentum().mag()/thePotential->getFermiMomentum(particle);
329  if(pr>=1.)
330  return getUniverseRadius();
331  else
332  return theDensity->getMaxRFromP(pr);
333  }
334  }
335 
351  if(p.theType == Composite) {
352  const G4int zp = p.theZ;
353  const G4int ap = p.theA;
354  G4double barr, radius = 0.;
355  if(zp==1 && ap==2) { // d
356  barr = 0.2565*Math::pow23((G4double)theA)-0.78;
357  radius = ParticleTable::eSquared*zp*theZ/barr - 2.5;
358  } else if((zp==1 || zp==2) && ap==3) { // t, He3
359  barr = 0.5*(0.5009*Math::pow23((G4double)theA)-1.16);
360  radius = ParticleTable::eSquared*theZ/barr - 0.5;
361  } else if(zp==2 && ap==4) { // alpha
362  barr = 0.5939*Math::pow23((G4double)theA)-1.64;
363  radius = ParticleTable::eSquared*zp*theZ/barr - 0.5;
364  } else if(zp>2) {
365  radius = getUniverseRadius();
366  }
367  if(radius<=0.) {
368  ERROR("Negative Coulomb radius! Using the universe radius" << std::endl);
369  radius = getUniverseRadius();
370  }
371  return radius;
372  } else
373  return getUniverseRadius();
374  }
375 
377  G4double getUniverseRadius() const { return theUniverseRadius; }
378 
380  void setUniverseRadius(const G4double universeRadius) { theUniverseRadius=universeRadius; }
381 
383  G4bool isNucleusNucleusCollision() const { return isNucleusNucleus; }
384 
386  void setNucleusNucleusCollision() { isNucleusNucleus=true; }
387 
389  void setParticleNucleusCollision() { isNucleusNucleus=false; }
390 
393  delete theProjectileRemnant;
394  theProjectileRemnant = c;
395  }
396 
398  ProjectileRemnant *getProjectileRemnant() const { return theProjectileRemnant; }
399 
402  delete theProjectileRemnant;
403  theProjectileRemnant = NULL;
404  }
405 
408  theStore->addToOutgoing(theProjectileRemnant->getParticles());
409  theProjectileRemnant->clearParticles();
410  }
411 
420  void finalizeProjectileRemnant(const G4double emissionTime);
421 
424  p->setPotentialEnergy(thePotential->computePotentialEnergy(p));
425  }
426 
428  NuclearDensity* getDensity() const { return theDensity; };
429 
431  NuclearPotential::INuclearPotential* getPotential() const { return thePotential; };
432 
433  private:
439  void computeOneNucleonRecoilKinematics();
440 
441  private:
442  G4int theInitialZ, theInitialA;
444  G4int theNpInitial;
446  G4int theNnInitial;
447  G4double initialInternalEnergy;
448  ThreeVector incomingAngularMomentum, incomingMomentum;
449  ThreeVector initialCenterOfMass;
450  G4bool remnant;
451 
452  ParticleList toBeUpdated;
453  ParticleList justCreated;
454  Particle *blockedDelta;
455  G4double initialEnergy;
456  Store *theStore;
457  G4bool tryCN;
458  G4bool forceTransparent;
459 
461  G4int projectileZ;
463  G4int projectileA;
464 
466  G4double theUniverseRadius;
467 
472  G4bool isNucleusNucleus;
473 
475  ProjectileRemnant *theProjectileRemnant;
476 
478  NuclearDensity *theDensity;
479 
482 
483  };
484 
485 }
486 
487 #endif /* G4INCLNUCLEUS_HH_ */