Geant4  10.00.p02
G4INCLINuclearPotential.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 
48 #ifndef G4INCLINUCLEARPOTENTIAL_HH
49 #define G4INCLINUCLEARPOTENTIAL_HH 1
50 
51 #include "G4INCLParticle.hh"
52 #include "G4INCLRandom.hh"
53 #include "G4INCLDeuteronDensity.hh"
54 #include <map>
55 // #include <cassert>
56 
57 namespace G4INCL {
58 
59  namespace NuclearPotential {
60 
62  public:
63  INuclearPotential(const G4int A, const G4int Z, const G4bool pionPot) :
64  theA(A),
65  theZ(Z),
66  pionPotential(pionPot)
67  {
68  if(pionPotential) {
69  const G4double ZOverA = ((G4double) theZ) / ((G4double) theA);
70  // As in INCL4.6, use the r0*A^(1/3) formula to estimate vc
71  const G4double r = 1.12*Math::pow13((G4double)theA);
72 
73  const G4double xsi = 1. - 2.*ZOverA;
74  const G4double vc = 1.25*PhysicalConstants::eSquared*theZ/r;
75  vPiPlus = vPionDefault + 71.*xsi - vc;
77  vPiMinus = vPionDefault - 71.*xsi + vc;
78  } else {
79  vPiPlus = 0.0;
80  vPiZero = 0.0;
81  vPiMinus = 0.0;
82  }
83  }
84 
85  virtual ~INuclearPotential() {}
86 
89 
90  virtual G4double computePotentialEnergy(const Particle * const p) const = 0;
91 
97  inline G4double getFermiEnergy(const Particle * const p) const {
98  std::map<ParticleType, G4double>::const_iterator i = fermiEnergy.find(p->getType());
99 // assert(i!=fermiEnergy.end());
100  return i->second;
101  }
102 
108  inline G4double getFermiEnergy(const ParticleType t) const {
109  std::map<ParticleType, G4double>::const_iterator i = fermiEnergy.find(t);
110 // assert(i!=fermiEnergy.end());
111  return i->second;
112  }
113 
119  inline G4double getSeparationEnergy(const Particle * const p) const {
120  std::map<ParticleType, G4double>::const_iterator i = separationEnergy.find(p->getType());
121 // assert(i!=separationEnergy.end());
122  return i->second;
123  }
124 
130  inline G4double getSeparationEnergy(const ParticleType t) const {
131  std::map<ParticleType, G4double>::const_iterator i = separationEnergy.find(t);
132 // assert(i!=separationEnergy.end());
133  return i->second;
134  }
135 
141  inline G4double getFermiMomentum(const Particle * const p) const {
142  if(p->isDelta()) {
143  const G4double Tf = getFermiEnergy(p), m = p->getMass();
144  return std::sqrt(Tf*(Tf+2.*m));
145  } else {
146  std::map<ParticleType, G4double>::const_iterator i = fermiMomentum.find(p->getType());
147 // assert(i!=fermiMomentum.end());
148  return i->second;
149  }
150  }
151 
157  inline G4double getFermiMomentum(const ParticleType t) const {
158 // assert(t!=DeltaPlusPlus && t!=DeltaPlus && t!=DeltaZero && t!=DeltaMinus);
159  std::map<ParticleType, G4double>::const_iterator i = fermiMomentum.find(t);
160  return i->second;
161  }
162 
163  protected:
166 // assert(p->getType()==PiPlus || p->getType()==PiZero || p->getType()==PiMinus);
167  if(pionPotential && !p->isOutOfWell()) {
168  switch( p->getType() ) {
169  case PiPlus:
170  return vPiPlus;
171  break;
172  case PiZero:
173  return vPiZero;
174  break;
175  case PiMinus:
176  return vPiMinus;
177  break;
178  default: // Pion potential is defined and non-zero only for pions
179  return 0.0;
180  break;
181  }
182  }
183  else
184  return 0.0;
185  }
186 
187  protected:
189  const G4int theA;
191  const G4int theZ;
192  private:
195  static const G4double vPionDefault;
196  protected:
197  /* \brief map of Fermi energies per particle type */
198  std::map<ParticleType,G4double> fermiEnergy;
199  /* \brief map of Fermi momenta per particle type */
200  std::map<ParticleType,G4double> fermiMomentum;
201  /* \brief map of separation energies per particle type */
202  std::map<ParticleType,G4double> separationEnergy;
203 
204  };
205 
206 
207 
220  INuclearPotential const *createPotential(const PotentialType type, const G4int theA, const G4int theZ, const G4bool pionPotential);
221 
223  void clearCache();
224 
225  }
226 
227 }
228 
229 #endif /* G4INCLINUCLEARPOTENTIAL_HH_ */
G4double getMass() const
Get the cached particle mass.
const G4double eSquared
Coulomb conversion factor [MeV*fm].
std::map< ParticleType, G4double > fermiEnergy
G4double getFermiMomentum(const Particle *const p) const
Return the Fermi momentum for a particle.
G4bool isDelta() const
Is it a Delta?
G4double getFermiEnergy(const ParticleType t) const
Return the Fermi energy for a particle type.
int G4int
Definition: G4Types.hh:78
G4double getFermiEnergy(const Particle *const p) const
Return the Fermi energy for a particle.
G4double getFermiMomentum(const ParticleType t) const
Return the Fermi momentum for a particle type.
void clearCache()
Clear the INuclearPotential cache.
G4double getSeparationEnergy(const Particle *const p) const
Return the separation energy for a particle.
Deuteron density in r and p according to the Paris potential.
G4double getSeparationEnergy(const ParticleType t) const
Return the separation energy for a particle type.
bool G4bool
Definition: G4Types.hh:79
const G4int theA
The mass number of the nucleus.
G4bool isOutOfWell() const
Check if the particle is out of its potential well.
static const G4double A[nN]
G4bool hasPionPotential() const
Do we have a pion potential?
INuclearPotential(const G4int A, const G4int Z, const G4bool pionPot)
G4INCL::ParticleType getType() const
Get the particle type.
std::map< ParticleType, G4double > separationEnergy
const G4int theZ
The charge number of the nucleus.
G4double computePionPotentialEnergy(const Particle *const p) const
Compute the potential energy for the given pion.
static const double m
Definition: G4SIunits.hh:110
virtual G4double computePotentialEnergy(const Particle *const p) const =0
double G4double
Definition: G4Types.hh:76
std::map< ParticleType, G4double > fermiMomentum
G4double pow13(G4double x)
INuclearPotential const * createPotential(const PotentialType type, const G4int theA, const G4int theZ, const G4bool pionPotential)
Create an INuclearPotential object.