Geant4  10.02.p03
G4AtomicTransitionManager Class Reference

#include <G4AtomicTransitionManager.hh>

Collaboration diagram for G4AtomicTransitionManager:

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 ()
 

Private Member Functions

 G4AtomicTransitionManager ()
 
 ~G4AtomicTransitionManager ()
 
G4AtomicTransitionManageroperator= (const G4AtomicTransitionManager &right)
 
 G4AtomicTransitionManager (const G4AtomicTransitionManager &)
 

Private Attributes

std::map< G4int, std::vector< G4AtomicShell * >, std::less< G4int > > shellTable
 
std::map< G4int, std::vector< G4FluoTransition * >, std::less< G4int > > transitionTable
 
G4AugerDataaugerData
 
G4int zMin
 
G4int zMax
 
G4int infTableLimit
 
G4int supTableLimit
 
G4bool isInitialized
 
G4int verboseLevel
 

Static Private Attributes

static G4AtomicTransitionManagerinstance = 0
 

Detailed Description

Definition at line 60 of file G4AtomicTransitionManager.hh.

Constructor & Destructor Documentation

◆ G4AtomicTransitionManager() [1/2]

G4AtomicTransitionManager::G4AtomicTransitionManager ( )
private

Definition at line 53 of file G4AtomicTransitionManager.cc.

Here is the caller graph for this function:

◆ ~G4AtomicTransitionManager()

G4AtomicTransitionManager::~G4AtomicTransitionManager ( )
private

Definition at line 63 of file G4AtomicTransitionManager.cc.

64 {
65  delete augerData;
66 
67  std::map<G4int,std::vector<G4AtomicShell*>,std::less<G4int> >::iterator pos;
68 
69  for(pos = shellTable.begin(); pos != shellTable.end(); ++pos){
70 
71  std::vector<G4AtomicShell*>vec = (*pos).second;
72  G4int vecSize = vec.size();
73 
74  for (G4int i=0; i< vecSize; ++i){
75  G4AtomicShell* shell = vec[i];
76  delete shell;
77  }
78  }
79 
80  std::map<G4int,std::vector<G4FluoTransition*>,std::less<G4int> >::iterator ppos;
81  for (ppos = transitionTable.begin(); ppos != transitionTable.end(); ++ppos){
82 
83  std::vector<G4FluoTransition*>vec = (*ppos).second;
84 
85  G4int vecSize=vec.size();
86 
87  for (G4int i=0; i< vecSize; i++){
88  G4FluoTransition* transition = vec[i];
89  delete transition;
90  }
91  }
92 }
std::map< G4int, std::vector< G4FluoTransition * >, std::less< G4int > > transitionTable
std::map< G4int, std::vector< G4AtomicShell * >, std::less< G4int > > shellTable
int G4int
Definition: G4Types.hh:78
static const G4double pos
Here is the caller graph for this function:

◆ G4AtomicTransitionManager() [2/2]

G4AtomicTransitionManager::G4AtomicTransitionManager ( const G4AtomicTransitionManager )
private

Member Function Documentation

◆ GetVerboseLevel()

G4int G4AtomicTransitionManager::GetVerboseLevel ( )
inline

Definition at line 116 of file G4AtomicTransitionManager.hh.

Here is the call graph for this function:

◆ Initialise()

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 }
G4int StartShellId(G4int initIndex, G4int vacancyIndex) const
Definition: G4FluoData.cc:115
G4int VacancyId(G4int vacancyIndex) const
Definition: G4FluoData.cc:76
G4int ShellId(G4int Z, G4int shellIndex) const
Definition: G4ShellData.cc:121
std::map< G4int, std::vector< G4FluoTransition * >, std::less< G4int > > transitionTable
std::map< G4int, std::vector< G4AtomicShell * >, std::less< G4int > > shellTable
int G4int
Definition: G4Types.hh:78
void LoadData(const G4String &fileName)
Definition: G4ShellData.cc:234
G4bool BeardenFluoDir() const
Float_t Z
size_t NumberOfShells(G4int Z) const
Definition: G4ShellData.cc:84
G4double BindingEnergy(G4int Z, G4int shellIndex) const
Definition: G4ShellData.cc:166
G4double StartShellEnergy(G4int initIndex, G4int vacancyIndex) const
Definition: G4FluoData.cc:143
void LoadData(G4int Z)
Definition: G4FluoData.cc:195
static G4EmParameters * Instance()
double G4double
Definition: G4Types.hh:76
G4double StartShellProb(G4int initIndex, G4int vacancyIndex) const
Definition: G4FluoData.cc:168
size_t NumberOfTransitions(G4int vacancyIndex) const
Definition: G4FluoData.cc:97
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Instance()

