Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
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 61 of file G4AtomicTransitionManager.hh.

Constructor & Destructor Documentation

◆ G4AtomicTransitionManager()

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

Definition at line 41 of file G4AtomicTransitionManager.cc.

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 G4ShellData* shellManager = new G4ShellData;
50
51 // initialization of the data for auger effect
52
53 augerData = new G4AugerData;
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<G4AtomicShell*> 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 G4AtomicShell * shell = new G4AtomicShell(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 { G4FluoData* fluoManager = new G4FluoData;
83 std::vector<G4FluoTransition*> 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 G4FluoTransition * transition = new G4FluoTransition (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}
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
G4double StartShellEnergy(G4int initIndex, G4int vacancyIndex) const
Definition: G4FluoData.cc:137
size_t NumberOfTransitions(G4int vacancyIndex) const
Definition: G4FluoData.cc:93
G4int VacancyId(G4int vacancyIndex) const
Definition: G4FluoData.cc:75
void LoadData(G4int Z)
Definition: G4FluoData.cc:188
G4int StartShellId(G4int initIndex, G4int vacancyIndex) const
Definition: G4FluoData.cc:110
G4double StartShellProb(G4int initIndex, G4int vacancyIndex) const
Definition: G4FluoData.cc:161
G4int ShellId(G4int Z, G4int shellIndex) const
Definition: G4ShellData.cc:121
G4double BindingEnergy(G4int Z, G4int shellIndex) const
Definition: G4ShellData.cc:166
size_t NumberOfShells(G4int Z) const
Definition: G4ShellData.cc:84
void LoadData(const G4String &fileName)
Definition: G4ShellData.cc:234
G4double bindingEnergy(G4int A, G4int Z)

◆ ~G4AtomicTransitionManager()

G4AtomicTransitionManager::~G4AtomicTransitionManager ( )
protected

Definition at line 123 of file G4AtomicTransitionManager.cc.

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

Member Function Documentation

◆ Instance()

◆ NumberOfReachableAugerShells()

G4int G4AtomicTransitionManager::NumberOfReachableAugerShells ( G4int  Z) const

Definition at line 310 of file G4AtomicTransitionManager.cc.

311{
312 G4int n = augerData->NumberOfVacancies(Z);
313 return n;
314}
size_t NumberOfVacancies(G4int Z) const
Definition: G4AugerData.cc:113

◆ NumberOfReachableShells()

G4int G4AtomicTransitionManager::NumberOfReachableShells ( G4int  Z) const

Definition at line 281 of file G4AtomicTransitionManager.cc.

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

◆ NumberOfShells()

G4int G4AtomicTransitionManager::NumberOfShells ( G4int  Z) const

Definition at line 250 of file G4AtomicTransitionManager.cc.

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

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

◆ ReachableAugerShell()

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

Definition at line 241 of file G4AtomicTransitionManager.cc.

242{
243
244 G4AugerTransition* augerTransition = augerData->GetAugerTransition(Z,vacancyShellIndex);
245 return augerTransition;
246}
G4AugerTransition * GetAugerTransition(G4int Z, G4int vacancyShellIndex)
Definition: G4AugerData.cc:577

◆ ReachableShell()

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

Definition at line 214 of file G4AtomicTransitionManager.cc.

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

◆ Shell()

G4AtomicShell * G4AtomicTransitionManager::Shell ( G4int  Z,
size_t  shellIndex 
) const

Definition at line 174 of file G4AtomicTransitionManager.cc.

175{
176 std::map<G4int,std::vector<G4AtomicShell*>,std::less<G4int> >::const_iterator pos;
177
178 pos = shellTable.find(Z);
179
180 if (pos!= shellTable.end())
181 {
182 std::vector<G4AtomicShell*> 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 << "G4AtomicTransitionManager::Shell - Z = "
191 << Z << ", shellIndex = " << shellIndex
192 << " not found; number of shells = " << lastShell << G4endl;
193 // G4Exception("G4AtomicTransitionManager: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("G4AtomicTransitionManager::Shell()","de0001",FatalErrorInArgument,"Z not found");
207 return 0;
208 }
209}
@ FatalErrorInArgument
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout

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

◆ TotalNonRadiativeTransitionProbability()

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

Definition at line 364 of file G4AtomicTransitionManager.cc.

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

◆ TotalRadiativeTransitionProbability()

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

Definition at line 318 of file G4AtomicTransitionManager.cc.

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

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