Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 // Alain Boudard, CEA-Saclay, France
28 // Joseph Cugnon, University of Liege, Belgium
29 // Jean-Christophe David, CEA-Saclay, France
30 // Pekka Kaitaniemi, CEA-Saclay, France, and Helsinki Institute of Physics, Finland
31 // Sylvie Leray, CEA-Saclay, France
32 // Davide Mancusi, CEA-Saclay, France
33 //
34 #define INCLXX_IN_GEANT4_MODE 1
35 
36 #include "globals.hh"
37 
49 #ifndef G4INCLINUCLEARPOTENTIAL_HH
50 #define G4INCLINUCLEARPOTENTIAL_HH 1
51 
52 #include "G4INCLParticle.hh"
53 #include "G4INCLRandom.hh"
54 #include "G4INCLDeuteronDensity.hh"
55 #include <map>
56 // #include <cassert>
57 
58 namespace G4INCL {
59 
60  namespace NuclearPotential {
61 
63  public:
64  INuclearPotential(const G4int A, const G4int Z, const G4bool pionPot) :
65  theA(A),
66  theZ(Z),
67  pionPotential(pionPot)
68  {
69  if(pionPotential) {
70  const G4double ZOverA = ((G4double) theZ) / ((G4double) theA);
71  // As in INCL4.6, use the r0*A^(1/3) formula to estimate vc
72  const G4double r = 1.12*Math::pow13((G4double)theA);
73 
74  const G4double xsi = 1. - 2.*ZOverA;
75  const G4double vc = 1.25*PhysicalConstants::eSquared*theZ/r;
76  vPiPlus = vPionDefault + 71.*xsi - vc;
77  vPiZero = vPionDefault;
78  vPiMinus = vPionDefault - 71.*xsi + vc;
79  } else {
80  vPiPlus = 0.0;
81  vPiZero = 0.0;
82  vPiMinus = 0.0;
83  }
84  }
85 
86  virtual ~INuclearPotential() {}
87 
89  G4bool hasPionPotential() const { return pionPotential; }
90 
91  virtual G4double computePotentialEnergy(const Particle * const p) const = 0;
92 
98  inline G4double getFermiEnergy(const Particle * const p) const {
99  std::map<ParticleType, G4double>::const_iterator i = fermiEnergy.find(p->getType());
100 // assert(i!=fermiEnergy.end());
101  return i->second;
102  }
103 
109  inline G4double getFermiEnergy(const ParticleType t) const {
110  std::map<ParticleType, G4double>::const_iterator i = fermiEnergy.find(t);
111 // assert(i!=fermiEnergy.end());
112  return i->second;
113  }
114 
120  inline G4double getSeparationEnergy(const Particle * const p) const {
121  std::map<ParticleType, G4double>::const_iterator i = separationEnergy.find(p->getType());
122 // assert(i!=separationEnergy.end());
123  return i->second;
124  }
125 
131  inline G4double getSeparationEnergy(const ParticleType t) const {
132  std::map<ParticleType, G4double>::const_iterator i = separationEnergy.find(t);
133 // assert(i!=separationEnergy.end());
134  return i->second;
135  }
136 
142  inline G4double getFermiMomentum(const Particle * const p) const {
143  if(p->isDelta()) {
144  const G4double Tf = getFermiEnergy(p), m = p->getMass();
145  return std::sqrt(Tf*(Tf+2.*m));
146  } else {
147  std::map<ParticleType, G4double>::const_iterator i = fermiMomentum.find(p->getType());
148 // assert(i!=fermiMomentum.end());
149  return i->second;
150  }
151  }
152 
158  inline G4double getFermiMomentum(const ParticleType t) const {
159 // assert(t!=DeltaPlusPlus && t!=DeltaPlus && t!=DeltaZero && t!=DeltaMinus);
160  std::map<ParticleType, G4double>::const_iterator i = fermiMomentum.find(t);
161  return i->second;
162  }
163 
164  protected:
167 // assert(p->getType()==PiPlus || p->getType()==PiZero || p->getType()==PiMinus);
168  if(pionPotential && !p->isOutOfWell()) {
169  switch( p->getType() ) {
170  case PiPlus:
171  return vPiPlus;
172  break;
173  case PiZero:
174  return vPiZero;
175  break;
176  case PiMinus:
177  return vPiMinus;
178  break;
179  default: // Pion potential is defined and non-zero only for pions
180  return 0.0;
181  break;
182  }
183  }
184  else
185  return 0.0;
186  }
187 
188  protected:
191 // assert(p->getType()==Eta || p->getType()==Omega || p->getType()==EtaPrime || p->getType()==Photon);
192  if(pionPotential && !p->isOutOfWell()) {
193  switch( p->getType() ) {
194  case Eta:
195 //jcd return vPiZero;
196 //jcd return vPiZero*1.5;
197  return 0.0; // (JCD: seems to give better results)
198  break;
199  case Omega:
200  return 15.0; // S.Friedrich et al., Physics Letters B736(2014)26-32. (V. Metag in Hyperfine Interact (2015) 234:25-31 gives 29 MeV)
201  break;
202  case EtaPrime:
203  return 37.0; // V. Metag in Hyperfine Interact (2015) 234:25-31
204  break;
205  case Photon:
206  return 0.0;
207  break;
208  default:
209  return 0.0;
210  break;
211  }
212  }
213  else
214  return 0.0;
215  }
216 
217  protected:
219  const G4int theA;
221  const G4int theZ;
222  private:
223  const G4bool pionPotential;
224  G4double vPiPlus, vPiZero, vPiMinus;
225  static const G4double vPionDefault;
226  protected:
227  /* \brief map of Fermi energies per particle type */
228  std::map<ParticleType,G4double> fermiEnergy;
229  /* \brief map of Fermi momenta per particle type */
230  std::map<ParticleType,G4double> fermiMomentum;
231  /* \brief map of separation energies per particle type */
232  std::map<ParticleType,G4double> separationEnergy;
233 
234  };
235 
236 
237 
250  INuclearPotential const *createPotential(const PotentialType type, const G4int theA, const G4int theZ, const G4bool pionPotential);
251 
253  void clearCache();
254 
255  }
256 
257 }
258 
259 #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.
const char * p
Definition: xmltok.h:285
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.
double A(double temperature)
static constexpr double m
Definition: G4SIunits.hh:129
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.
G4bool hasPionPotential() const
Do we have a pion potential?
INuclearPotential(const G4int A, const G4int Z, const G4bool pionPot)
G4double computePionResonancePotentialEnergy(const Particle *const p) const
Compute the potential energy for the given pion resonances (Eta, Omega and EtaPrime and Gamma also)...
G4INCL::ParticleType getType() const
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.
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.