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
G4AtomicTransitionManager Class Reference

#include <G4AtomicTransitionManager.hh>

Public Member Functions

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

Static Public Member Functions

static G4AtomicTransitionManagerInstance ()
 

Protected Member Functions

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

Detailed Description

Definition at line 60 of file G4AtomicTransitionManager.hh.

Constructor & Destructor Documentation

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

Definition at line 40 of file G4AtomicTransitionManager.cc.

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

Referenced by Instance().

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

Definition at line 122 of file G4AtomicTransitionManager.cc.

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

Member Function Documentation

G4AtomicTransitionManager * G4AtomicTransitionManager::Instance ( void  )
static
G4int G4AtomicTransitionManager::NumberOfReachableAugerShells ( G4int  Z) const

Definition at line 309 of file G4AtomicTransitionManager.cc.

References n, and G4AugerData::NumberOfVacancies().

310 {
311  G4int n = augerData->NumberOfVacancies(Z);
312  return n;
313 }
int G4int
Definition: G4Types.hh:78
const G4int n
size_t NumberOfVacancies(G4int Z) const
Definition: G4AugerData.cc:113
G4int G4AtomicTransitionManager::NumberOfReachableShells ( G4int  Z) const

Definition at line 280 of file G4AtomicTransitionManager.cc.

References G4Exception(), JustWarning, and test::v.

281 {
282 std::map<G4int,std::vector<G4FluoTransition*>,std::less<G4int> >::const_iterator pos;
283 
284  pos = transitionTable.find(Z);
285 
286  if (pos!= transitionTable.end())
287  {
288  std::vector<G4FluoTransition*> v = (*pos).second;
289  return v.size();
290  }
291  else
292  {
293  // G4cout << "G4AtomicTransitionMagare warning: No fluorescence or Auger for Z=" << Z << G4endl;
294  // G4cout << "Absorbed enrgy deposited locally" << G4endl;
295 
296  G4String msg = "No deexcitation for Z=" + (G4String(Z))+ ". Energy Deposited Locally.";
297 
298  G4Exception("G4AtomicTransitionManager::NumberOfReachebleShells()","de0001",JustWarning,msg);
299 
300  //"No deexcitation for Z=" + (G4String(Z))+". Energy Deposited Locally.");
301 
302  return 0;
303  }
304 }
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4int G4AtomicTransitionManager::NumberOfShells ( G4int  Z) const

Definition at line 249 of file G4AtomicTransitionManager.cc.

References G4Exception(), JustWarning, and test::v.

Referenced by G4LivermoreIonisationModel::ComputeDEDXPerVolume(), G4LivermoreIonisationCrossSection::CrossSection(), G4PenelopeIonisationCrossSection::CrossSection(), G4PenelopeIonisationCrossSection::GetCrossSection(), G4LivermoreIonisationCrossSection::GetCrossSection(), and G4PenelopePhotoElectricModel::SampleSecondaries().

250 {
251 
252 std::map<G4int,std::vector<G4AtomicShell*>,std::less<G4int> >::const_iterator pos;
253 
254  pos = shellTable.find(Z);
255 
256  if (pos!= shellTable.end()){
257 
258  std::vector<G4AtomicShell*> v = (*pos).second;
259 
260  return v.size();
261  }
262 
263  else{
264  // G4cout << "G4AtomicTransitionMagare warning: No fluorescence or Auger for Z=" << Z << G4endl;
265  // G4cout << "Absorbed enrgy deposited locally" << G4endl;
266 
267  G4String msg = "No deexcitation for Z=" + (G4String(Z))+ ". Energy Deposited Locally.";
268 
269  G4Exception("G4AtomicTransitionManager::NumberOfShells()","de0001",JustWarning,msg);
270 
271  //"No deexcitation for Z=" + (G4String(Z))+". Energy Deposited Locally.");
272 
273  return 0;
274  }
275 }
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
const G4AugerTransition * G4AtomicTransitionManager::ReachableAugerShell ( G4int  Z,
G4int  shellIndex 
) const

Definition at line 240 of file G4AtomicTransitionManager.cc.

