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 53 of file G4INCLNuclearDensity.hh.


Constructor & Destructor Documentation

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

Definition at line 44 of file G4INCLNuclearDensity.cc.

References DEBUG, and G4INCL::InverseInterpolationTable::print().

00044                                                                                                 :
00045     theA(A),
00046     theZ(Z),
00047     theMaximumRadius((*rpCorrelationTable)(1.)),
00048     theNuclearRadius(ParticleTable::getNuclearRadius(theA,theZ)),
00049     rFromP(rpCorrelationTable),
00050     // The interpolation table for local-energy look-ups is simply obtained by
00051     // inverting the r-p correlation table.
00052     tFromR(new InverseInterpolationTable(rFromP->getNodeValues(), rFromP->getNodeAbscissae()))
00053   {
00054     DEBUG("Interpolation table for local energy (A=" << theA << ", Z=" << theZ << ") initialised:"
00055         << std::endl
00056         << tFromR->print()
00057         << std::endl);
00058     initializeTransmissionRadii();
00059   }

G4INCL::NuclearDensity::~NuclearDensity (  ) 

Definition at line 61 of file G4INCLNuclearDensity.cc.

00061                                   {
00062     // We don't delete the rFromP table, which is cached in the
00063     // NuclearDensityFactory
00064     delete tFromR;
00065   }

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

Copy constructor.

Definition at line 67 of file G4INCLNuclearDensity.cc.

References transmissionRadius, and G4INCL::UnknownParticle.

00067                                                           :
00068     theA(rhs.theA),
00069     theZ(rhs.theZ),
00070     theMaximumRadius(rhs.theMaximumRadius),
00071     theNuclearRadius(rhs.theNuclearRadius),
00072     // rFromP is owned by NuclearDensityFactory, so shallow copy is sufficient
00073     rFromP(rhs.rFromP),
00074     // deep copy for tFromR
00075     tFromR(new InverseInterpolationTable(*(rhs.tFromR)))
00076   {
00077     std::copy(rhs.transmissionRadius, rhs.transmissionRadius+UnknownParticle, transmissionRadius);
00078   }


Member Function Documentation

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

Get the mass number.

Definition at line 102 of file G4INCLNuclearDensity.hh.

00102 { return theA; }

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

Definition at line 76 of file G4INCLNuclearDensity.hh.

00076 { return theMaximumRadius; };

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

Get the maximum allowed radius for a given momentum.

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

Definition at line 110 of file G4INCLNuclearDensity.cc.

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

00110                                                         {
00111     return (*rFromP)(p);
00112   }

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

Definition at line 114 of file G4INCLNuclearDensity.cc.

00114                                                         {
00115     return (*tFromR)(r);
00116   }

G4double G4INCL::NuclearDensity::getNuclearRadius (  )  [inline]

Definition at line 107 of file G4INCLNuclearDensity.hh.

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

00107 { return theNuclearRadius; }

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

The radius used for calculating the transmission coefficient.

Returns:
the radius

Definition at line 96 of file G4INCLNuclearDensity.hh.

00096                                                       {
00097 // assert(type!=Composite);
00098       return transmissionRadius[type];
00099     };

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

The radius used for calculating the transmission coefficient.

Returns:
the radius

Definition at line 82 of file G4INCLNuclearDensity.hh.

References G4INCL::Composite, G4INCL::Particle::getA(), G4INCL::ParticleTable::getNuclearRadius(), G4INCL::Particle::getType(), and G4INCL::Particle::getZ().

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

00082                                                                    {
00083       const ParticleType t = p->getType();
00084 // assert(t!=Neutron && t!=PiZero && t!=DeltaZero); // no neutral particles here
00085       if(t==Composite) {
00086         return transmissionRadius[t] +
00087           ParticleTable::getNuclearRadius(p->getA(), p->getZ());
00088       } else
00089         return transmissionRadius[t];
00090     };

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

Get the charge number.

Definition at line 105 of file G4INCLNuclearDensity.hh.

00105 { return theZ; }

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

Assignment operator.

Definition at line 80 of file G4INCLNuclearDensity.cc.

References swap().

00080                                                                      {
00081     NuclearDensity temporaryDensity(rhs);
00082     swap(temporaryDensity);
00083     return *this;
00084   }

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

Helper method for the assignment operator.

Definition at line 86 of file G4INCLNuclearDensity.cc.

References rFromP, tFromR, theA, theMaximumRadius, theNuclearRadius, theZ, transmissionRadius, and G4INCL::UnknownParticle.

Referenced by operator=().

00086                                                {
00087     std::swap(theA, rhs.theA);
00088     std::swap(theZ, rhs.theZ);
00089     std::swap(theMaximumRadius, rhs.theMaximumRadius);
00090     std::swap(theNuclearRadius, rhs.theNuclearRadius);
00091     std::swap_ranges(transmissionRadius, transmissionRadius+UnknownParticle, rhs.transmissionRadius);
00092     std::swap(rFromP, rhs.rFromP);
00093     std::swap(tFromR, rhs.tFromR);
00094  }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:54:07 2013 for Geant4 by  doxygen 1.4.7