53 for (
auto& pos : idMap)
59 for (
auto& pos : energyMap)
65 for (
auto& pos: probabilityMap)
76 return numberOfVacancies;
84 if (vacancyIndex<0 || vacancyIndex>=numberOfVacancies)
87 "vacancyIndex outside boundaries");
91 auto pos = idMap.find(vacancyIndex);
92 if (pos!= idMap.end())
94 n = (
G4int) dataSet[0];
106 if (vacancyIndex<0 || vacancyIndex>=numberOfVacancies)
109 "vacancyIndex outside boundaries, energy deposited locally");
114 n = nInitShells[vacancyIndex]-1;
128 if (vacancyIndex<0 || vacancyIndex>=numberOfVacancies)
131 "vacancyIndex outside boundaries");
135 auto pos = idMap.find(vacancyIndex);
142 if (initIndex >= 0 && initIndex < nData)
144 n = dataSet[initIndex+1];
156 if (vacancyIndex<0 || vacancyIndex>=numberOfVacancies)
159 "vacancyIndex outside boundaries");}
162 auto pos = energyMap.find(vacancyIndex);
167 if (initIndex >= 0 && initIndex < nData)
169 n = dataSet[initIndex];
181 if (vacancyIndex<0 || vacancyIndex>=numberOfVacancies)
184 "vacancyIndex outside boundaries, energy deposited locally");
189 auto pos = probabilityMap.find(vacancyIndex);
194 if (initIndex >= 0 && initIndex < nData)
196 n = dataSet[initIndex];
207 std::ostringstream ost;
209 ost <<
"/fl-tr-pr-"<<
Z <<
".dat";
212 ost <<
"/fl-tr-pr-"<<
".dat";
220 G4String excep(
"G4FluoData::LoadData()");
227 G4String dirFile = pathString + fluoDirectory + name;
232 std::ifstream file(dirFile);
233 std::filebuf* lsdp = file.rdbuf();
235 if (! (lsdp->is_open()) )
237 G4String excep =
"G4FluoData::LoadData()";
238 G4String msg =
"data file: " + dirFile +
" not found";
260 idMap[vacIndex] = initIds;
261 energyMap[vacIndex] = transEnergies;
262 probabilityMap[vacIndex] = transProbabilities;
265 nInitShells.push_back(n);
274 if (sLocal == nColumns)
294 if (a != -1) transProbabilities->push_back(a);
298 else if (k%nColumns == 1)
303 if(initIds->size() == 0) {
304 if (a != -1) initIds->push_back((
G4int)a);
310 if (a != -1) initIds->push_back(a);
314 else if (k%nColumns == 0)
320 transEnergies->push_back(e);}
329 delete transEnergies;
330 delete transProbabilities;
337 for (
G4int i = 0; i <numberOfVacancies; ++i)
339 G4cout <<
"---- TransitionData for the vacancy nb "
352 G4cout <<
" - Transition energy = " << e <<
" MeV "<<
G4endl;
356 G4cout <<
"-------------------------------------------------"
const char * G4FindDataDir(const char *)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4GLOB_DLL std::ostream G4cout
std::size_t NumberOfTransitions(G4int vacancyIndex) const
G4double StartShellEnergy(G4int initIndex, G4int vacancyIndex) const
G4int VacancyId(G4int vacancyIndex) const
Given the index of the vacancy returns its identity.
std::size_t NumberOfVacancies() const
G4FluoData(const G4String &dir)
G4int StartShellId(G4int initIndex, G4int vacancyIndex) const
G4double StartShellProb(G4int initIndex, G4int vacancyIndex) const