Geant4  10.02.p03
G4INCL::NuclearDensity Class Reference

#include <G4INCLNuclearDensity.hh>

Collaboration diagram for G4INCL::NuclearDensity:

Public Member Functions

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

Private Member Functions

void initializeTransmissionRadii ()
 Initialize the transmission radius. More...
 

Private Attributes

G4int theA
 
G4int theZ
 
G4double theMaximumRadius
 
G4double theProtonNuclearRadius
 Represents INCL4.5's R0 variable. More...
 
G4double transmissionRadius [UnknownParticle]
 
InterpolationTable const * rFromP [UnknownParticle]
 
InterpolationTable const * pFromR [UnknownParticle]
 

Detailed Description

Definition at line 54 of file G4INCLNuclearDensity.hh.

Constructor & Destructor Documentation

◆ NuclearDensity() [1/2]

G4INCL::NuclearDensity::NuclearDensity ( const G4int  A,
const G4int  Z,
InterpolationTable const *const  rpCorrelationTableProton,
InterpolationTable const *const  rpCorrelationTableNeutron 
)

Definition at line 45 of file G4INCLNuclearDensity.cc.

45  :
46  theA(A),
47  theZ(Z),
48  theMaximumRadius(std::min((*rpCorrelationTableProton)(1.), (*rpCorrelationTableNeutron)(1.))),
50  {
51  std::fill(rFromP, rFromP + UnknownParticle, static_cast<InterpolationTable*>(NULL));
52  rFromP[Proton] = rpCorrelationTableProton;
53  rFromP[Neutron] = rpCorrelationTableNeutron;
54  rFromP[DeltaPlusPlus] = rpCorrelationTableProton;
55  rFromP[DeltaPlus] = rpCorrelationTableProton;
56  rFromP[DeltaZero] = rpCorrelationTableNeutron;
57  rFromP[DeltaMinus] = rpCorrelationTableNeutron;
58  // The interpolation table for local-energy look-ups is simply obtained by
59  // inverting the r-p correlation table.
60  std::fill(pFromR, pFromR + UnknownParticle, static_cast<InterpolationTable*>(NULL));
61  pFromR[Proton] = new InterpolationTable(rFromP[Proton]->getNodeValues(), rFromP[Proton]->getNodeAbscissae());
62  pFromR[Neutron] = new InterpolationTable(rFromP[Neutron]->getNodeValues(), rFromP[Neutron]->getNodeAbscissae());
63  pFromR[DeltaPlusPlus] = new InterpolationTable(rFromP[DeltaPlusPlus]->getNodeValues(), rFromP[DeltaPlusPlus]->getNodeAbscissae());
64  pFromR[DeltaPlus] = new InterpolationTable(rFromP[DeltaPlus]->getNodeValues(), rFromP[DeltaPlus]->getNodeAbscissae());
65  pFromR[DeltaZero] = new InterpolationTable(rFromP[DeltaZero]->getNodeValues(), rFromP[DeltaZero]->getNodeAbscissae());
66  pFromR[DeltaMinus] = new InterpolationTable(rFromP[DeltaMinus]->getNodeValues(), rFromP[DeltaMinus]->getNodeAbscissae());
67  INCL_DEBUG("Interpolation table for proton local energy (A=" << theA << ", Z=" << theZ << ") initialised:"
68  << '\n'
69  << pFromR[Proton]->print()
70  << '\n'
71  << "Interpolation table for neutron local energy (A=" << theA << ", Z=" << theZ << ") initialised:"
72  << '\n'
73  << pFromR[Neutron]->print()
74  << '\n'
75  << "Interpolation table for delta++ local energy (A=" << theA << ", Z=" << theZ << ") initialised:"
76  << '\n'
78  << '\n'
79  << "Interpolation table for delta+ local energy (A=" << theA << ", Z=" << theZ << ") initialised:"
80  << '\n'
81  << pFromR[DeltaPlus]->print()
82  << '\n'
83  << "Interpolation table for delta0 local energy (A=" << theA << ", Z=" << theZ << ") initialised:"
84  << '\n'
85  << pFromR[DeltaZero]->print()
86  << '\n'
87  << "Interpolation table for delta- local energy (A=" << theA << ", Z=" << theZ << ") initialised:"
88  << '\n'
89  << pFromR[DeltaMinus]->print()
90  << '\n');
92  }
G4double getNuclearRadius(const ParticleType t, const G4int A, const G4int Z)
double A(double temperature)
Float_t Z
InterpolationTable const * pFromR[UnknownParticle]
void print(G4double elem)
InterpolationTable const * rFromP[UnknownParticle]
void initializeTransmissionRadii()
Initialize the transmission radius.
#define INCL_DEBUG(x)
G4double theProtonNuclearRadius
Represents INCL4.5&#39;s R0 variable.
Here is the call graph for this function:

◆ ~NuclearDensity()

G4INCL::NuclearDensity::~NuclearDensity ( )

Definition at line 94 of file G4INCLNuclearDensity.cc.

94  {
95  // We don't delete the rFromP tables, which are cached in the
96  // NuclearDensityFactory
97  delete pFromR[Proton];
98  delete pFromR[Neutron];
99  delete pFromR[DeltaPlusPlus];
100  delete pFromR[DeltaPlus];
101  delete pFromR[DeltaZero];
102  delete pFromR[DeltaMinus];
103  }
InterpolationTable const * pFromR[UnknownParticle]

◆ NuclearDensity() [2/2]

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

Copy constructor.

Definition at line 105 of file G4INCLNuclearDensity.cc.

105  :
106  theA(rhs.theA),
107  theZ(rhs.theZ),
108  theMaximumRadius(rhs.theMaximumRadius),
109  theProtonNuclearRadius(rhs.theProtonNuclearRadius)
110  {
111  // rFromP is owned by NuclearDensityFactory, so shallow copy is sufficient
112  std::fill(rFromP, rFromP + UnknownParticle, static_cast<InterpolationTable*>(NULL));
113  rFromP[Proton] = rhs.rFromP[Proton];
114  rFromP[Neutron] = rhs.rFromP[Neutron];
115  rFromP[DeltaPlusPlus] = rhs.rFromP[DeltaPlusPlus];
116  rFromP[DeltaPlus] = rhs.rFromP[DeltaPlus];
117  rFromP[DeltaZero] = rhs.rFromP[DeltaZero];
118  rFromP[DeltaMinus] = rhs.rFromP[DeltaMinus];
119  // deep copy for pFromR
120  std::fill(pFromR, pFromR + UnknownParticle, static_cast<InterpolationTable*>(NULL));
121  pFromR[Proton] = new InterpolationTable(*(rhs.pFromR[Proton]));
122  pFromR[Neutron] = new InterpolationTable(*(rhs.pFromR[Neutron]));
123  pFromR[DeltaPlusPlus] = new InterpolationTable(*(rhs.pFromR[DeltaPlusPlus]));
124  pFromR[DeltaPlus] = new InterpolationTable(*(rhs.pFromR[DeltaPlus]));
125  pFromR[DeltaZero] = new InterpolationTable(*(rhs.pFromR[DeltaZero]));
126  pFromR[DeltaMinus] = new InterpolationTable(*(rhs.pFromR[DeltaMinus]));
127  std::copy(rhs.transmissionRadius, rhs.transmissionRadius+UnknownParticle, transmissionRadius);
128  }
G4double transmissionRadius[UnknownParticle]
InterpolationTable const * pFromR[UnknownParticle]
InterpolationTable const * rFromP[UnknownParticle]
G4double theProtonNuclearRadius
Represents INCL4.5&#39;s R0 variable.

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; };
Here is the caller graph for this function:

◆ getMaxRFromP()

G4double G4INCL::NuclearDensity::getMaxRFromP ( const ParticleType  t,
const G4double  p 
) const

Get the maximum allowed radius for a given momentum.

Parameters
ttype of the particle
pabsolute value of the particle momentum, divided by the relevant Fermi momentum.
Returns
maximum allowed radius.

Definition at line 170 of file G4INCLNuclearDensity.cc.

170  {
171 // assert(t==Proton || t==Neutron || t==DeltaPlusPlus || t==DeltaPlus || t==DeltaZero || t==DeltaMinus);
172  return (*(rFromP[t]))(p);
173  }
InterpolationTable const * rFromP[UnknownParticle]
Here is the caller graph for this function:

◆ getMinPFromR()

G4double G4INCL::NuclearDensity::getMinPFromR ( const ParticleType  t,
const G4double  r 
) const

Definition at line 175 of file G4INCLNuclearDensity.cc.

175  {
176 // assert(t==Proton || t==Neutron || t==DeltaPlusPlus || t==DeltaPlus || t==DeltaZero || t==DeltaMinus);
177  return (*(pFromR[t]))(r);
178  }
InterpolationTable const * pFromR[UnknownParticle]
Here is the caller graph for this function:

◆ getProtonNuclearRadius()

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

Definition at line 109 of file G4INCLNuclearDensity.hh.

109 { return theProtonNuclearRadius; }
G4double theProtonNuclearRadius
Represents INCL4.5&#39;s R0 variable.
Here is the caller graph for this function:

◆ 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(t, p->getA(), p->getZ());
90  } else
91  return transmissionRadius[t];
92  };
G4double transmissionRadius[UnknownParticle]
G4double getNuclearRadius(const ParticleType t, const G4int A, const G4int Z)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTransmissionRadius() [2/2]

G4double G4INCL::NuclearDensity::getTransmissionRadius ( ParticleType  type) const
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  };
G4double transmissionRadius[UnknownParticle]

◆ getZ()

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

Get the charge number.

Definition at line 107 of file G4INCLNuclearDensity.hh.

107 { return theZ; }

◆ initializeTransmissionRadii()

void G4INCL::NuclearDensity::initializeTransmissionRadii ( )
private

Initialize the transmission radius.

Definition at line 156 of file G4INCLNuclearDensity.cc.

156  {
157  const G4double theProtonRadius = 0.88; // fm
158  const G4double theProtonTransmissionRadius = theProtonNuclearRadius + theProtonRadius;
159 
160  transmissionRadius[Proton] = theProtonTransmissionRadius;
163  transmissionRadius[DeltaPlusPlus] = theProtonTransmissionRadius;
164  transmissionRadius[DeltaPlus] = theProtonTransmissionRadius;
165  transmissionRadius[DeltaMinus] = theProtonTransmissionRadius;
167  // transmission radii for neutral particles intentionally left uninitialised
168  }
G4double transmissionRadius[UnknownParticle]
double G4double
Definition: G4Types.hh:76
G4double theProtonNuclearRadius
Represents INCL4.5&#39;s R0 variable.
Here is the caller graph for this function:

◆ operator=()

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

Assignment operator.

Definition at line 130 of file G4INCLNuclearDensity.cc.

130  {
131  NuclearDensity temporaryDensity(rhs);
132  swap(temporaryDensity);
133  return *this;
134  }
void swap(NuclearDensity &rhs)
Helper method for the assignment operator.
NuclearDensity(const G4int A, const G4int Z, InterpolationTable const *const rpCorrelationTableProton, InterpolationTable const *const rpCorrelationTableNeutron)
Here is the call graph for this function:

◆ setProtonNuclearRadius()

void G4INCL::NuclearDensity::setProtonNuclearRadius ( const G4double  r)
inline

Definition at line 110 of file G4INCLNuclearDensity.hh.

G4double theProtonNuclearRadius
Represents INCL4.5&#39;s R0 variable.
Here is the call graph for this function:

◆ swap()

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

Helper method for the assignment operator.

Definition at line 136 of file G4INCLNuclearDensity.cc.

136  {
137  std::swap(theA, rhs.theA);
138  std::swap(theZ, rhs.theZ);
139  std::swap(theMaximumRadius, rhs.theMaximumRadius);
140  std::swap(theProtonNuclearRadius, rhs.theProtonNuclearRadius);
141  std::swap_ranges(transmissionRadius, transmissionRadius+UnknownParticle, rhs.transmissionRadius);
142  std::swap(rFromP[Proton], rhs.rFromP[Proton]);
143  std::swap(rFromP[Neutron], rhs.rFromP[Neutron]);
144  std::swap(rFromP[DeltaPlusPlus], rhs.rFromP[DeltaPlusPlus]);
145  std::swap(rFromP[DeltaPlus], rhs.rFromP[DeltaPlus]);
146  std::swap(rFromP[DeltaZero], rhs.rFromP[DeltaZero]);
147  std::swap(rFromP[DeltaMinus], rhs.rFromP[DeltaMinus]);
148  std::swap(pFromR[Proton], rhs.pFromR[Proton]);
149  std::swap(pFromR[Neutron], rhs.pFromR[Neutron]);
150  std::swap(pFromR[DeltaPlusPlus], rhs.pFromR[DeltaPlusPlus]);
151  std::swap(pFromR[DeltaPlus], rhs.pFromR[DeltaPlus]);
152  std::swap(pFromR[DeltaZero], rhs.pFromR[DeltaZero]);
153  std::swap(pFromR[DeltaMinus], rhs.pFromR[DeltaMinus]);
154  }
G4double transmissionRadius[UnknownParticle]
InterpolationTable const * pFromR[UnknownParticle]
InterpolationTable const * rFromP[UnknownParticle]
G4double theProtonNuclearRadius
Represents INCL4.5&#39;s R0 variable.
Here is the caller graph for this function:

Member Data Documentation

◆ pFromR

InterpolationTable const* G4INCL::NuclearDensity::pFromR[UnknownParticle]
private

Definition at line 126 of file G4INCLNuclearDensity.hh.

◆ rFromP

InterpolationTable const* G4INCL::NuclearDensity::rFromP[UnknownParticle]
private

Definition at line 125 of file G4INCLNuclearDensity.hh.

◆ theA

G4int G4INCL::NuclearDensity::theA
private

Definition at line 117 of file G4INCLNuclearDensity.hh.

◆ theMaximumRadius

G4double G4INCL::NuclearDensity::theMaximumRadius
private

Definition at line 118 of file G4INCLNuclearDensity.hh.

◆ theProtonNuclearRadius

G4double G4INCL::NuclearDensity::theProtonNuclearRadius
private

Represents INCL4.5's R0 variable.

Definition at line 120 of file G4INCLNuclearDensity.hh.

◆ theZ

G4int G4INCL::NuclearDensity::theZ
private

Definition at line 117 of file G4INCLNuclearDensity.hh.

◆ transmissionRadius

G4double G4INCL::NuclearDensity::transmissionRadius[UnknownParticle]
private

Definition at line 123 of file G4INCLNuclearDensity.hh.


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