51 : zMin(minZ), zMax(maxZ), occupancyData(isOccupancy)
57 std::map<G4int,std::vector<G4double>*,std::less<G4int> >::iterator
pos;
60 std::vector<G4double>* dataSet = (*pos).second;
64 std::map<G4int,G4DataVector*,std::less<G4int> >::iterator pos2;
73 std::map<G4int,std::vector<G4double>*,std::less<G4int> >::iterator pos3;
76 std::vector<G4double>* dataSet = (*pos3).second;
98 std::map<G4int,std::vector<G4double>*,std::less<G4int> >::const_iterator
pos;
99 if (Z < zMin || Z >
zMax) {
104 } pos =
idMap.find(Z);
105 std::vector<G4double>* dataSet = (*pos).second;
112 std::map<G4int,std::vector<G4double>*,std::less<G4int> >::const_iterator
pos;
115 std::vector<G4double>* dataSet = (*pos).second;
126 std::map<G4int,std::vector<G4double>*,std::less<G4int> >::const_iterator
pos;
128 if (pos!=
idMap.end())
130 std::vector<G4double> dataSet = *((*pos).second);
131 G4int nData = dataSet.size();
132 if (shellIndex >= 0 && shellIndex < nData)
134 n = (
G4int) dataSet[shellIndex];
148 std::map<G4int,std::vector<G4double>*,std::less<G4int> >::const_iterator
pos;
150 if (pos!=
idMap.end())
152 std::vector<G4double> dataSet = *((*pos).second);
153 G4int nData = dataSet.size();
154 if (shellIndex >= 0 && shellIndex < nData)
156 prob = dataSet[shellIndex];
171 std::map<G4int,G4DataVector*,std::less<G4int> >::const_iterator
pos;
176 G4int nData = dataSet.size();
177 if (shellIndex >= 0 && shellIndex < nData)
179 value = dataSet[shellIndex];
190 G4cout <<
"---- Shell data for Z = "
195 std::map<G4int,std::vector<G4double>*,std::less<G4int> >::const_iterator posId;
197 std::vector<G4double>* ids = (*posId).second;
198 std::map<G4int,G4DataVector*,std::less<G4int> >::const_iterator posE;
201 for (
G4int i=0; i<nSh; i++)
215 G4cout <<
id <<
" - Binding energy = "
219 std::map<G4int,std::vector<G4double>*,std::less<G4int> >::const_iterator posOcc;
221 std::vector<G4double> probs = *((*posOcc).second);
223 G4cout <<
"- Probability = " << prob;
227 G4cout <<
"-------------------------------------------------"
237 std::ostringstream ost;
239 ost << fileName <<
".dat";
243 char* path = std::getenv(
"G4LEDATA");
246 G4String excep(
"G4ShellData::LoadData()");
253 std::ifstream
file(dirFile);
254 std::filebuf* lsdp = file.rdbuf();
256 if (! (lsdp->is_open()) )
259 G4String excep =
"G4ShellData::LoadData()";
260 G4String msg =
"data file: " + dirFile +
" not found";
271 std::vector<G4double>* ids =
new std::vector<G4double>;
287 ids =
new std::vector<G4double>;
292 if (sLocal == nColumns)
314 else if (k%nColumns == 0)
318 energies->push_back(e);
338 std::vector<G4double>* prob =
new std::vector<G4double>;
341 prob->push_back(occupancy[0] * scale);
342 for (
size_t i=1; i<occupancy.size(); i++)
344 prob->push_back(occupancy[i]*scale + (*prob)[i-1]);
364 if (Z < zMin || Z >
zMax) {
369 G4int shellIndex = 0;
379 G4int upperBound = nShellsLocal;
381 while (shellIndex <= upperBound)
383 G4int midShell = (shellIndex + upperBound) / 2;
384 if ( random < prob[midShell] )
385 upperBound = midShell - 1;
387 shellIndex = midShell + 1;
389 if (shellIndex >= nShellsLocal) shellIndex = nShellsLocal - 1;