51 std::map<G4int,G4DataVector*,std::less<G4int> >::iterator pos;
53 for (pos = idMap.begin(); pos != idMap.end(); ++pos)
58 for (pos = energyMap.begin(); pos != energyMap.end(); ++pos)
63 for (pos = probabilityMap.begin(); pos != probabilityMap.end(); ++pos)
72 return numberOfVacancies;
78 if (vacancyIndex<0 || vacancyIndex>=numberOfVacancies)
79 {
G4Exception(
"G4RDFluoData::VacancyId()",
"OutOfRange",
83 std::map<G4int,G4DataVector*,std::less<G4int> >::const_iterator pos;
84 pos = idMap.find(vacancyIndex);
85 if (pos!= idMap.end())
87 n = (
G4int) dataSet[0];
97 if (vacancyIndex<0 || vacancyIndex>=numberOfVacancies)
98 {
G4Exception(
"G4RDFluoData::NumberOfTransitions()",
"OutOfRange",
102 n = nInitShells[vacancyIndex]-1;
113 if (vacancyIndex<0 || vacancyIndex>=numberOfVacancies)
114 {
G4Exception(
"G4RDFluoData::StartShellId()",
"OutOfRange",
118 std::map<G4int,G4DataVector*,std::less<G4int> >::const_iterator pos;
120 pos = idMap.find(vacancyIndex);
124 G4int nData = dataSet.size();
127 if (initIndex >= 0 && initIndex < nData)
129 n = (
G4int) dataSet[initIndex+1];
140 if (vacancyIndex<0 || vacancyIndex>=numberOfVacancies)
141 {
G4Exception(
"G4RDFluoData::StartShellEnergy()",
"OutOfRange",
145 std::map<G4int,G4DataVector*,std::less<G4int> >::const_iterator pos;
147 pos = energyMap.find(vacancyIndex);
151 G4int nData = dataSet.size();
152 if (initIndex >= 0 && initIndex < nData)
154 n = dataSet[initIndex];
165 if (vacancyIndex<0 || vacancyIndex>=numberOfVacancies)
166 {
G4Exception(
"G4RDFluoData::StartShellProb()",
"OutOfRange",
170 std::map<G4int,G4DataVector*,std::less<G4int> >::const_iterator pos;
172 pos = probabilityMap.find(vacancyIndex);
176 G4int nData = dataSet.size();
177 if (initIndex >= 0 && initIndex < nData)
179 n = dataSet[initIndex];
190 std::ostringstream ost;
192 ost <<
"fl-tr-pr-"<< Z <<
".dat";
195 ost <<
"fl-tr-pr-"<<
".dat";
199 char* path = getenv(
"G4LEDATA");
202 G4String excep(
"G4LEDATA environment variable not set!");
203 G4Exception(
"G4RDEMDataSet::LoadData()",
"InvalidSetup",
210 std::ifstream
file(dirFile);
211 std::filebuf* lsdp = file.rdbuf();
213 if (! (lsdp->is_open()) )
215 G4String excep =
"Data file: " + dirFile +
" not found";
216 G4Exception(
"G4RDEMDataSet::LoadData()",
"DataNotFound",
237 idMap[vacIndex] = initIds;
238 energyMap[vacIndex] = transEnergies;
239 probabilityMap[vacIndex] = transProbabilities;
241 G4int n = initIds->size();
243 nInitShells.push_back(n);
262 delete transEnergies;
263 delete transProbabilities;
272 if (a != -1) transProbabilities->push_back(a);
276 else if (k%nColumns == 1)
281 if(initIds->size() == 0) {
282 if (a != -1) initIds->push_back((
G4int)a);
288 if (a != -1) initIds->push_back(a);
292 else if (k%nColumns == 0)
298 transEnergies->push_back(e);}
311 for (
G4int i = 0; i <numberOfVacancies; i++)
313 G4cout <<
"---- TransitionData for the vacancy nb "
326 G4cout <<
" - Transition energy = " << e <<
" MeV "<<
G4endl;
330 G4cout <<
"-------------------------------------------------"
size_t NumberOfTransitions(G4int vacancyIndex) const
G4GLOB_DLL std::ostream G4cout
G4int VacancyId(G4int vacancyIndex) const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4double StartShellEnergy(G4int initIndex, G4int vacancyIndex) const
G4double StartShellProb(G4int initIndex, G4int vacancyIndex) const
size_t NumberOfVacancies() const
G4int StartShellId(G4int initIndex, G4int vacancyIndex) const