References G4AugerData::GetAugerTransition().

241 {
242 
243  G4AugerTransition* augerTransition = augerData->GetAugerTransition(Z,vacancyShellIndex);
244  return augerTransition;
245 }
G4AugerTransition * GetAugerTransition(G4int Z, G4int vacancyShellIndex)
Definition: G4AugerData.cc:577
const G4FluoTransition * G4AtomicTransitionManager::ReachableShell ( G4int  Z,
size_t  shellIndex 
) const

Definition at line 213 of file G4AtomicTransitionManager.cc.

References G4Exception(), JustWarning, and test::v.

214 {
215  std::map<G4int,std::vector<G4FluoTransition*>,std::less<G4int> >::const_iterator pos;
216  pos = transitionTable.find(Z);
217  if (pos!= transitionTable.end())
218  {
219  std::vector<G4FluoTransition*> v = (*pos).second;
220  if (shellIndex < v.size()) return(v[shellIndex]);
221  else {
222  G4Exception("G4AtomicTransitionManager::ReachebleShell()","de0002", JustWarning,"Energy Deposited Locally.");
223  return 0;
224  }
225  }
226  else{
227  // G4cout << "G4AtomicTransitionMagare warning: No fluorescence or Auger for Z=" << Z << G4endl;
228  // G4cout << "Absorbed enrgy deposited locally" << G4endl;
229 
230  // G4String pippo = (G4String(Z));
231 
232  G4String msg = "No deexcitation for Z=" + (G4String(Z))+ ". Energy Deposited Locally.";
233 
234  G4Exception("G4AtomicTransitionManager::ReachableShell()","de0001",JustWarning,msg);
235  //"No deexcitation for Z=" + (G4String(Z))+". Energy Deposited Locally.");
236  return 0;
237  }
238 }
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4AtomicShell * G4AtomicTransitionManager::Shell ( G4int  Z,
size_t  shellIndex 
) const

Definition at line 173 of file G4AtomicTransitionManager.cc.

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

Referenced by G4ecpssrBaseKxsModel::CalculateCrossSection(), G4ecpssrBaseLixsModel::CalculateL1CrossSection(), G4OrlicLiXsModel::CalculateL1CrossSection(), G4ecpssrBaseLixsModel::CalculateL2CrossSection(), G4OrlicLiXsModel::CalculateL2CrossSection(), G4ecpssrBaseLixsModel::CalculateL3CrossSection(), G4OrlicLiXsModel::CalculateL3CrossSection(), G4ecpssrBaseLixsModel::CalculateVelocity(), G4UAtomicDeexcitation::GetAtomicShell(), G4hImpactIonisation::PostStepDoIt(), G4LivermoreIonisationModel::SampleSecondaries(), G4PenelopePhotoElectricModel::SampleSecondaries(), G4PenelopeComptonModel::SampleSecondaries(), and G4PenelopeIonisationModel::SampleSecondaries().

174 {
175  std::map<G4int,std::vector<G4AtomicShell*>,std::less<G4int> >::const_iterator pos;
176 
177  pos = shellTable.find(Z);
178 
179  if (pos!= shellTable.end())
180  {
181  std::vector<G4AtomicShell*> v = (*pos).second;
182  if (shellIndex<v.size())
183  {
184  return(v[shellIndex]);
185  }
186  else
187  {
188  size_t lastShell = v.size();
189  G4cout << "G4AtomicTransitionManager::Shell - Z = "
190  << Z << ", shellIndex = " << shellIndex
191  << " not found; number of shells = " << lastShell << G4endl;
192  // G4Exception("G4AtomicTransitionManager:shell not found");
193  if (lastShell > 0)
194  {
195  return v[lastShell - 1];
196  }
197  else
198  {
199  return 0;
200  }
201  }
202  }
203  else
204  {
205  G4Exception("G4AtomicTransitionManager::Shell()","de0001",FatalErrorInArgument,"Z not found");
206  return 0;
207  }
208 }
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 G4AtomicTransitionManager::TotalNonRadiativeTransitionProbability ( G4int  Z,
size_t  shellIndex 
)

