Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4INCLNuclearPotentialConstant.cc
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 /** \file G4INCLNuclearPotentialConstant.cc
38  * \brief Isospin- and energy-independent nuclear potential.
39  *
40  * Provides a constant nuclear potential (V0).
41  *
42  * \date 17 January 2011
43  * \author Davide Mancusi
44  */
45 
47 #include "G4INCLParticleTable.hh"
48 
49 namespace G4INCL {
50 
51  namespace NuclearPotential {
52 
53  // Constructors
54  NuclearPotentialConstant::NuclearPotentialConstant(const G4int A, const G4int Z, const G4bool aPionPotential)
55  : INuclearPotential(A, Z, aPionPotential)
56  {
57  initialize();
58  }
59 
60  // Destructor
62  }
63 
64  void NuclearPotentialConstant::initialize() {
67 
68  const G4double theFermiMomentum = ParticleTable::getFermiMomentum(theA,theZ);
69 
70  fermiMomentum[Proton] = theFermiMomentum;
71  const G4double theProtonFermiEnergy = std::sqrt(theFermiMomentum*theFermiMomentum + mp*mp) - mp;
72  fermiEnergy[Proton] = theProtonFermiEnergy;
73 
74  fermiMomentum[Neutron] = theFermiMomentum;
75  const G4double theNeutronFermiEnergy = std::sqrt(theFermiMomentum*theFermiMomentum + mn*mn) - mn;
76  fermiEnergy[Neutron] = theNeutronFermiEnergy;
77 
79  fermiEnergy[DeltaPlus] = fermiEnergy.find(Proton)->second;
80  fermiEnergy[DeltaZero] = fermiEnergy.find(Neutron)->second;
81  fermiEnergy[DeltaMinus] = fermiEnergy.find(Neutron)->second;
82 
84  separationEnergy[Proton] = theAverageSeparationEnergy;
85  separationEnergy[Neutron] = theAverageSeparationEnergy;
86 
87  // Use separation energies from the ParticleTable
88  vNucleon = 0.5*(theProtonFermiEnergy + theNeutronFermiEnergy) + theAverageSeparationEnergy;
89  vDelta = vNucleon;
90  separationEnergy[DeltaPlusPlus] = vDelta - fermiEnergy.find(DeltaPlusPlus)->second;
91  separationEnergy[DeltaPlus] = vDelta - fermiEnergy.find(DeltaPlus)->second;
92  separationEnergy[DeltaZero] = vDelta - fermiEnergy.find(DeltaZero)->second;
93  separationEnergy[DeltaMinus] = vDelta - fermiEnergy.find(DeltaMinus)->second;
94 
98 
99  INCL_DEBUG("Table of separation energies [MeV] for A=" << theA << ", Z=" << theZ << ":" << std::endl
100  << " proton: " << separationEnergy[Proton] << std::endl
101  << " neutron: " << separationEnergy[Neutron] << std::endl
102  << " delta++: " << separationEnergy[DeltaPlusPlus] << std::endl
103  << " delta+: " << separationEnergy[DeltaPlus] << std::endl
104  << " delta0: " << separationEnergy[DeltaZero] << std::endl
105  << " delta-: " << separationEnergy[DeltaMinus] << std::endl
106  << " pi+: " << separationEnergy[PiPlus] << std::endl
107  << " pi0: " << separationEnergy[PiZero] << std::endl
108  << " pi-: " << separationEnergy[PiMinus] << std::endl
109  );
110 
111  INCL_DEBUG("Table of Fermi energies [MeV] for A=" << theA << ", Z=" << theZ << ":" << std::endl
112  << " proton: " << fermiEnergy[Proton] << std::endl
113  << " neutron: " << fermiEnergy[Neutron] << std::endl
114  << " delta++: " << fermiEnergy[DeltaPlusPlus] << std::endl
115  << " delta+: " << fermiEnergy[DeltaPlus] << std::endl
116  << " delta0: " << fermiEnergy[DeltaZero] << std::endl
117  << " delta-: " << fermiEnergy[DeltaMinus] << std::endl
118  );
119 
120  INCL_DEBUG("Table of Fermi momenta [MeV/c] for A=" << theA << ", Z=" << theZ << ":" << std::endl
121  << " proton: " << fermiMomentum[Proton] << std::endl
122  << " neutron: " << fermiMomentum[Neutron] << std::endl
123  );
124  }
125 
127 
128  switch( particle->getType() )
129  {
130  case Proton:
131  case Neutron:
132  return vNucleon;
133  break;
134 
135  case PiPlus:
136  case PiZero:
137  case PiMinus:
138  return computePionPotentialEnergy(particle);
139  break;
140 
141  case DeltaPlusPlus:
142  case DeltaPlus:
143  case DeltaZero:
144  case DeltaMinus:
145  return vDelta;
146  break;
147  case UnknownParticle:
148  INCL_ERROR("Trying to compute potential energy of an unknown particle.");
149  return 0.0;
150  break;
151  default:
152  INCL_ERROR("Trying to compute potential energy of a malformed particle.");
153  return 0.0;
154  break;
155  }
156  }
157 
158  }
159 }
160 
NuclearPotentialConstant(const G4int A, const G4int Z, const G4bool pionPotential)
std::map< ParticleType, G4double > fermiEnergy
#define INCL_ERROR(x)
int G4int
Definition: G4Types.hh:78
bool G4bool
Definition: G4Types.hh:79
const G4int theA
The mass number of the nucleus.
virtual G4double computePotentialEnergy(const Particle *const p) const
Isospin- and energy-independent nuclear potential.
G4ThreadLocal SeparationEnergyFn getSeparationEnergy
Static pointer to the separation-energy function.
G4double getINCLMass(const G4int A, const G4int Z)
Get INCL nuclear mass (in MeV/c^2)
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.
double G4double
Definition: G4Types.hh:76
#define INCL_DEBUG(x)
std::map< ParticleType, G4double > fermiMomentum
G4ThreadLocal FermiMomentumFn getFermiMomentum