53 G4AtomicTransitionManager::G4AtomicTransitionManager()
63 G4AtomicTransitionManager::~G4AtomicTransitionManager()
67 std::map<G4int,std::vector<G4AtomicShell*>,std::less<G4int> >::iterator
pos;
69 for(pos = shellTable.begin(); pos != shellTable.end(); ++
pos){
71 std::vector<G4AtomicShell*>vec = (*pos).second;
72 G4int vecSize = vec.size();
74 for (
G4int i=0; i< vecSize; ++i){
80 std::map<G4int,std::vector<G4FluoTransition*>,std::less<G4int> >::iterator ppos;
81 for (ppos = transitionTable.begin(); ppos != transitionTable.end(); ++ppos){
83 std::vector<G4FluoTransition*>vec = (*ppos).second;
85 G4int vecSize=vec.size();
87 for (
G4int i=0; i< vecSize; i++){
97 std::map<G4int,std::vector<G4AtomicShell*>,std::less<G4int> >::const_iterator
pos;
99 pos = shellTable.find(Z);
101 if (pos!= shellTable.end())
103 std::vector<G4AtomicShell*> v = (*pos).second;
104 if (shellIndex < v.size()) {
return v[shellIndex]; }
108 size_t lastShell = v.size();
110 ed <<
"No de-excitation for Z= " << Z
111 <<
" shellIndex= " << shellIndex
112 <<
">= numberOfShells= " << lastShell;
113 if (verboseLevel > 0)
114 G4Exception(
"G4AtomicTransitionManager::Shell()",
"de0001",
116 if (lastShell > 0) {
return v[lastShell - 1]; }
122 ed <<
"No de-excitation for Z= " << Z
123 <<
" shellIndex= " << shellIndex
124 <<
". AtomicShell not found - check if data are uploaded";
125 G4Exception(
"G4AtomicTransitionManager::Shell()",
"de0001",
138 std::map<G4int,std::vector<G4FluoTransition*>,std::less<G4int> >::const_iterator
pos;
139 pos = transitionTable.find(Z);
140 if (pos!= transitionTable.end())
142 std::vector<G4FluoTransition*> v = (*pos).second;
143 if (shellIndex < v.size()) {
return(v[shellIndex]); }
147 ed <<
"No fluo transition for Z= " << Z
148 <<
" shellIndex= " << shellIndex;
149 G4Exception(
"G4AtomicTransitionManager::ReachebleShell()",
"de0002",
156 ed <<
"No transition table for Z= " << Z
157 <<
" shellIndex= " << shellIndex;
158 G4Exception(
"G4AtomicTransitionManager::ReachableShell()",
"de0001",
166 G4int vacancyShellIndex)
const
173 std::map<G4int,std::vector<G4AtomicShell*>,std::less<G4int> >::const_iterator
pos;
174 pos = shellTable.find(Z);
177 if (pos != shellTable.end()){
179 res = ((*pos).second).size();
183 ed <<
"No deexcitation for Z= " <<
Z;
184 G4Exception(
"G4AtomicTransitionManager::NumberOfShells()",
"de0001",
195 std::map<G4int,std::vector<G4FluoTransition*>,std::less<G4int> >::const_iterator
pos;
196 pos = transitionTable.find(Z);
198 if (pos!= transitionTable.end())
200 res = ((*pos).second).size();
205 ed <<
"No deexcitation for Z= " << Z
206 <<
", so energy deposited locally";
207 G4Exception(
"G4AtomicTransitionManager::NumberOfReachebleShells()",
223 G4int Z,
size_t shellIndex)
const
225 std::map<G4int,std::vector<G4FluoTransition*>,std::less<G4int> >::const_iterator
pos;
227 pos = transitionTable.find(Z);
230 if (pos!= transitionTable.end())
232 std::vector<G4FluoTransition*> v = (*pos).second;
234 if (shellIndex < v.size())
239 for (
size_t j=0; j<transProb.size(); ++j)
241 totalRadTransProb += transProb[j];
247 ed <<
"Zero transition probability for Z=" << Z
248 <<
" shellIndex= " << shellIndex;
250 "G4AtomicTransitionManager::TotalRadiativeTransitionProbability()",
257 ed <<
"No deexcitation for Z=" << Z
258 <<
" shellIndex= " << shellIndex;
260 "G4AtomicTransitionManager::TotalRadiativeTransitionProbability()",
261 "de0001",
FatalException,ed,
"Cannot compute transition probability");
263 return totalRadTransProb;
267 G4int Z,
size_t shellIndex)
const
270 if(prob > 1.0 || prob < 0.0) {
272 ed <<
"Total probability mismatch Z= " << Z
273 <<
" shellIndex= " << shellIndex
274 <<
" prob= " << prob;
276 "G4AtomicTransitionManager::TotalNonRadiativeTransitionProbability()",
277 "de0003",
FatalException,ed,
"Cannot compute non-radiative probability");
292 if(isInitialized) {
return; }
293 isInitialized =
true;
297 "/fluor_Bearden":
"/fluor");
301 shellManager->
LoadData(fluoDirectory+
"/binding");
310 std::vector<G4AtomicShell*> vectorOfShells;
311 size_t shellIndex = 0;
315 for (shellIndex = 0; shellIndex<numberOfShells; ++shellIndex)
322 vectorOfShells.push_back(shell);
326 shellTable[
Z] = vectorOfShells;
331 for (
G4int Znum= infTableLimit; Znum<=supTableLimit; ++Znum)
334 std::vector<G4FluoTransition*> vectorOfTransitions;
337 size_t numberOfVacancies = fluoManager-> NumberOfVacancies();
339 for(
size_t vacancyIndex = 0; vacancyIndex<numberOfVacancies;
342 std::vector<G4int> vectorOfIds;
347 size_t numberOfTransitions =
349 for (
size_t origShellIndex = 0; origShellIndex < numberOfTransitions;
352 G4int originatingShellId =
354 vectorOfIds.push_back(originatingShellId);
358 vectorOfEnergies.push_back(transitionEnergy);
361 vectorOfProbabilities.push_back(transitionProbability);
365 vectorOfEnergies,vectorOfProbabilities);
366 vectorOfTransitions.push_back(transition);
368 transitionTable[Znum] = vectorOfTransitions;
G4int NumberOfShells(G4int Z) const
G4double StartShellProb(G4int initIndex, G4int vacancyIndex) const
std::ostringstream G4ExceptionDescription
const G4AugerTransition * ReachableAugerShell(G4int Z, G4int shellIndex) const
G4int NumberOfReachableShells(G4int Z) const
const G4DataVector & TransitionProbabilities() const
#define G4MUTEX_INITIALIZER
G4int ShellId(G4int Z, G4int shellIndex) const
void LoadData(const G4String &fileName)
G4double TotalNonRadiativeTransitionProbability(G4int Z, size_t shellIndex) const
G4double BindingEnergy(G4int Z, G4int shellIndex) const
G4int VacancyId(G4int vacancyIndex) const
G4int NumberOfReachableAugerShells(G4int Z) const
G4int StartShellId(G4int initIndex, G4int vacancyIndex) const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4double TotalRadiativeTransitionProbability(G4int Z, size_t shellIndex) const
G4double StartShellEnergy(G4int initIndex, G4int vacancyIndex) const
const G4FluoTransition * ReachableShell(G4int Z, size_t shellIndex) const
size_t NumberOfShells(G4int Z) const
static G4EmParameters * Instance()
size_t NumberOfTransitions(G4int vacancyIndex) const
G4AugerTransition * GetAugerTransition(G4int Z, G4int vacancyShellIndex)
size_t NumberOfVacancies(G4int Z) const
G4double bindingEnergy(G4int A, G4int Z)
static G4AtomicTransitionManager * Instance()
G4AtomicShell * Shell(G4int Z, size_t shellIndex) const
static const G4double pos
G4bool BeardenFluoDir() const