Geant4  10.02.p02
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 // 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 
48 #include "G4INCLParticleTable.hh"
49 
50 namespace G4INCL {
51 
52  namespace NuclearPotential {
53 
54  // Constructors
56  : INuclearPotential(A, Z, aPionPotential)
57  {
58  initialize();
59  }
60 
61  // Destructor
63  }
64 
68 
69  const G4double theFermiMomentum = ParticleTable::getFermiMomentum(theA,theZ);
70 
71  fermiMomentum[Proton] = theFermiMomentum;
72  const G4double theProtonFermiEnergy = std::sqrt(theFermiMomentum*theFermiMomentum + mp*mp) - mp;
73  fermiEnergy[Proton] = theProtonFermiEnergy;
74 
75  fermiMomentum[Neutron] = theFermiMomentum;
76  const G4double theNeutronFermiEnergy = std::sqrt(theFermiMomentum*theFermiMomentum + mn*mn) - mn;
77  fermiEnergy[Neutron] = theNeutronFermiEnergy;
78 
80  fermiEnergy[DeltaPlus] = fermiEnergy.find(Proton)->second;
81  fermiEnergy[DeltaZero] = fermiEnergy.find(Neutron)->second;
82  fermiEnergy[DeltaMinus] = fermiEnergy.find(Neutron)->second;
83 
85  separationEnergy[Proton] = theAverageSeparationEnergy;
86  separationEnergy[Neutron] = theAverageSeparationEnergy;
87 
88  // Use separation energies from the ParticleTable
89  vNucleon = 0.5*(theProtonFermiEnergy + theNeutronFermiEnergy) + theAverageSeparationEnergy;
90  vDelta = vNucleon;
95 
99 
100  INCL_DEBUG("Table of separation energies [MeV] for A=" << theA << ", Z=" << theZ << ":" << '\n'
101  << " proton: " << separationEnergy[Proton] << '\n'
102  << " neutron: " << separationEnergy[Neutron] << '\n'
103  << " delta++: " << separationEnergy[DeltaPlusPlus] << '\n'
104  << " delta+: " << separationEnergy[DeltaPlus] << '\n'
105  << " delta0: " << separationEnergy[DeltaZero] << '\n'
106  << " delta-: " << separationEnergy[DeltaMinus] << '\n'
107  << " pi+: " << separationEnergy[PiPlus] << '\n'
108  << " pi0: " << separationEnergy[PiZero] << '\n'
109  << " pi-: " << separationEnergy[PiMinus] << '\n'
110  );
111 
112  INCL_DEBUG("Table of Fermi energies [MeV] for A=" << theA << ", Z=" << theZ << ":" << '\n'
113  << " proton: " << fermiEnergy[Proton] << '\n'
114  << " neutron: " << fermiEnergy[Neutron] << '\n'
115  << " delta++: " << fermiEnergy[DeltaPlusPlus] << '\n'
116  << " delta+: " << fermiEnergy[DeltaPlus] << '\n'
117  << " delta0: " << fermiEnergy[DeltaZero] << '\n'
118  << " delta-: " << fermiEnergy[DeltaMinus] << '\n'
119  );
120 
121  INCL_DEBUG("Table of Fermi momenta [MeV/c] for A=" << theA << ", Z=" << theZ << ":" << '\n'
122  << " proton: " << fermiMomentum[Proton] << '\n'
123  << " neutron: " << fermiMomentum[Neutron] << '\n'
124  );
125  }
126 
128 
129  switch( particle->getType() )
130  {
131  case Proton:
132  case Neutron:
133  return vNucleon;
134  break;
135 
136  case PiPlus:
137  case PiZero:
138  case PiMinus:
139  return computePionPotentialEnergy(particle);
140  break;
141 
142  case DeltaPlusPlus:
143  case DeltaPlus:
144  case DeltaZero:
145  case DeltaMinus:
146  return vDelta;
147  break;
148  case UnknownParticle:
149  INCL_ERROR("Trying to compute potential energy of an unknown particle.");
150  return 0.0;
151  break;
152  default:
153  INCL_ERROR("Trying to compute potential energy of a malformed particle.");
154  return 0.0;
155  break;
156  }
157  }
158 
159  }
160 }
161 
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
double A(double temperature)
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
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.
double G4double
Definition: G4Types.hh:76
#define INCL_DEBUG(x)
std::map< ParticleType, G4double > fermiMomentum
G4ThreadLocal FermiMomentumFn getFermiMomentum