#include <G4ShellData.hh>
Definition at line 52 of file G4ShellData.hh.
◆ G4ShellData() [1/2]
G4ShellData::G4ShellData |
( |
G4int |
minZ = 1 , |
|
|
G4int |
maxZ = 100 , |
|
|
G4bool |
isOccupancy = false |
|
) |
| |
◆ ~G4ShellData()
G4ShellData::~G4ShellData |
( |
| ) |
|
Definition at line 56 of file G4ShellData.cc.
58 std::map<G4int,std::vector<G4double>*,std::less<G4int> >::iterator
pos;
61 std::vector<G4double>* dataSet = (*pos).second;
65 std::map<G4int,G4DataVector*,std::less<G4int> >::iterator pos2;
74 std::map<G4int,std::vector<G4double>*,std::less<G4int> >::iterator pos3;
77 std::vector<G4double>* dataSet = (*pos3).second;
std::map< G4int, std::vector< G4double > *, std::less< G4int > > occupancyPdfMap
std::map< G4int, std::vector< G4double > *, std::less< G4int > > idMap
static const G4double pos
std::map< G4int, G4DataVector *, std::less< G4int > > bindingMap
◆ G4ShellData() [2/2]
◆ BindingEnergy()
Definition at line 166 of file G4ShellData.cc.
172 std::map<G4int,G4DataVector*,std::less<G4int> >::const_iterator
pos;
177 G4int nData = dataSet.size();
178 if (shellIndex >= 0 && shellIndex < nData)
180 value = dataSet[shellIndex];
static const G4double pos
std::map< G4int, G4DataVector *, std::less< G4int > > bindingMap
◆ LoadData()
void G4ShellData::LoadData |
( |
const G4String & |
fileName | ) |
|
Definition at line 234 of file G4ShellData.cc.
238 std::ostringstream ost;
240 ost << fileName <<
".dat";
244 char* path = getenv(
"G4LEDATA");
247 G4String excep(
"G4ShellData::LoadData()");
254 std::ifstream
file(dirFile);
255 std::filebuf* lsdp =
file.rdbuf();
257 if (! (lsdp->is_open()) )
260 G4String excep =
"G4ShellData::LoadData()";
261 G4String msg =
"data file: " + dirFile +
" not found";
272 std::vector<G4double>* ids =
new std::vector<G4double>;
288 ids =
new std::vector<G4double>;
293 if (sLocal == nColumns)
315 else if (k%nColumns == 0)
319 energies->push_back(e);
339 std::vector<G4double>* prob =
new std::vector<G4double>;
342 prob->push_back(occupancy[0] * scale);
343 for (
size_t i=1; i<occupancy.size(); i++)
345 prob->push_back(occupancy[i]*scale + (*prob)[i-1]);
std::map< G4int, std::vector< G4double > *, std::less< G4int > > occupancyPdfMap
const std::vector< G4double > & ShellIdVector(G4int Z) const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
std::vector< G4int > nShells
std::map< G4int, std::vector< G4double > *, std::less< G4int > > idMap
std::map< G4int, G4DataVector *, std::less< G4int > > bindingMap
◆ NumberOfShells()
size_t G4ShellData::NumberOfShells |
( |
G4int |
Z | ) |
const |
◆ operator=()
◆ PrintData()
void G4ShellData::PrintData |
( |
void |
| ) |
const |
Definition at line 187 of file G4ShellData.cc.
191 G4cout <<
"---- Shell data for Z = " 196 std::map<G4int,std::vector<G4double>*,std::less<G4int> >::const_iterator posId;
198 std::vector<G4double>* ids = (*posId).second;
199 std::map<G4int,G4DataVector*,std::less<G4int> >::const_iterator posE;
202 for (
G4int i=0; i<nSh; i++)
216 G4cout <<
id <<
" - Binding energy = " 220 std::map<G4int,std::vector<G4double>*,std::less<G4int> >::const_iterator posOcc;
222 std::vector<G4double> probs = *((*posOcc).second);
224 G4cout <<
"- Probability = " << prob;
228 G4cout <<
"-------------------------------------------------" std::map< G4int, std::vector< G4double > *, std::less< G4int > > occupancyPdfMap
G4GLOB_DLL std::ostream G4cout
std::vector< G4int > nShells
std::map< G4int, std::vector< G4double > *, std::less< G4int > > idMap
std::map< G4int, G4DataVector *, std::less< G4int > > bindingMap
◆ SelectRandomShell()
G4int G4ShellData::SelectRandomShell |
( |
G4int |
Z | ) |
const |
Definition at line 363 of file G4ShellData.cc.
365 if (Z < zMin || Z >
zMax) {
370 G4int shellIndex = 0;
380 G4int upperBound = nShellsLocal;
382 while (shellIndex <= upperBound)
384 G4int midShell = (shellIndex + upperBound) / 2;
385 if ( random < prob[midShell] )
386 upperBound = midShell - 1;
388 shellIndex = midShell + 1;
390 if (shellIndex >= nShellsLocal) shellIndex = nShellsLocal - 1;
const std::vector< G4double > & ShellVector(G4int Z) const
size_t NumberOfShells(G4int Z) const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
◆ SetOccupancyData()
void G4ShellData::SetOccupancyData |
( |
| ) |
|
|
inline |
◆ ShellId()
Definition at line 121 of file G4ShellData.cc.
127 std::map<G4int,std::vector<G4double>*,std::less<G4int> >::const_iterator
pos;
129 if (pos!=
idMap.end())
131 std::vector<G4double> dataSet = *((*pos).second);
132 G4int nData = dataSet.size();
133 if (shellIndex >= 0 && shellIndex < nData)
135 n = (
G4int) dataSet[shellIndex];
std::map< G4int, std::vector< G4double > *, std::less< G4int > > idMap
static const G4double pos
◆ ShellIdVector()
const std::vector< G4double > & G4ShellData::ShellIdVector |
( |
G4int |
Z | ) |
const |
Definition at line 97 of file G4ShellData.cc.
99 std::map<G4int,std::vector<G4double>*,std::less<G4int> >::const_iterator
pos;
100 if (Z < zMin || Z >
zMax) {
106 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 > > idMap
static const G4double pos
◆ ShellOccupancyProbability()
Definition at line 143 of file G4ShellData.cc.
149 std::map<G4int,std::vector<G4double>*,std::less<G4int> >::const_iterator
pos;
151 if (pos!=
idMap.end())
153 std::vector<G4double> dataSet = *((*pos).second);
154 G4int nData = dataSet.size();
155 if (shellIndex >= 0 && shellIndex < nData)
157 prob = dataSet[shellIndex];
std::map< G4int, std::vector< G4double > *, std::less< G4int > > idMap
static const G4double pos
◆ ShellVector()
const std::vector< G4double > & G4ShellData::ShellVector |
( |
G4int |
Z | ) |
const |
|
private |
Definition at line 111 of file G4ShellData.cc.
113 std::map<G4int,std::vector<G4double>*,std::less<G4int> >::const_iterator
pos;
116 std::vector<G4double>* dataSet = (*pos).second;
std::map< G4int, std::vector< G4double > *, std::less< G4int > > occupancyPdfMap
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
static const G4double pos
◆ bindingMap
◆ idMap
◆ nShells
std::vector<G4int> G4ShellData::nShells |
|
private |
◆ occupancyData
G4bool G4ShellData::occupancyData |
|
private |
◆ occupancyPdfMap
◆ zMax
◆ zMin
The documentation for this class was generated from the following files: