Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions
G4RDAtomicTransitionManager Class Reference

#include <G4RDAtomicTransitionManager.hh>

Public Member Functions

G4RDAtomicShellShell (G4int Z, size_t shellIndex) const
 
const G4RDFluoTransitionReachableShell (G4int Z, size_t shellIndex) const
 
const G4RDAugerTransitionReachableAugerShell (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)
 
G4double TotalNonRadiativeTransitionProbability (G4int Z, size_t shellIndex)
 

Static Public Member Functions

static
G4RDAtomicTransitionManager
Instance ()
 

Protected Member Functions

 G4RDAtomicTransitionManager (G4int minZ=1, G4int maxZ=100, G4int limitInfTable=6, G4int limitSupTable=100)
 
 ~G4RDAtomicTransitionManager ()
 

Detailed Description

Definition at line 61 of file G4RDAtomicTransitionManager.hh.

Constructor & Destructor Documentation

G4RDAtomicTransitionManager::G4RDAtomicTransitionManager ( G4int  minZ = 1,
G4int  maxZ = 100,
G4int  limitInfTable = 6,
G4int  limitSupTable = 100 
)
protected

Definition at line 41 of file G4RDAtomicTransitionManager.cc.

References G4InuclSpecialFunctions::bindingEnergy(), G4RDShellData::BindingEnergy(), G4RDShellData::LoadData(), G4RDFluoData::LoadData(), G4RDShellData::NumberOfShells(), G4RDFluoData::NumberOfTransitions(), G4RDShellData::ShellId(), G4RDFluoData::StartShellEnergy(), G4RDFluoData::StartShellId(), G4RDFluoData::StartShellProb(), and G4RDFluoData::VacancyId().

Referenced by Instance().

43  :zMin(minZ),
44  zMax(maxZ),
45  infTableLimit(limitInfTable),
46  supTableLimit(limitSupTable)
47 {
48  // infTableLimit is initialized to 6 because EADL lacks data for Z<=5
49  G4RDShellData* shellManager = new G4RDShellData;
50 
51  // initialization of the data for auger effect
52 
53  augerData = new G4RDAugerData;
54 
55  shellManager->LoadData("/fluor/binding");
56 
57  // Fills shellTable with the data from EADL, identities and binding
58  // energies of shells
59  for (G4int Z = zMin; Z<= zMax; Z++)
60  {
61  std::vector<G4RDAtomicShell*> vectorOfShells;
62  size_t shellIndex = 0;
63 
64  size_t numberOfShells=shellManager->NumberOfShells(Z);
65  for (shellIndex = 0; shellIndex<numberOfShells; shellIndex++)
66  {
67  G4int shellId = shellManager->ShellId(Z,shellIndex);
68  G4double bindingEnergy = shellManager->BindingEnergy(Z,shellIndex);
69 
70  G4RDAtomicShell * shell = new G4RDAtomicShell(shellId,bindingEnergy);
71 
72  vectorOfShells.push_back(shell);
73  }
74 
75  // shellTable.insert(std::make_pair(Z, vectorOfShells));
76  shellTable[Z] = vectorOfShells;
77  }
78 
79  // Fills transitionTable with the data from EADL, identities, transition
80  // energies and transition probabilities
81  for (G4int Znum= infTableLimit; Znum<=supTableLimit; Znum++)
82  { G4RDFluoData* fluoManager = new G4RDFluoData;
83  std::vector<G4RDFluoTransition*> vectorOfTransitions;
84  fluoManager->LoadData(Znum);
85 
86  size_t numberOfVacancies = fluoManager-> NumberOfVacancies();
87 
88  for (size_t vacancyIndex = 0; vacancyIndex<numberOfVacancies; vacancyIndex++)
89 
90  {
91  std::vector<G4int> vectorOfIds;
92  G4DataVector vectorOfEnergies;
93  G4DataVector vectorOfProbabilities;
94 
95  G4int finalShell = fluoManager->VacancyId(vacancyIndex);
96  size_t numberOfTransitions = fluoManager->NumberOfTransitions(vacancyIndex);
97  for (size_t origShellIndex = 0; origShellIndex < numberOfTransitions;
98  origShellIndex++)
99 
100  {
101 
102  G4int originatingShellId = fluoManager->StartShellId(origShellIndex,vacancyIndex);
103 
104  vectorOfIds.push_back(originatingShellId);
105 
106  G4double transitionEnergy = fluoManager->StartShellEnergy(origShellIndex,vacancyIndex);
107  vectorOfEnergies.push_back(transitionEnergy);
108  G4double transitionProbability = fluoManager->StartShellProb(origShellIndex,vacancyIndex);
109  vectorOfProbabilities.push_back(transitionProbability);
110  }
111  G4RDFluoTransition * transition = new G4RDFluoTransition (finalShell,vectorOfIds,
112  vectorOfEnergies,vectorOfProbabilities);
113  vectorOfTransitions.push_back(transition);
114  }
115  // transitionTable.insert(std::make_pair(Znum, vectorOfTransitions));
116  transitionTable[Znum] = vectorOfTransitions;
117 
118  delete fluoManager;
119  }
120  delete shellManager;
121 }
size_t NumberOfTransitions(G4int vacancyIndex) const
Definition: G4RDFluoData.cc:94
G4double BindingEnergy(G4int Z, G4int shellIndex) const
int G4int
Definition: G4Types.hh:78
size_t NumberOfShells(G4int Z) const
void LoadData(const G4String &fileName)
void LoadData(G4int Z)
G4int VacancyId(G4int vacancyIndex) const
Definition: G4RDFluoData.cc:75
G4int ShellId(G4int Z, G4int shellIndex) const
G4double StartShellEnergy(G4int initIndex, G4int vacancyIndex) const
double G4double
Definition: G4Types.hh:76
G4double StartShellProb(G4int initIndex, G4int vacancyIndex) const
G4double bindingEnergy(G4int A, G4int Z)
G4int StartShellId(G4int initIndex, G4int vacancyIndex) const
G4RDAtomicTransitionManager::~G4RDAtomicTransitionManager ( )
protected

Definition at line 123 of file G4RDAtomicTransitionManager.cc.

125 {
126 
127  delete augerData;
128 
129 std::map<G4int,std::vector<G4RDAtomicShell*>,std::less<G4int> >::iterator pos;
130 
131  for (pos = shellTable.begin(); pos != shellTable.end(); pos++){
132 
133  std::vector< G4RDAtomicShell*>vec = (*pos).second;
134 
135  G4int vecSize=vec.size();
136 
137  for (G4int i=0; i< vecSize; i++){
138  G4RDAtomicShell* shell = vec[i];
139  delete shell;
140  }
141 
142  }
143 
144  std::map<G4int,std::vector<G4RDFluoTransition*>,std::less<G4int> >::iterator ppos;
145 
146  for (ppos = transitionTable.begin(); ppos != transitionTable.end(); ppos++){
147 
148  std::vector<G4RDFluoTransition*>vec = (*ppos).second;
149 
150  G4int vecSize=vec.size();
151 
152  for (G4int i=0; i< vecSize; i++){
153  G4RDFluoTransition* transition = vec[i];
154  delete transition;
155  }
156 
157  }
158 
159 }
int G4int
Definition: G4Types.hh:78

Member Function Documentation

G4RDAtomicTransitionManager * G4RDAtomicTransitionManager::Instance ( void  )
static

Definition at line 163 of file G4RDAtomicTransitionManager.cc.

References G4RDAtomicTransitionManager().

Referenced by G4RDeIonisationSpectrum::AverageEnergy(), G4LowEnergyIonisation::DeexciteAtom(), G4LowEnergyPhotoElectric::PostStepDoIt(), G4LowEnergyIonisation::PostStepDoIt(), G4RDeIonisationSpectrum::Probability(), and G4RDeIonisationSpectrum::SampleEnergy().

164 {
165  if (instance == 0)
166  {
167  instance = new G4RDAtomicTransitionManager;
168 
169  }
170  return instance;
171 }
G4RDAtomicTransitionManager(G4int minZ=1, G4int maxZ=100, G4int limitInfTable=6, G4int limitSupTable=100)
G4int G4RDAtomicTransitionManager::NumberOfReachableAugerShells ( G4int  Z) const

Definition at line 298 of file G4RDAtomicTransitionManager.cc.

References n, and G4RDAugerData::NumberOfVacancies().

299 {
300  G4int n = augerData->NumberOfVacancies(Z);
301  return n;
302 }
int G4int
Definition: G4Types.hh:78
const G4int n
size_t NumberOfVacancies(G4int Z) const
G4int G4RDAtomicTransitionManager::NumberOfReachableShells ( G4int  Z) const

