Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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 // 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 
65  void NuclearPotentialConstant::initialize() {
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;
91  separationEnergy[DeltaPlusPlus] = vDelta - fermiEnergy.find(DeltaPlusPlus)->second;
92  separationEnergy[DeltaPlus] = vDelta - fermiEnergy.find(DeltaPlus)->second;
93  separationEnergy[DeltaZero] = vDelta - fermiEnergy.find(DeltaZero)->second;
94  separationEnergy[DeltaMinus] = vDelta - fermiEnergy.find(DeltaMinus)->second;
95 
99 
100  separationEnergy[Eta] = 0.;
101  separationEnergy[Omega] = 0.;
103  separationEnergy[Photon] = 0.;
104 
105  INCL_DEBUG("Table of separation energies [MeV] for A=" << theA << ", Z=" << theZ << ":" << '\n'
106  << " proton: " << separationEnergy[Proton] << '\n'
107  << " neutron: " << separationEnergy[Neutron] << '\n'
108  << " delta++: " << separationEnergy[DeltaPlusPlus] << '\n'
109  << " delta+: " << separationEnergy[DeltaPlus] << '\n'
110  << " delta0: " << separationEnergy[DeltaZero] << '\n'
111  << " delta-: " << separationEnergy[DeltaMinus] << '\n'
112  << " pi+: " << separationEnergy[PiPlus] << '\n'
113  << " pi0: " << separationEnergy[PiZero] << '\n'
114  << " pi-: " << separationEnergy[PiMinus] << '\n'
115  << " eta: " << separationEnergy[Eta] << '\n'
116  << " omega: " << separationEnergy[Omega] << '\n'
117  << " etaprime:" << separationEnergy[EtaPrime] << '\n'
118  << " photon: " << separationEnergy[Photon] << '\n'
119  );
120 
121  INCL_DEBUG("Table of Fermi energies [MeV] for A=" << theA << ", Z=" << theZ << ":" << '\n'
122  << " proton: " << fermiEnergy[Proton] << '\n'
123  << " neutron: " << fermiEnergy[Neutron] << '\n'
124  << " delta++: " << fermiEnergy[DeltaPlusPlus] << '\n'
125  << " delta+: " << fermiEnergy[DeltaPlus] << '\n'
126  << " delta0: " << fermiEnergy[DeltaZero] << '\n'
127  << " delta-: " << fermiEnergy[DeltaMinus] << '\n'
128  );
129 
130  INCL_DEBUG("Table of Fermi momenta [MeV/c] for A=" << theA << ", Z=" << theZ << ":" << '\n'
131  << " proton: " << fermiMomentum[Proton] << '\n'
132  << " neutron: " << fermiMomentum[Neutron] << '\n'
133  );
134  }
135 
137 
138  switch( particle->getType() )
139  {
140  case Proton:
141  case Neutron:
142  return vNucleon;
143  break;
144 
145  case PiPlus:
146  case PiZero:
147  case PiMinus:
148  return computePionPotentialEnergy(particle);
149  break;
150 
151  case Eta:
152  case Omega:
153  case EtaPrime:
154  return computePionResonancePotentialEnergy(particle);
155  break;
156 
157  case Photon:
158  return 0.0;
159  break;
160 
161  case DeltaPlusPlus:
162  case DeltaPlus:
163  case DeltaZero:
164  case DeltaMinus:
165  return vDelta;
166  break;
167  case UnknownParticle:
168  INCL_ERROR("Trying to compute potential energy of an unknown particle.");
169  return 0.0;
170  break;
171  default:
172  INCL_ERROR("Trying to compute potential energy of a malformed particle.");
173  return 0.0;
174  break;
175  }
176  }
177 
178  }
179 }
180 
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 computePionResonancePotentialEnergy(const Particle *const p) const
Compute the potential energy for the given pion resonances (Eta, Omega and EtaPrime and Gamma also)...
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