Definition at line 363 of file G4AtomicTransitionManager.cc.

References FatalException, G4Exception(), JustWarning, G4FluoTransition::TransitionProbabilities(), and test::v.

365 {
366 
367  std::map<G4int,std::vector<G4FluoTransition*>,std::less<G4int> >::iterator pos;
368 
369  pos = transitionTable.find(Z);
370 
371  if (pos!= transitionTable.end()){
372 
373  std::vector<G4FluoTransition*> v = (*pos).second;
374 
375 
376  if (shellIndex<v.size()){
377 
378  G4FluoTransition* transition=v[shellIndex];
379  G4DataVector transProb = transition->TransitionProbabilities();
380  G4double totalRadTransProb = 0;
381 
382  for(size_t j = 0; j<transProb.size(); j++) // AM -- Corrected, was 1
383  {
384  totalRadTransProb = totalRadTransProb + transProb[j];
385  }
386 
387  if (totalRadTransProb > 1) {
388  G4Exception( "G4AtomicTransitionManager::TotalNonRadiativeTransitionProbability()","de0003",FatalException,"Total probability mismatch");
389  return 0;
390 }
391  G4double totalNonRadTransProb= (1 - totalRadTransProb);
392 
393  return totalNonRadTransProb; }
394 
395  else {
396 
397 G4Exception("G4AtomicTransitionManager::TotalNonRadiativeTransitionProbability()","de0002", JustWarning,"Energy Deposited Locally.");
398 
399  return 0;
400  }
401  }
402  else{
403  // G4cout << "G4AtomicTransitionMagare warning: No fluorescence or Auger for Z=" << Z << G4endl;
404  // G4cout << "Absorbed enrgy deposited locally" << G4endl;
405 
406  G4String msg = "No deexcitation for Z=" + (G4String(Z))+ ". Energy Deposited Locally.";
407 
408  G4Exception("G4AtomicTransitionManager::TotalNonRadiativeTransitionProbability()","de0001",JustWarning,msg);
409 
410 //"No deexcitation for Z=" + (G4String(Z))+ ". Energy Deposited Locally.");
411 
412  return 0;
413  }
414 }
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
G4double G4AtomicTransitionManager::TotalRadiativeTransitionProbability ( G4int  Z,
size_t  shellIndex 
)

Definition at line 317 of file G4AtomicTransitionManager.cc.

References G4Exception(), JustWarning, G4FluoTransition::TransitionProbabilities(), and test::v.

320 {
321 std::map<G4int,std::vector<G4FluoTransition*>,std::less<G4int> >::iterator pos;
322 
323  pos = transitionTable.find(Z);
324 
325  if (pos!= transitionTable.end())
326  {
327  std::vector<G4FluoTransition*> v = (*pos).second;
328 
329  if (shellIndex < v.size())
330  {
331  G4FluoTransition* transition = v[shellIndex];
332  G4DataVector transProb = transition->TransitionProbabilities();
333  G4double totalRadTransProb = 0;
334 
335  for (size_t j = 0; j<transProb.size(); j++) // AM -- corrected, it was 1
336  {
337  totalRadTransProb = totalRadTransProb + transProb[j];
338  }
339  return totalRadTransProb;
340 
341  }
342  else {
343 
344  G4Exception("G4AtomicTransitionManager::TotalRadiativeTransitionProbability()","de0002", JustWarning,"Energy Deposited Locally.");
345  return 0;
346 
347  }
348  }
349  else{
350  //G4cout << "G4AtomicTransitionMagare warning: No fluorescence or Auger for Z=" << Z << G4endl;
351  //G4cout << "Absorbed enrgy deposited locally" << G4endl;
352 
353  G4String msg = "No deexcitation for Z=" + (G4String(Z))+ ". Energy Deposited Locally.";
354 
355  G4Exception("G4AtomicTransitionManager::TotalRadiativeTransitionProbability()","de0001",JustWarning,msg);
356  //"No deexcitation for Z=" + (G4String(Z))+". Energy Deposited Locally.");
357 
358 
359  return 0;
360  }
361 }
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

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