G4AtomicTransitionManager * G4AtomicTransitionManager::Instance ( void  )
static

Definition at line 45 of file G4AtomicTransitionManager.cc.

46 {
47  if (instance == 0) {
49  }
50  return instance;
51 }
static G4AtomicTransitionManager * instance
Here is the call graph for this function:
Here is the caller graph for this function:

◆ NumberOfReachableAugerShells()

G4int G4AtomicTransitionManager::NumberOfReachableAugerShells ( G4int  Z) const

Definition at line 217 of file G4AtomicTransitionManager.cc.

218 {
219  return augerData->NumberOfVacancies(Z);
220 }
Float_t Z
size_t NumberOfVacancies(G4int Z) const
Definition: G4AugerData.cc:113
Here is the call graph for this function:
Here is the caller graph for this function:

◆ NumberOfReachableShells()

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
std::map< G4int, std::vector< G4FluoTransition * >, std::less< G4int > > transitionTable
int G4int
Definition: G4Types.hh:78
Float_t Z
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:

◆ NumberOfShells()

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
std::map< G4int, std::vector< G4AtomicShell * >, std::less< G4int > > shellTable
int G4int
Definition: G4Types.hh:78
Float_t Z
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:

◆ operator=()

G4AtomicTransitionManager& G4AtomicTransitionManager::operator= ( const G4AtomicTransitionManager right)
private
Here is the caller graph for this function:

◆ ReachableAugerShell()

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 }
Float_t Z
G4AugerTransition * GetAugerTransition(G4int Z, G4int vacancyShellIndex)
Definition: G4AugerData.cc:577
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReachableShell()

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
std::map< G4int, std::vector< G4FluoTransition * >, std::less< G4int > > transitionTable
Float_t Z
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:

◆ SetVerboseLevel()

void G4AtomicTransitionManager::SetVerboseLevel ( G4int  vl)
inline

Definition at line 115 of file G4AtomicTransitionManager.hh.

◆ Shell()

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
std::map< G4int, std::vector< G4AtomicShell * >, std::less< G4int > > shellTable
Float_t Z
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:

◆ TotalNonRadiativeTransitionProbability()

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
G4double TotalRadiativeTransitionProbability(G4int Z, size_t shellIndex) const
Float_t Z
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:

◆ TotalRadiativeTransitionProbability()

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
std::map< G4int, std::vector< G4FluoTransition * >, std::less< G4int > > transitionTable
Float_t Z
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
double G4double
Definition: G4Types.hh:76
const G4DataVector & TransitionProbabilities() const
static const G4double pos
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ augerData

G4AugerData* G4AtomicTransitionManager::augerData
private

Definition at line 140 of file G4AtomicTransitionManager.hh.

◆ infTableLimit

G4int G4AtomicTransitionManager::infTableLimit
private

Definition at line 149 of file G4AtomicTransitionManager.hh.

◆ instance

G4AtomicTransitionManager * G4AtomicTransitionManager::instance = 0
staticprivate

Definition at line 128 of file G4AtomicTransitionManager.hh.

◆ isInitialized

G4bool G4AtomicTransitionManager::isInitialized
private

Definition at line 152 of file G4AtomicTransitionManager.hh.

◆ shellTable

std::map<G4int,std::vector<G4AtomicShell*>,std::less<G4int> > G4AtomicTransitionManager::shellTable
private

Definition at line 132 of file G4AtomicTransitionManager.hh.

◆ supTableLimit

G4int G4AtomicTransitionManager::supTableLimit
private

Definition at line 150 of file G4AtomicTransitionManager.hh.

◆ transitionTable

std::map<G4int,std::vector<G4FluoTransition*>,std::less<G4int> > G4AtomicTransitionManager::transitionTable
private

Definition at line 136 of file G4AtomicTransitionManager.hh.

◆ verboseLevel

G4int G4AtomicTransitionManager::verboseLevel
private

Definition at line 154 of file G4AtomicTransitionManager.hh.

◆ zMax

G4int G4AtomicTransitionManager::zMax
private

Definition at line 145 of file G4AtomicTransitionManager.hh.

◆ zMin

G4int G4AtomicTransitionManager::zMin
private

Definition at line 144 of file G4AtomicTransitionManager.hh.


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