Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4AtomicTransitionManager Class Reference

#include <G4AtomicTransitionManager.hh>

Public Member Functions

void Initialise ()
 
G4AtomicShellShell (G4int Z, size_t shellIndex) const
 
const G4FluoTransitionReachableShell (G4int Z, size_t shellIndex) const
 
const G4AugerTransitionReachableAugerShell (G4int Z, G4int shellIndex) const
 
G4int NumberOfShells (G4int Z) const
 
G4int NumberOfReachableShells (G4int Z) const
 
G4int NumberOfReachableAugerShells (G4int Z) const
 
G4double TotalRadiativeTransitionProbability (G4int Z, size_t shellIndex) const
 
G4double TotalNonRadiativeTransitionProbability (G4int Z, size_t shellIndex) const
 
void SetVerboseLevel (G4int vl)
 
G4int GetVerboseLevel ()
 

Static Public Member Functions

static G4AtomicTransitionManagerInstance ()
 

Detailed Description

Definition at line 60 of file G4AtomicTransitionManager.hh.

Member Function Documentation

G4int G4AtomicTransitionManager::GetVerboseLevel ( )
inline

Definition at line 116 of file G4AtomicTransitionManager.hh.

116 {return verboseLevel;};
void G4AtomicTransitionManager::Initialise ( )

Definition at line 286 of file G4AtomicTransitionManager.cc.

287 {
288  G4AutoLock l(&AtomicTransitionManagerMutex);
289 
290  //G4cout << "!!! G4AtomicTransitionManager::Initialise " << isInitialized
291  // << G4endl;
292  if(isInitialized) { return; }
293  isInitialized = true;
294 
295  // Selection of fluorescence files
296  G4String fluoDirectory = (G4EmParameters::Instance()->BeardenFluoDir()?
297  "/fluor_Bearden":"/fluor");
298 
299  // infTableLimit is initialized to 6 because EADL lacks data for Z<=5
300  G4ShellData* shellManager = new G4ShellData;
301  shellManager->LoadData(fluoDirectory+"/binding");
302 
303  // initialization of the data for auger effect
304  augerData = new G4AugerData;
305 
306  // Fills shellTable with the data from EADL, identities and binding
307  // energies of shells
308  for (G4int Z = zMin; Z<= zMax; ++Z)
309  {
310  std::vector<G4AtomicShell*> vectorOfShells;
311  size_t shellIndex = 0;
312 
313  size_t numberOfShells = shellManager->NumberOfShells(Z);
314  // G4cout << "For Z= " << Z << " " << numberOfShells << " shells" << G4endl;
315  for (shellIndex = 0; shellIndex<numberOfShells; ++shellIndex)
316  {
317  G4int shellId = shellManager->ShellId(Z,shellIndex);
318  G4double bindingEnergy = shellManager->BindingEnergy(Z,shellIndex);
319 
320  G4AtomicShell * shell = new G4AtomicShell(shellId,bindingEnergy);
321 
322  vectorOfShells.push_back(shell);
323  }
324 
325  // shellTable.insert(std::make_pair(Z, vectorOfShells));
326  shellTable[Z] = vectorOfShells;
327  }
328 
329  // Fills transitionTable with the data from EADL, identities, transition
330  // energies and transition probabilities
331  for (G4int Znum= infTableLimit; Znum<=supTableLimit; ++Znum)
332  {
333  G4FluoData* fluoManager = new G4FluoData(fluoDirectory);
334  std::vector<G4FluoTransition*> vectorOfTransitions;
335  fluoManager->LoadData(Znum);
336 
337  size_t numberOfVacancies = fluoManager-> NumberOfVacancies();
338 
339  for(size_t vacancyIndex = 0; vacancyIndex<numberOfVacancies;
340  ++vacancyIndex)
341  {
342  std::vector<G4int> vectorOfIds;
343  G4DataVector vectorOfEnergies;
344  G4DataVector vectorOfProbabilities;
345 
346  G4int finalShell = fluoManager->VacancyId(vacancyIndex);
347  size_t numberOfTransitions =
348  fluoManager->NumberOfTransitions(vacancyIndex);
349  for (size_t origShellIndex = 0; origShellIndex < numberOfTransitions;
350  ++origShellIndex)
351  {
352  G4int originatingShellId =
353  fluoManager->StartShellId(origShellIndex,vacancyIndex);
354  vectorOfIds.push_back(originatingShellId);
355 
356  G4double transitionEnergy =
357  fluoManager->StartShellEnergy(origShellIndex,vacancyIndex);
358  vectorOfEnergies.push_back(transitionEnergy);
359  G4double transitionProbability =
360  fluoManager->StartShellProb(origShellIndex,vacancyIndex);
361  vectorOfProbabilities.push_back(transitionProbability);
362  }
363  G4FluoTransition* transition =
364  new G4FluoTransition (finalShell,vectorOfIds,
365  vectorOfEnergies,vectorOfProbabilities);
366  vectorOfTransitions.push_back(transition);
367  }
368  transitionTable[Znum] = vectorOfTransitions;
369  delete fluoManager;
370  }
371  delete shellManager;
372 }
G4double StartShellProb(G4int initIndex, G4int vacancyIndex) const
Definition: G4FluoData.cc:168
int G4int
Definition: G4Types.hh:78
G4int ShellId(G4int Z, G4int shellIndex) const
Definition: G4ShellData.cc:121
void LoadData(const G4String &fileName)
Definition: G4ShellData.cc:234
G4double BindingEnergy(G4int Z, G4int shellIndex) const
Definition: G4ShellData.cc:166
G4int VacancyId(G4int vacancyIndex) const
Definition: G4FluoData.cc:76
G4int StartShellId(G4int initIndex, G4int vacancyIndex) const
Definition: G4FluoData.cc:115
void LoadData(G4int Z)
Definition: G4FluoData.cc:195
G4double StartShellEnergy(G4int initIndex, G4int vacancyIndex) const
Definition: G4FluoData.cc:143
size_t NumberOfShells(G4int Z) const
Definition: G4ShellData.cc:84
static G4EmParameters * Instance()
size_t NumberOfTransitions(G4int vacancyIndex) const
Definition: G4FluoData.cc:97
double G4double
Definition: G4Types.hh:76
G4double bindingEnergy(G4int A, G4int Z)
G4bool isInitialized()
G4bool BeardenFluoDir() const

