34#define INCLXX_IN_GEANT4_MODE 1
49 theMaximumRadius(
std::min((*rpCorrelationTableProton)(1.), (*rpCorrelationTableNeutron)(1.))),
50 theProtonNuclearRadius(ParticleTable::getNuclearRadius(
Proton,theA,theZ))
53 rFromP[
Proton] = rpCorrelationTableProton;
54 rFromP[
Neutron] = rpCorrelationTableNeutron;
55 rFromP[
Lambda] = rpCorrelationTableLambda;
57 rFromP[
DeltaPlus] = rpCorrelationTableProton;
58 rFromP[
DeltaZero] = rpCorrelationTableNeutron;
59 rFromP[
DeltaMinus] = rpCorrelationTableNeutron;
70 INCL_DEBUG(
"Interpolation table for proton local energy (A=" << theA <<
", Z=" << theZ <<
") initialised:"
74 <<
"Interpolation table for neutron local energy (A=" << theA <<
", Z=" << theZ <<
") initialised:"
78 <<
"Interpolation table for lambda local energy (A=" << theA <<
", Z=" << theZ <<
", S=" << theS <<
") initialised:"
82 <<
"Interpolation table for delta++ local energy (A=" << theA <<
", Z=" << theZ <<
") initialised:"
86 <<
"Interpolation table for delta+ local energy (A=" << theA <<
", Z=" << theZ <<
") initialised:"
90 <<
"Interpolation table for delta0 local energy (A=" << theA <<
", Z=" << theZ <<
") initialised:"
94 <<
"Interpolation table for delta- local energy (A=" << theA <<
", Z=" << theZ <<
") initialised:"
98 initializeTransmissionRadii();
117 theMaximumRadius(rhs.theMaximumRadius),
118 theProtonNuclearRadius(rhs.theProtonNuclearRadius)
138 std::copy(rhs.transmissionRadius, rhs.transmissionRadius+
UnknownParticle, transmissionRadius);
143 swap(temporaryDensity);
148 std::swap(theA, rhs.theA);
149 std::swap(theZ, rhs.theZ);
150 std::swap(theS, rhs.theS);
151 std::swap(theMaximumRadius, rhs.theMaximumRadius);
152 std::swap(theProtonNuclearRadius, rhs.theProtonNuclearRadius);
153 std::swap_ranges(transmissionRadius, transmissionRadius+
UnknownParticle, rhs.transmissionRadius);
169 void NuclearDensity::initializeTransmissionRadii() {
170 const G4double theProtonRadius = 0.88;
171 const G4double theProtonTransmissionRadius = theProtonNuclearRadius + theProtonRadius;
173 transmissionRadius[
Proton] = theProtonTransmissionRadius;
174 transmissionRadius[
PiPlus] = theProtonNuclearRadius;
175 transmissionRadius[
PiMinus] = theProtonNuclearRadius;
176 transmissionRadius[
DeltaPlusPlus] = theProtonTransmissionRadius;
177 transmissionRadius[
DeltaPlus] = theProtonTransmissionRadius;
178 transmissionRadius[
DeltaMinus] = theProtonTransmissionRadius;
179 transmissionRadius[
Composite] = theProtonNuclearRadius;
180 transmissionRadius[
SigmaPlus] = theProtonTransmissionRadius;
181 transmissionRadius[
SigmaMinus] = theProtonTransmissionRadius;
182 transmissionRadius[
KPlus] = theProtonNuclearRadius;
183 transmissionRadius[
KMinus] = theProtonNuclearRadius;
190 return (*(rFromP[t]))(p);
195 return (*(pFromR[t]))(r);
G4double S(G4double temp)
void print(G4double elem)
Class for interpolating the of a 1-dimensional function.
void swap(NuclearDensity &rhs)
Helper method for the assignment operator.
NuclearDensity & operator=(const NuclearDensity &rhs)
Assignment operator.
G4double getMinPFromR(const ParticleType t, const G4double r) const
G4double getMaxRFromP(const ParticleType t, const G4double p) const
Get the maximum allowed radius for a given momentum.
NuclearDensity(const G4int A, const G4int Z, const G4int S, InterpolationTable const *const rpCorrelationTableProton, InterpolationTable const *const rpCorrelationTableNeutron, InterpolationTable const *const rpCorrelationTableLambda)