35#define INCLXX_IN_GEANT4_MODE 1
49 theMaximumRadius((*rpCorrelationTable)(1.)),
51 rFromP(rpCorrelationTable),
56 DEBUG(
"Interpolation table for local energy (A=" << theA <<
", Z=" << theZ <<
") initialised:"
60 initializeTransmissionRadii();
72 theMaximumRadius(rhs.theMaximumRadius),
73 theNuclearRadius(rhs.theNuclearRadius),
79 std::copy(rhs.transmissionRadius, rhs.transmissionRadius+
UnknownParticle, transmissionRadius);
84 swap(temporaryDensity);
89 std::swap(theA, rhs.theA);
90 std::swap(theZ, rhs.theZ);
91 std::swap(theMaximumRadius, rhs.theMaximumRadius);
92 std::swap(theNuclearRadius, rhs.theNuclearRadius);
93 std::swap_ranges(transmissionRadius, transmissionRadius+
UnknownParticle, rhs.transmissionRadius);
94 std::swap(rFromP, rhs.rFromP);
95 std::swap(tFromR, rhs.tFromR);
98 void NuclearDensity::initializeTransmissionRadii() {
99 const G4double theProtonRadius = 0.88;
100 const G4double theProtonTransmissionRadius = theNuclearRadius + theProtonRadius;
102 transmissionRadius[
Proton] = theProtonTransmissionRadius;
103 transmissionRadius[
PiPlus] = theNuclearRadius;
104 transmissionRadius[
PiMinus] = theNuclearRadius;
105 transmissionRadius[
DeltaPlusPlus] = theProtonTransmissionRadius;
106 transmissionRadius[
DeltaPlus] = theProtonTransmissionRadius;
107 transmissionRadius[
DeltaMinus] = theProtonTransmissionRadius;
108 transmissionRadius[
Composite] = theNuclearRadius;
Class for interpolating the inverse of a 1-dimensional function.
std::string print() const
G4double getMaxRFromP(G4double p) const
Get the maximum allowed radius for a given momentum.
void swap(NuclearDensity &rhs)
Helper method for the assignment operator.
NuclearDensity & operator=(const NuclearDensity &rhs)
Assignment operator.
G4double getMaxTFromR(G4double r) const
NuclearDensity(G4int A, G4int Z, InverseInterpolationTable *rpCorrelationTable)