Here is the call graph for this function:

Here is the caller graph for this function:

G4AtomicTransitionManager * G4AtomicTransitionManager::Instance ( void  )
static

Definition at line 45 of file G4AtomicTransitionManager.cc.

46 {
47  if (instance == 0) {
48  instance = new G4AtomicTransitionManager();
49  }
50  return instance;
51 }

Here is the caller graph for this function:

G4int G4AtomicTransitionManager::NumberOfReachableAugerShells ( G4int  Z) const

Definition at line 217 of file G4AtomicTransitionManager.cc.

218 {
219  return augerData->NumberOfVacancies(Z);
220 }
size_t NumberOfVacancies(G4int Z) const
Definition: G4AugerData.cc:113

Here is the call graph for this function:

G4int G4AtomicTransitionManager::NumberOfReachableShells ( G4int  Z) const

Definition at line 193 of file G4AtomicTransitionManager.cc.

194 {
195  std::map<G4int,std::vector<G4FluoTransition*>,std::less<G4int> >::const_iterator pos;
196  pos = transitionTable.find(Z);
197  G4int res = 0;
198  if (pos!= transitionTable.end())
199  {
200  res = ((*pos).second).size();
201  }
202  else
203  {
205  ed << "No deexcitation for Z= " << Z
206  << ", so energy deposited locally";
207  G4Exception("G4AtomicTransitionManager::NumberOfReachebleShells()",
208  "de0001",FatalException,ed,"");
209  }
210  return res;
211 }
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
int G4int
Definition: G4Types.hh:78
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
static const G4double pos

Here is the call graph for this function:

G4int G4AtomicTransitionManager::NumberOfShells ( G4int  Z) const

Definition at line 171 of file G4AtomicTransitionManager.cc.

172 {
173  std::map<G4int,std::vector<G4AtomicShell*>,std::less<G4int> >::const_iterator pos;
174  pos = shellTable.find(Z);
175 
176  G4int res = 0;
177  if (pos != shellTable.end()){
178 
179  res = ((*pos).second).size();
180 
181  } else {
183  ed << "No deexcitation for Z= " << Z;
184  G4Exception("G4AtomicTransitionManager::NumberOfShells()","de0001",
185  FatalException, ed, "");
186  }
187  return res;
188 }
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
int G4int
Definition: G4Types.hh:78
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
static const G4double pos

Here is the call graph for this function:

Here is the caller graph for this function:

const G4AugerTransition * G4AtomicTransitionManager::ReachableAugerShell ( G4int  Z,
G4int  shellIndex 
) const

Definition at line 165 of file G4AtomicTransitionManager.cc.

167 {
168  return augerData->GetAugerTransition(Z,vacancyShellIndex);
169 }
G4AugerTransition * GetAugerTransition(G4int Z, G4int vacancyShellIndex)
Definition: G4AugerData.cc:577

Here is the call graph for this function:

const G4FluoTransition * G4AtomicTransitionManager::ReachableShell ( G4int  Z,
size_t  shellIndex 
) const

Definition at line 136 of file G4AtomicTransitionManager.cc.

137 {
138  std::map<G4int,std::vector<G4FluoTransition*>,std::less<G4int> >::const_iterator pos;
139  pos = transitionTable.find(Z);
140  if (pos!= transitionTable.end())
141  {
142  std::vector<G4FluoTransition*> v = (*pos).second;
143  if (shellIndex < v.size()) { return(v[shellIndex]); }
144 
145  else {
147  ed << "No fluo transition for Z= " << Z
148  << " shellIndex= " << shellIndex;
149  G4Exception("G4AtomicTransitionManager::ReachebleShell()","de0002",
150  FatalException,ed,"");
151  }
152  }
153  else
154  {
156  ed << "No transition table for Z= " << Z
157  << " shellIndex= " << shellIndex;
158  G4Exception("G4AtomicTransitionManager::ReachableShell()","de0001",
159  FatalException,ed,"");
160  }
161  return 0;
162 }
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
static const G4double pos

Here is the call graph for this function:

void G4AtomicTransitionManager::SetVerboseLevel ( G4int  vl)
inline

Definition at line 115 of file G4AtomicTransitionManager.hh.

115 {verboseLevel = vl;};
G4AtomicShell * G4AtomicTransitionManager::Shell ( G4int  Z,
size_t  shellIndex 
) const

Definition at line 95 of file G4AtomicTransitionManager.cc.

96 {
97  std::map<G4int,std::vector<G4AtomicShell*>,std::less<G4int> >::const_iterator pos;
98 
99  pos = shellTable.find(Z);
100 
101  if (pos!= shellTable.end())
102  {
103  std::vector<G4AtomicShell*> v = (*pos).second;
104  if (shellIndex < v.size()) { return v[shellIndex]; }
105 
106  else
107  {
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",
115  JustWarning,ed," AtomicShell not found");
116  if (lastShell > 0) { return v[lastShell - 1]; }
117  }
118  }
119  else
120  {
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",
126  FatalException,ed,"");
127  }
128  return 0;
129 }
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
static const G4double pos

Here is the call graph for this function:

Here is the caller graph for this function:

G4double G4AtomicTransitionManager::TotalNonRadiativeTransitionProbability ( G4int  Z,
size_t  shellIndex 
) const

Definition at line 266 of file G4AtomicTransitionManager.cc.

268 {
269  G4double prob = 1.0 - TotalRadiativeTransitionProbability(Z, shellIndex);
270  if(prob > 1.0 || prob < 0.0) {
272  ed << "Total probability mismatch Z= " << Z
273  << " shellIndex= " << shellIndex
274  << " prob= " << prob;
275  G4Exception(
276  "G4AtomicTransitionManager::TotalNonRadiativeTransitionProbability()",
277  "de0003",FatalException,ed,"Cannot compute non-radiative probability");
278  return 0.0;
279  }
280  return prob;
281 }
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4double TotalRadiativeTransitionProbability(G4int Z, size_t shellIndex) const
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

G4double G4AtomicTransitionManager::TotalRadiativeTransitionProbability ( G4int  Z,
size_t  shellIndex 
) const

Definition at line 222 of file G4AtomicTransitionManager.cc.

224 {
225  std::map<G4int,std::vector<G4FluoTransition*>,std::less<G4int> >::const_iterator pos;
226 
227  pos = transitionTable.find(Z);
228  G4double totalRadTransProb = 0.0;
229 
230  if (pos!= transitionTable.end())
231  {
232  std::vector<G4FluoTransition*> v = (*pos).second;
233 
234  if (shellIndex < v.size())
235  {
236  G4FluoTransition* transition = v[shellIndex];
237  G4DataVector transProb = transition->TransitionProbabilities();
238 
239  for (size_t j=0; j<transProb.size(); ++j) // AM -- corrected, it was 1
240  {
241  totalRadTransProb += transProb[j];
242  }
243  }
244  else
245  {
247  ed << "Zero transition probability for Z=" << Z
248  << " shellIndex= " << shellIndex;
249  G4Exception(
250  "G4AtomicTransitionManager::TotalRadiativeTransitionProbability()",
251  "de0002",FatalException,"Incorrect de-excitation");
252  }
253  }
254  else
255  {
257  ed << "No deexcitation for Z=" << Z
258  << " shellIndex= " << shellIndex;
259  G4Exception(
260  "G4AtomicTransitionManager::TotalRadiativeTransitionProbability()",
261  "de0001",FatalException,ed,"Cannot compute transition probability");
262  }
263  return totalRadTransProb;
264 }
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
const G4DataVector & TransitionProbabilities() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
double G4double
Definition: G4Types.hh:76
static const G4double pos

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following files: