Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
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// INCL++ revision: v5.1.8
34//
35#define INCLXX_IN_GEANT4_MODE 1
36
37#include "globals.hh"
38
39/** \file G4INCLINuclearPotential.hh
40 * \brief Abstract interface to the nuclear potential.
41 *
42 * NuclearPotential-like classes should provide access to the value of the
43 * potential of a particle in a particular context. For example, an instance of
44 * a NuclearPotential class should be associated to every nucleus.
45 *
46 * \date 17 January 2011
47 * \author Davide Mancusi
48 */
49
50#ifndef G4INCLINUCLEARPOTENTIAL_HH
51#define G4INCLINUCLEARPOTENTIAL_HH 1
52
53#include "G4INCLParticle.hh"
54#include "G4INCLRandom.hh"
56#include <map>
57// #include <cassert>
58
59namespace G4INCL {
60
61 namespace NuclearPotential {
62
64 public:
65 INuclearPotential(const G4int A, const G4int Z, const G4bool pionPot) :
66 theA(A),
67 theZ(Z),
68 pionPotential(pionPot)
69 {
70 if(pionPotential) {
71 const G4double ZOverA = ((G4double) theZ) / ((G4double) theA);
72 // As in INCL4.6, use the r0*A^(1/3) formula to estimate vc
73 const G4double r = 1.12*Math::pow13((G4double)theA);
74
75 const G4double xsi = 1. - 2.*ZOverA;
77 vPiPlus = vPionDefault + 71.*xsi - vc;
78 vPiZero = vPionDefault;
79 vPiMinus = vPionDefault - 71.*xsi + vc;
80 } else {
81 vPiPlus = 0.0;
82 vPiZero = 0.0;
83 vPiMinus = 0.0;
84 }
85 }
86
87 virtual ~INuclearPotential() {}
88
89 /// \brief Do we have a pion potential?
90 G4bool hasPionPotential() { return pionPotential; }
91
92 virtual G4double computePotentialEnergy(const Particle * const p) const = 0;
93
94 /** \brief Return the Fermi energy for a particle.
95 *
96 * \param p pointer to a Particle
97 * \return Fermi energy for that particle type
98 **/
99 inline G4double getFermiEnergy(const Particle * const p) const {
100 std::map<ParticleType, G4double>::const_iterator i = fermiEnergy.find(p->getType());
101// assert(i!=fermiEnergy.end());
102 return i->second;
103 }
104
105 /** \brief Return the Fermi energy for a particle type.
106 *
107 * \param t particle type
108 * \return Fermi energy for that particle type
109 **/
110 inline G4double getFermiEnergy(const ParticleType t) const {
111 std::map<ParticleType, G4double>::const_iterator i = fermiEnergy.find(t);
112// assert(i!=fermiEnergy.end());
113 return i->second;
114 }
115
116 /** \brief Return the separation energy for a particle.
117 *
118 * \param p pointer to a Particle
119 * \return separation energy for that particle type
120 **/
121 inline G4double getSeparationEnergy(const Particle * const p) const {
122 std::map<ParticleType, G4double>::const_iterator i = separationEnergy.find(p->getType());
123// assert(i!=separationEnergy.end());
124 return i->second;
125 }
126
127 /** \brief Return the separation energy for a particle type.
128 *
129 * \param t particle type
130 * \return separation energy for that particle type
131 **/
133 std::map<ParticleType, G4double>::const_iterator i = separationEnergy.find(t);
134// assert(i!=separationEnergy.end());
135 return i->second;
136 }
137
138 /** \brief Return the Fermi momentum for a particle.
139 *
140 * \param p pointer to a Particle
141 * \return Fermi momentum for that particle type
142 **/
143 inline G4double getFermiMomentum(const Particle * const p) const {
144 if(p->isDelta()) {
145 const G4double Tf = getFermiEnergy(p), m = p->getMass();
146 return std::sqrt(Tf*(Tf+2.*m));
147 } else {
148 std::map<ParticleType, G4double>::const_iterator i = fermiMomentum.find(p->getType());
149// assert(i!=fermiMomentum.end());
150 return i->second;
151 }
152 }
153
154 /** \brief Return the Fermi momentum for a particle type.
155 *
156 * \param t particle type
157 * \return Fermi momentum for that particle type
158 **/
159 inline G4double getFermiMomentum(const ParticleType t) const {
160// assert(t!=DeltaPlusPlus && t!=DeltaPlus && t!=DeltaZero && t!=DeltaMinus);
161 std::map<ParticleType, G4double>::const_iterator i = fermiMomentum.find(t);
162 return i->second;
163 }
164
165 protected:
166 /// \brief Compute the potential energy for the given pion.
168// assert(p->getType()==PiPlus || p->getType()==PiZero || p->getType()==PiMinus);
169 if(pionPotential && !p->isOutOfWell()) {
170 switch( p->getType() ) {
171 case PiPlus:
172 return vPiPlus;
173 break;
174 case PiZero:
175 return vPiZero;
176 break;
177 case PiMinus:
178 return vPiMinus;
179 break;
180 default: // Pion potential is defined and non-zero only for pions
181 return 0.0;
182 break;
183 }
184 }
185 else
186 return 0.0;
187 }
188
189 protected:
190 /// \brief The mass number of the nucleus
191 const G4int theA;
192 /// \brief The charge number of the nucleus
193 const G4int theZ;
194 private:
195 const G4bool pionPotential;
196 G4double vPiPlus, vPiZero, vPiMinus;
197 static const G4double vPionDefault;
198 protected:
199 /* \brief map of Fermi energies per particle type */
200 std::map<ParticleType,G4double> fermiEnergy;
201 /* \brief map of Fermi momenta per particle type */
202 std::map<ParticleType,G4double> fermiMomentum;
203 /* \brief map of separation energies per particle type */
204 std::map<ParticleType,G4double> separationEnergy;
205
206 };
207
208 }
209
210}
211
212#endif /* G4INCLINUCLEARPOTENTIAL_HH_ */
Deuteron density in r and p according to the Paris potential.
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
bool G4bool
Definition: G4Types.hh:67
G4double computePionPotentialEnergy(const Particle *const p) const
Compute the potential energy for the given pion.
std::map< ParticleType, G4double > fermiMomentum
G4double getFermiMomentum(const Particle *const p) const
Return the Fermi momentum for a particle.
G4double getSeparationEnergy(const Particle *const p) const
Return the separation energy for a particle.
const G4int theA
The mass number of the nucleus.
std::map< ParticleType, G4double > separationEnergy
virtual G4double computePotentialEnergy(const Particle *const p) const =0
G4double getSeparationEnergy(const ParticleType t) const
Return the separation energy for a particle type.
G4double getFermiMomentum(const ParticleType t) const
Return the Fermi momentum for a particle type.
G4double getFermiEnergy(const ParticleType t) const
Return the Fermi energy for a particle type.
INuclearPotential(const G4int A, const G4int Z, const G4bool pionPot)
std::map< ParticleType, G4double > fermiEnergy
G4bool hasPionPotential()
Do we have a pion potential?
G4double getFermiEnergy(const Particle *const p) const
Return the Fermi energy for a particle.
const G4int theZ
The charge number of the nucleus.
G4bool isOutOfWell() const
Check if the particle is out of its potential well.
G4INCL::ParticleType getType() const
G4double getMass() const
Get the cached particle mass.
G4bool isDelta() const
Is it a Delta?
G4double pow13(G4double x)
const G4double eSquared
Coulomb conversion factor [MeV*fm].