Definition at line 274 of file G4RDAtomicTransitionManager.cc.

References G4cout, G4endl, and test::v.

275 {
276 std::map<G4int,std::vector<G4RDFluoTransition*>,std::less<G4int> >::const_iterator pos;
277 
278  pos = transitionTable.find(Z);
279 
280  if (pos!= transitionTable.end())
281  {
282  std::vector<G4RDFluoTransition*> v = (*pos).second;
283  return v.size();
284  }
285  else
286  {
287  G4cout << "G4AtomicTransitionMagare warning: No fluorescence or Auger for Z=" << Z << G4endl;
288  G4cout << "Absorbed enrgy deposited locally" << G4endl;
289 
290  // G4Exception("G4RDAtomicTransitionManager:Z not found");
291  return 0;
292  }
293 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
G4int G4RDAtomicTransitionManager::NumberOfShells ( G4int  Z) const

Definition at line 248 of file G4RDAtomicTransitionManager.cc.

References G4cout, G4endl, and test::v.

249 {
250 
251 std::map<G4int,std::vector<G4RDAtomicShell*>,std::less<G4int> >::const_iterator pos;
252 
253  pos = shellTable.find(Z);
254 
255  if (pos!= shellTable.end()){
256 
257  std::vector<G4RDAtomicShell*> v = (*pos).second;
258 
259  return v.size();
260  }
261 
262  else{
263  G4cout << "G4AtomicTransitionMagare warning: No fluorescence or Auger for Z=" << Z << G4endl;
264  G4cout << "Absorbed enrgy deposited locally" << G4endl;
265 
266  // G4Exception("G4RDAtomicTransitionManager:Z not found");
267  return 0;
268  }
269 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
const G4RDAugerTransition * G4RDAtomicTransitionManager::ReachableAugerShell ( G4int  Z,
G4int  shellIndex 
) const

Definition at line 239 of file G4RDAtomicTransitionManager.cc.

References G4RDAugerData::GetAugerTransition().

240 {
241 
242  G4RDAugerTransition* augerTransition = augerData->GetAugerTransition(Z,vacancyShellIndex);
243  return augerTransition;
244 }
G4RDAugerTransition * GetAugerTransition(G4int Z, G4int vacancyShellIndex)
const G4RDFluoTransition * G4RDAtomicTransitionManager::ReachableShell ( G4int  Z,
size_t  shellIndex 
) const

Definition at line 215 of file G4RDAtomicTransitionManager.cc.

References FatalException, G4cout, G4endl, G4Exception(), and test::v.

216 {
217  std::map<G4int,std::vector<G4RDFluoTransition*>,std::less<G4int> >::const_iterator pos;
218  pos = transitionTable.find(Z);
219  if (pos!= transitionTable.end())
220  {
221  std::vector<G4RDFluoTransition*> v = (*pos).second;
222  if (shellIndex < v.size()) return(v[shellIndex]);
223  else {
224  G4Exception("G4RDAtomicTransitionManager::ReachableShell()",
225  "InvalidCondition", FatalException,
226  "Reachable shell not found!");
227  return 0;
228  }
229  }
230  else{
231  G4cout << "G4AtomicTransitionMagare warning: No fluorescence or Auger for Z=" << Z << G4endl;
232  G4cout << "Absorbed enrgy deposited locally" << G4endl;
233 
234  // G4Exception("G4RDAtomicTransitionManager:Z not found");
235  return 0;
236  }
237 }
G4GLOB_DLL std::ostream G4cout
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
#define G4endl
Definition: G4ios.hh:61
G4RDAtomicShell * G4RDAtomicTransitionManager::Shell ( G4int  Z,
size_t  shellIndex 
) const

Definition at line 174 of file G4RDAtomicTransitionManager.cc.

References FatalException, G4cout, G4endl, G4Exception(), and test::v.

Referenced by G4LowEnergyIonisation::DeexciteAtom(), and G4LowEnergyPhotoElectric::PostStepDoIt().

175 {
176  std::map<G4int,std::vector<G4RDAtomicShell*>,std::less<G4int> >::const_iterator pos;
177 
178  pos = shellTable.find(Z);
179 
180  if (pos!= shellTable.end())
181  {
182  std::vector<G4RDAtomicShell*> v = (*pos).second;
183  if (shellIndex<v.size())
184  {
185  return(v[shellIndex]);
186  }
187  else
188  {
189  size_t lastShell = v.size();
190  G4cout << "G4RDAtomicTransitionManager::Shell - Z = "
191  << Z << ", shellIndex = " << shellIndex
192  << " not found; number of shells = " << lastShell << G4endl;
193  // G4Exception("G4RDAtomicTransitionManager:shell not found");
194  if (lastShell > 0)
195  {
196  return v[lastShell - 1];
197  }
198  else
199  {
200  return 0;
201  }
202  }
203  }
204  else
205  {
206  G4Exception("G4RDAtomicTransitionManager::Shell()",
207  "InvalidSetup", FatalException, "Z not found!");
208  return 0;
209  }
210 }
G4GLOB_DLL std::ostream G4cout
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
#define G4endl
Definition: G4ios.hh:61
G4double G4RDAtomicTransitionManager::TotalNonRadiativeTransitionProbability ( G4int  Z,
size_t  shellIndex 
)

Definition at line 348 of file G4RDAtomicTransitionManager.cc.

References FatalException, G4cout, G4endl, G4Exception(), G4RDFluoTransition::TransitionProbabilities(), and test::v.

350 {
351 
352  std::map<G4int,std::vector<G4RDFluoTransition*>,std::less<G4int> >::iterator pos;
353 
354  pos = transitionTable.find(Z);
355 
356  if (pos!= transitionTable.end()){
357 
358  std::vector<G4RDFluoTransition*> v = (*pos).second;
359 
360 
361  if (shellIndex<v.size()){
362 
363  G4RDFluoTransition* transition=v[shellIndex];
364  G4DataVector transProb = transition->TransitionProbabilities();
365  G4double totalRadTransProb = 0;
366 
367  for(size_t j = 0; j<transProb.size(); j++) // AM -- Corrected, was 1
368  {
369  totalRadTransProb = totalRadTransProb + transProb[j];
370  }
371 
372  G4double totalNonRadTransProb= (1 - totalRadTransProb);
373 
374  return totalNonRadTransProb; }
375 
376  else {
377  G4Exception("G4RDAtomicTransitionManager::TotalNonRadiativeTransitionProbability()",
378  "InvalidCondition", FatalException, "Shell not found!");
379  return 0;
380  }
381  }
382  else{
383  G4cout << "G4AtomicTransitionMagare warning: No fluorescence or Auger for Z=" << Z << G4endl;
384  G4cout << "Absorbed enrgy deposited locally" << G4endl;
385 
386  // G4Exception("G4RDAtomicTransitionManager:Z not found");
387  return 0;
388  }
389 }
const G4DataVector & TransitionProbabilities() const
G4GLOB_DLL std::ostream G4cout
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
G4double G4RDAtomicTransitionManager::TotalRadiativeTransitionProbability ( G4int  Z,
size_t  shellIndex 
)

Definition at line 306 of file G4RDAtomicTransitionManager.cc.

References FatalException, G4cout, G4endl, G4Exception(), G4RDFluoTransition::TransitionProbabilities(), and test::v.

309 {
310 std::map<G4int,std::vector<G4RDFluoTransition*>,std::less<G4int> >::iterator pos;
311 
312  pos = transitionTable.find(Z);
313 
314  if (pos!= transitionTable.end())
315  {
316  std::vector<G4RDFluoTransition*> v = (*pos).second;
317 
318  if (shellIndex < v.size())
319  {
320  G4RDFluoTransition* transition = v[shellIndex];
321  G4DataVector transProb = transition->TransitionProbabilities();
322  G4double totalRadTransProb = 0;
323 
324  for (size_t j = 0; j<transProb.size(); j++) // AM -- corrected, it was 1
325  {
326  totalRadTransProb = totalRadTransProb + transProb[j];
327  }
328  return totalRadTransProb;
329 
330  }
331  else {
332  G4Exception("G4RDAtomicTransitionManager::TotalRadiativeTransitionProbability()",
333  "InvalidCondition", FatalException, "Shell not found!" );
334  return 0;
335 
336  }
337  }
338  else{
339  G4cout << "G4AtomicTransitionMagare warning: No fluorescence or Auger for Z=" << Z << G4endl;
340  G4cout << "Absorbed enrgy deposited locally" << G4endl;
341 
342  // G4Exception("G4RDAtomicTransitionManager:Z not found");
343 
344  return 0;
345  }
346 }
const G4DataVector & TransitionProbabilities() const
G4GLOB_DLL std::ostream G4cout
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76

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