Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4INCL::NuclearDensity Class Reference

#include <G4INCLNuclearDensity.hh>

Public Member Functions

 NuclearDensity (G4int A, G4int Z, InverseInterpolationTable *rpCorrelationTable)
 
 ~NuclearDensity ()
 
 NuclearDensity (const NuclearDensity &rhs)
 Copy constructor.
 
NuclearDensityoperator= (const NuclearDensity &rhs)
 Assignment operator.
 
void swap (NuclearDensity &rhs)
 Helper method for the assignment operator.
 
G4double getMaxRFromP (G4double p) const
 Get the maximum allowed radius for a given momentum.
 
G4double getMaxTFromR (G4double r) const
 
G4double getMaximumRadius () const
 
G4double getTransmissionRadius (Particle const *const p) const
 The radius used for calculating the transmission coefficient.
 
G4double getTransmissionRadius (ParticleType type)
 The radius used for calculating the transmission coefficient.
 
G4int getA () const
 Get the mass number.
 
G4int getZ () const
 Get the charge number.
 
G4double getNuclearRadius ()
 

Detailed Description

Definition at line 55 of file G4INCLNuclearDensity.hh.

Constructor & Destructor Documentation

◆ NuclearDensity() [1/2]

G4INCL::NuclearDensity::NuclearDensity ( G4int  A,
G4int  Z,
InverseInterpolationTable rpCorrelationTable 
)

Definition at line 46 of file G4INCLNuclearDensity.cc.

46 :
47 theA(A),
48 theZ(Z),
49 theMaximumRadius((*rpCorrelationTable)(1.)),
50 theNuclearRadius(ParticleTable::getNuclearRadius(theA,theZ)),
51 rFromP(rpCorrelationTable),
52 // The interpolation table for local-energy look-ups is simply obtained by
53 // inverting the r-p correlation table.
54 tFromR(new InverseInterpolationTable(rFromP->getNodeValues(), rFromP->getNodeAbscissae()))
55 {
56 DEBUG("Interpolation table for local energy (A=" << theA << ", Z=" << theZ << ") initialised:"
57 << std::endl
58 << tFromR->print()
59 << std::endl);
60 initializeTransmissionRadii();
61 }
#define DEBUG(x)
std::vector< G4double > getNodeAbscissae() const
static G4double getNuclearRadius(const G4int A, const G4int Z)

◆ ~NuclearDensity()

G4INCL::NuclearDensity::~NuclearDensity ( )

Definition at line 63 of file G4INCLNuclearDensity.cc.

63 {
64 // We don't delete the rFromP table, which is cached in the
65 // NuclearDensityFactory
66 delete tFromR;
67 }

◆ NuclearDensity() [2/2]

G4INCL::NuclearDensity::NuclearDensity ( const NuclearDensity rhs)

Copy constructor.

Definition at line 69 of file G4INCLNuclearDensity.cc.

69 :
70 theA(rhs.theA),
71 theZ(rhs.theZ),
72 theMaximumRadius(rhs.theMaximumRadius),
73 theNuclearRadius(rhs.theNuclearRadius),
74 // rFromP is owned by NuclearDensityFactory, so shallow copy is sufficient
75 rFromP(rhs.rFromP),
76 // deep copy for tFromR
77 tFromR(new InverseInterpolationTable(*(rhs.tFromR)))
78 {
79 std::copy(rhs.transmissionRadius, rhs.transmissionRadius+UnknownParticle, transmissionRadius);
80 }

Member Function Documentation

◆ getA()

G4int G4INCL::NuclearDensity::getA ( ) const
inline

Get the mass number.

Definition at line 104 of file G4INCLNuclearDensity.hh.

104{ return theA; }

◆ getMaximumRadius()

G4double G4INCL::NuclearDensity::getMaximumRadius ( ) const
inline

Definition at line 78 of file G4INCLNuclearDensity.hh.

78{ return theMaximumRadius; };

Referenced by G4INCL::Nucleus::Nucleus().

◆ getMaxRFromP()

G4double G4INCL::NuclearDensity::getMaxRFromP ( G4double  p) const

Get the maximum allowed radius for a given momentum.

Parameters
pAbsolute value of the particle momentum, divided by the relevant Fermi momentum.
Returns
Maximum allowed radius.

Definition at line 112 of file G4INCLNuclearDensity.cc.

112 {
113 return (*rFromP)(p);
114 }

Referenced by G4INCL::Nucleus::getSurfaceRadius().

◆ getMaxTFromR()

G4double G4INCL::NuclearDensity::getMaxTFromR ( G4double  r) const

Definition at line 116 of file G4INCLNuclearDensity.cc.

116 {
117 return (*tFromR)(r);
118 }

◆ getNuclearRadius()

G4double G4INCL::NuclearDensity::getNuclearRadius ( )
inline

Definition at line 109 of file G4INCLNuclearDensity.hh.

109{ return theNuclearRadius; }

Referenced by G4INCL::PauliStandard::getBlockingProbability(), and G4INCL::ClusteringModelIntercomparison::getCluster().

◆ getTransmissionRadius() [1/2]

G4double G4INCL::NuclearDensity::getTransmissionRadius ( Particle const *const  p) const
inline

The radius used for calculating the transmission coefficient.

Returns
the radius

Definition at line 84 of file G4INCLNuclearDensity.hh.

84 {
85 const ParticleType t = p->getType();
86// assert(t!=Neutron && t!=PiZero && t!=DeltaZero); // no neutral particles here
87 if(t==Composite) {
88 return transmissionRadius[t] +
89 ParticleTable::getNuclearRadius(p->getA(), p->getZ());
90 } else
91 return transmissionRadius[t];
92 };

Referenced by G4INCL::CoulombNonRelativistic::distortOut(), and G4INCL::Nucleus::getTransmissionBarrier().

◆ getTransmissionRadius() [2/2]

G4double G4INCL::NuclearDensity::getTransmissionRadius ( ParticleType  type)
inline

The radius used for calculating the transmission coefficient.

Returns
the radius

Definition at line 98 of file G4INCLNuclearDensity.hh.

98 {
99// assert(type!=Composite);
100 return transmissionRadius[type];
101 };

◆ getZ()

G4int G4INCL::NuclearDensity::getZ ( ) const
inline

Get the charge number.

Definition at line 107 of file G4INCLNuclearDensity.hh.

107{ return theZ; }

◆ operator=()

NuclearDensity & G4INCL::NuclearDensity::operator= ( const NuclearDensity rhs)

Assignment operator.

Definition at line 82 of file G4INCLNuclearDensity.cc.

82 {
83 NuclearDensity temporaryDensity(rhs);
84 swap(temporaryDensity);
85 return *this;
86 }
void swap(NuclearDensity &rhs)
Helper method for the assignment operator.
NuclearDensity(G4int A, G4int Z, InverseInterpolationTable *rpCorrelationTable)

◆ swap()

void G4INCL::NuclearDensity::swap ( NuclearDensity rhs)

Helper method for the assignment operator.

Definition at line 88 of file G4INCLNuclearDensity.cc.

88 {
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);
96 }

Referenced by operator=().


The documentation for this class was generated from the following files: