#include <G4RDShellData.hh>
Definition at line 53 of file G4RDShellData.hh.
◆ G4RDShellData() [1/2]
G4RDShellData::G4RDShellData |
( |
G4int |
minZ = 1 , |
|
|
G4int |
maxZ = 100 , |
|
|
G4bool |
isOccupancy = false |
|
) |
| |
◆ ~G4RDShellData()
G4RDShellData::~G4RDShellData |
( |
| ) |
|
Definition at line 59 of file G4RDShellData.cc.
61 std::map<G4int,std::vector<G4double>*,std::less<G4int> >::iterator
pos;
64 std::vector<G4double>* dataSet = (*pos).second;
68 std::map<G4int,G4DataVector*,std::less<G4int> >::iterator pos2;
77 std::map<G4int,std::vector<G4double>*,std::less<G4int> >::iterator pos3;
80 std::vector<G4double>* dataSet = (*pos3).second;
std::map< G4int, std::vector< G4double > *, std::less< G4int > > idMap
std::map< G4int, std::vector< G4double > *, std::less< G4int > > occupancyPdfMap
static const G4double pos
std::map< G4int, G4DataVector *, std::less< G4int > > bindingMap
◆ G4RDShellData() [2/2]
◆ BindingEnergy()
Definition at line 169 of file G4RDShellData.cc.
175 std::map<G4int,G4DataVector*,std::less<G4int> >::const_iterator
pos;
180 G4int nData = dataSet.size();
181 if (shellIndex >= 0 && shellIndex < nData)
183 value = dataSet[shellIndex];
static const G4double pos
std::map< G4int, G4DataVector *, std::less< G4int > > bindingMap
◆ LoadData()
void G4RDShellData::LoadData |
( |
const G4String & |
fileName | ) |
|
Definition at line 237 of file G4RDShellData.cc.
241 std::ostringstream ost;
243 ost << fileName <<
".dat";
247 char* path = getenv(
"G4LEDATA");
250 G4String excep(
"G4LEDATA environment variable not set!");
251 G4Exception(
"G4RDShellData::LoadData()",
"InvalidSetup",
257 std::ifstream
file(dirFile);
258 std::filebuf* lsdp =
file.rdbuf();
260 if (! (lsdp->is_open()) )
265 G4Exception(
"G4RDShellData::LoadData()",
"DataNotFound",
275 std::vector<G4double>* ids =
new std::vector<G4double>;
290 ids =
new std::vector<G4double>;
315 else if (k%nColumns == 0)
319 energies->push_back(e);
337 std::vector<G4double>* prob =
new std::vector<G4double>;
340 prob->push_back(occupancy[0] * scale);
341 for (
size_t i=1; i<occupancy.size(); i++)
343 prob->push_back(occupancy[i]*scale + (*prob)[i-1]);
std::map< G4int, std::vector< G4double > *, std::less< G4int > > idMap
std::vector< G4int > nShells
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
std::map< G4int, std::vector< G4double > *, std::less< G4int > > occupancyPdfMap
const std::vector< G4double > & ShellIdVector(G4int Z) const
std::map< G4int, G4DataVector *, std::less< G4int > > bindingMap
◆ NumberOfShells()
size_t G4RDShellData::NumberOfShells |
( |
G4int |
Z | ) |
const |
◆ operator=()
◆ PrintData()
void G4RDShellData::PrintData |
( |
void |
| ) |
const |
Definition at line 190 of file G4RDShellData.cc.
194 G4cout <<
"---- Shell data for Z = " 199 std::map<G4int,std::vector<G4double>*,std::less<G4int> >::const_iterator posId;
201 std::vector<G4double>* ids = (*posId).second;
202 std::map<G4int,G4DataVector*,std::less<G4int> >::const_iterator posE;
205 for (
G4int i=0; i<nSh; i++)
219 G4cout <<
id <<
" - Binding energy = " 223 std::map<G4int,std::vector<G4double>*,std::less<G4int> >::const_iterator posOcc;
225 std::vector<G4double> probs = *((*posOcc).second);
227 G4cout <<
"- Probability = " << prob;
231 G4cout <<
"-------------------------------------------------" std::map< G4int, std::vector< G4double > *, std::less< G4int > > idMap
G4GLOB_DLL std::ostream G4cout
std::vector< G4int > nShells
std::map< G4int, std::vector< G4double > *, std::less< G4int > > occupancyPdfMap
std::map< G4int, G4DataVector *, std::less< G4int > > bindingMap
◆ SelectRandomShell()
G4int G4RDShellData::SelectRandomShell |
( |
G4int |
Z | ) |
const |
Definition at line 361 of file G4RDShellData.cc.
363 if (Z < zMin || Z >
zMax)
364 G4Exception(
"G4RDShellData::SelectRandomShell()",
"OutOfRange",
367 G4int shellIndex = 0;
379 while (shellIndex <= upperBound)
381 G4int midShell = (shellIndex + upperBound) / 2;
382 if ( random < prob[midShell] )
383 upperBound = midShell - 1;
385 shellIndex = midShell + 1;
387 if (shellIndex >= nShells) shellIndex = nShells - 1;
size_t NumberOfShells(G4int Z) const
const std::vector< G4double > & ShellVector(G4int Z) const
std::vector< G4int > nShells
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
◆ SetOccupancyData()
void G4RDShellData::SetOccupancyData |
( |
| ) |
|
|
inline |
◆ ShellId()
Definition at line 124 of file G4RDShellData.cc.
130 std::map<G4int,std::vector<G4double>*,std::less<G4int> >::const_iterator
pos;
132 if (pos!=
idMap.end())
134 std::vector<G4double> dataSet = *((*pos).second);
135 G4int nData = dataSet.size();
136 if (shellIndex >= 0 && shellIndex < nData)
138 n = (
G4int) dataSet[shellIndex];
std::map< G4int, std::vector< G4double > *, std::less< G4int > > idMap
static const G4double pos
◆ ShellIdVector()
const std::vector< G4double > & G4RDShellData::ShellIdVector |
( |
G4int |
Z | ) |
const |
Definition at line 100 of file G4RDShellData.cc.
102 std::map<G4int,std::vector<G4double>*,std::less<G4int> >::const_iterator
pos;
103 if (Z < zMin || Z >
zMax)
104 G4Exception(
"G4RDShellData::ShellIdVector()",
"OutOfRange",
107 std::vector<G4double>* dataSet = (*pos).second;
std::map< G4int, std::vector< G4double > *, std::less< G4int > > idMap
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
static const G4double pos
◆ ShellOccupancyProbability()
Definition at line 146 of file G4RDShellData.cc.
152 std::map<G4int,std::vector<G4double>*,std::less<G4int> >::const_iterator
pos;
154 if (pos!=
idMap.end())
156 std::vector<G4double> dataSet = *((*pos).second);
157 G4int nData = dataSet.size();
158 if (shellIndex >= 0 && shellIndex < nData)
160 prob = dataSet[shellIndex];
std::map< G4int, std::vector< G4double > *, std::less< G4int > > idMap
static const G4double pos
◆ ShellVector()
const std::vector< G4double > & G4RDShellData::ShellVector |
( |
G4int |
Z | ) |
const |
|
private |
Definition at line 112 of file G4RDShellData.cc.
114 std::map<G4int,std::vector<G4double>*,std::less<G4int> >::const_iterator
pos;
115 if (Z < zMin || Z >
zMax)
116 G4Exception(
"G4RDShellData::ShellVector()",
"OutOfRange",
119 std::vector<G4double>* dataSet = (*pos).second;
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
std::map< G4int, std::vector< G4double > *, std::less< G4int > > occupancyPdfMap
static const G4double pos
◆ bindingMap
◆ idMap
◆ nShells
std::vector<G4int> G4RDShellData::nShells |
|
private |
◆ occupancyData
G4bool G4RDShellData::occupancyData |
|
private |
◆ occupancyPdfMap
◆ zMax
G4int G4RDShellData::zMax |
|
private |
◆ zMin
G4int G4RDShellData::zMin |
|
private |
The documentation for this class was generated from the following files: