52G4AtomicTransitionManager::G4AtomicTransitionManager()
62G4AtomicTransitionManager::~G4AtomicTransitionManager()
66 std::map<G4int,std::vector<G4AtomicShell*>,std::less<G4int> >::iterator
pos;
68 for(pos = shellTable.begin(); pos != shellTable.end(); ++pos){
70 std::vector<G4AtomicShell*>vec = (*pos).second;
71 G4int vecSize = vec.size();
73 for (
G4int i=0; i< vecSize; ++i){
79 std::map<G4int,std::vector<G4FluoTransition*>,std::less<G4int> >::iterator ppos;
80 for (ppos = transitionTable.begin(); ppos != transitionTable.end(); ++ppos){
82 std::vector<G4FluoTransition*>vec = (*ppos).second;
84 G4int vecSize=vec.size();
86 for (
G4int i=0; i< vecSize; i++){
96 std::map<G4int,std::vector<G4AtomicShell*>,std::less<G4int> >::const_iterator pos;
98 pos = shellTable.find(Z);
100 if (pos!= shellTable.end())
102 std::vector<G4AtomicShell*> v = (*pos).second;
103 if (shellIndex < v.size()) {
return v[shellIndex]; }
107 size_t lastShell = v.size();
109 ed <<
"No de-excitation for Z= " << Z
110 <<
" shellIndex= " << shellIndex
111 <<
">= numberOfShells= " << lastShell;
112 if (verboseLevel > 0)
113 G4Exception(
"G4AtomicTransitionManager::Shell()",
"de0001",
115 if (lastShell > 0) {
return v[lastShell - 1]; }
121 ed <<
"No de-excitation for Z= " << Z
122 <<
" shellIndex= " << shellIndex
123 <<
". AtomicShell not found - check if data are uploaded";
124 G4Exception(
"G4AtomicTransitionManager::Shell()",
"de0001",
137 std::map<G4int,std::vector<G4FluoTransition*>,std::less<G4int> >::const_iterator pos;
138 pos = transitionTable.find(Z);
139 if (pos!= transitionTable.end())
141 std::vector<G4FluoTransition*> v = (*pos).second;
142 if (shellIndex < v.size()) {
return(v[shellIndex]); }
146 ed <<
"No fluo transition for Z= " << Z
147 <<
" shellIndex= " << shellIndex;
148 G4Exception(
"G4AtomicTransitionManager::ReachebleShell()",
"de0002",
155 ed <<
"No transition table for Z= " << Z
156 <<
" shellIndex= " << shellIndex;
157 G4Exception(
"G4AtomicTransitionManager::ReachableShell()",
"de0001",
165 G4int vacancyShellIndex)
const
172 std::map<G4int,std::vector<G4AtomicShell*>,std::less<G4int> >::const_iterator pos;
173 pos = shellTable.find(Z);
176 if (pos != shellTable.end()){
178 res = ((*pos).second).size();
182 ed <<
"No deexcitation for Z= " << Z;
183 G4Exception(
"G4AtomicTransitionManager::NumberOfShells()",
"de0001",
194 std::map<G4int,std::vector<G4FluoTransition*>,std::less<G4int> >::const_iterator pos;
195 pos = transitionTable.find(Z);
197 if (pos!= transitionTable.end())
199 res = ((*pos).second).size();
204 ed <<
"No deexcitation for Z= " << Z
205 <<
", so energy deposited locally";
206 G4Exception(
"G4AtomicTransitionManager::NumberOfReachebleShells()",
222 G4int Z,
size_t shellIndex)
const
224 std::map<G4int,std::vector<G4FluoTransition*>,std::less<G4int> >::const_iterator pos;
226 pos = transitionTable.find(Z);
229 if (pos!= transitionTable.end())
231 std::vector<G4FluoTransition*> v = (*pos).second;
233 if (shellIndex < v.size())
238 for (
size_t j=0; j<transProb.size(); ++j)
240 totalRadTransProb += transProb[j];
246 ed <<
"Zero transition probability for Z=" << Z
247 <<
" shellIndex= " << shellIndex;
249 "G4AtomicTransitionManager::TotalRadiativeTransitionProbability()",
256 ed <<
"No deexcitation for Z=" << Z
257 <<
" shellIndex= " << shellIndex;
259 "G4AtomicTransitionManager::TotalRadiativeTransitionProbability()",
260 "de0001",
FatalException,ed,
"Cannot compute transition probability");
262 return totalRadTransProb;
266 G4int Z,
size_t shellIndex)
const
269 if(prob > 1.0 || prob < 0.0) {
271 ed <<
"Total probability mismatch Z= " << Z
272 <<
" shellIndex= " << shellIndex
273 <<
" prob= " << prob;
275 "G4AtomicTransitionManager::TotalNonRadiativeTransitionProbability()",
276 "de0003",
FatalException,ed,
"Cannot compute non-radiative probability");
291 if(isInitialized) {
return; }
292 isInitialized =
true;
296 "/fluor_Bearden":
"/fluor");
300 shellManager->
LoadData(fluoDirectory+
"/binding");
307 for (
G4int Z = zMin; Z<= zMax; ++Z)
309 std::vector<G4AtomicShell*> vectorOfShells;
310 size_t shellIndex = 0;
314 for (shellIndex = 0; shellIndex<numberOfShells; ++shellIndex)
321 vectorOfShells.push_back(shell);
325 shellTable[Z] = vectorOfShells;
330 for (
G4int Znum= infTableLimit; Znum<=supTableLimit; ++Znum)
333 std::vector<G4FluoTransition*> vectorOfTransitions;
336 size_t numberOfVacancies = fluoManager-> NumberOfVacancies();
338 for(
size_t vacancyIndex = 0; vacancyIndex<numberOfVacancies;
341 std::vector<G4int> vectorOfIds;
346 size_t numberOfTransitions =
348 for (
size_t origShellIndex = 0; origShellIndex < numberOfTransitions;
351 G4int originatingShellId =
353 vectorOfIds.push_back(originatingShellId);
357 vectorOfEnergies.push_back(transitionEnergy);
360 vectorOfProbabilities.push_back(transitionProbability);
364 vectorOfEnergies,vectorOfProbabilities);
365 vectorOfTransitions.push_back(transition);
367 transitionTable[Znum] = vectorOfTransitions;
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
#define G4MUTEX_INITIALIZER
G4int NumberOfReachableShells(G4int Z) const
G4double TotalRadiativeTransitionProbability(G4int Z, size_t shellIndex) const
const G4AugerTransition * ReachableAugerShell(G4int Z, G4int shellIndex) const
G4AtomicShell * Shell(G4int Z, size_t shellIndex) const
const G4FluoTransition * ReachableShell(G4int Z, size_t shellIndex) const
G4int NumberOfShells(G4int Z) const
G4double TotalNonRadiativeTransitionProbability(G4int Z, size_t shellIndex) const
static G4AtomicTransitionManager * Instance()
G4int NumberOfReachableAugerShells(G4int Z) const
G4AugerTransition * GetAugerTransition(G4int Z, G4int vacancyShellIndex)
size_t NumberOfVacancies(G4int Z) const
static G4EmParameters * Instance()
G4bool BeardenFluoDir() const
G4double StartShellEnergy(G4int initIndex, G4int vacancyIndex) const
size_t NumberOfTransitions(G4int vacancyIndex) const
G4int VacancyId(G4int vacancyIndex) const
G4int StartShellId(G4int initIndex, G4int vacancyIndex) const
G4double StartShellProb(G4int initIndex, G4int vacancyIndex) const
const G4DataVector & TransitionProbabilities() const
G4int ShellId(G4int Z, G4int shellIndex) const
G4double BindingEnergy(G4int Z, G4int shellIndex) const
size_t NumberOfShells(G4int Z) const
void LoadData(const G4String &fileName)