Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4AugerData Class Reference

#include <G4AugerData.hh>

Public Member Functions

 G4AugerData ()
 
 ~G4AugerData ()=default
 
size_t NumberOfVacancies (G4int Z) const
 
G4int VacancyId (G4int Z, G4int vacancyIndex) const
 Given the index of the vacancy (and the atomic number Z) returns its identity.
 
size_t NumberOfTransitions (G4int Z, G4int vacancyIndex) const
 
G4int StartShellId (G4int Z, G4int initialVacancyIndex, G4int transitionShellIndex) const
 
G4double StartShellEnergy (G4int Z, G4int vacancyIndex, G4int transitionId, G4int augerIndex) const
 
G4double StartShellProb (G4int Z, G4int vacancyIndex, G4int transitionId, G4int augerIndex) const
 
size_t NumberOfAuger (G4int Z, G4int initIndex, G4int vacancyId) const
 
size_t AugerShellId (G4int Z, G4int vacancyIndex, G4int transId, G4int augerIndex) const
 
std::vector< G4AugerTransitionLoadData (G4int Z)
 
void BuildAugerTransitionTable ()
 
void PrintData (G4int Z)
 
G4AugerTransitionGetAugerTransition (G4int Z, G4int vacancyShellIndex)
 
std::vector< G4AugerTransition > * GetAugerTransitions (G4int Z)
 Given the atomic number returns a vector of possible AugerTransition objects.
 

Detailed Description

Definition at line 50 of file G4AugerData.hh.

Constructor & Destructor Documentation

◆ G4AugerData()

G4AugerData::G4AugerData ( )
explicit

Definition at line 50 of file G4AugerData.cc.

51{
52 numberOfVacancies.resize(105, 0);
54}
void BuildAugerTransitionTable()

◆ ~G4AugerData()

G4AugerData::~G4AugerData ( )
default

Member Function Documentation

◆ AugerShellId()

std::size_t G4AugerData::AugerShellId ( G4int Z,
G4int vacancyIndex,
G4int transId,
G4int augerIndex ) const

Given the atomic number, th index of the starting and the auger originating shell, and the transition shell Id, returns the ager originating shell Id

Definition at line 134 of file G4AugerData.cc.

135{
136 std::size_t n = 0;
137 if (vacancyIndex<0 || vacancyIndex>=numberOfVacancies[Z])
138 {
139 G4Exception("G4AugerData::VacancyId()","de0002", FatalErrorInArgument,"");
140 return 0;
141 }
142 else {
143 trans_Table::const_iterator element = augerTransitionTable.find(Z);
144 if (element == augerTransitionTable.end()) {
145 G4Exception("G4AugerData::VacancyId()","de0004", FatalErrorInArgument, "Check element");
146 return 0;
147 }
148 std::vector<G4AugerTransition> dataSet = (*element).second;
149 n = dataSet[vacancyIndex].AugerOriginatingShellId(augerIndex,transId);
150 }
151 return n;
152}
@ FatalErrorInArgument
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)

Referenced by PrintData().

◆ BuildAugerTransitionTable()

void G4AugerData::BuildAugerTransitionTable ( )

Definition at line 402 of file G4AugerData.cc.

403{
404 for (G4int element = 6; element < 105; ++element) {
405 augerTransitionTable.insert(trans_Table::value_type(element,LoadData(element)));
406 }
407}
int G4int
Definition G4Types.hh:85
std::vector< G4AugerTransition > LoadData(G4int Z)

Referenced by G4AugerData().

◆ GetAugerTransition()

G4AugerTransition * G4AugerData::GetAugerTransition ( G4int Z,
G4int vacancyShellIndex )

Given the atomic number and the vacancy initial shell index returns the AugerTransition object related to that shell

Definition at line 444 of file G4AugerData.cc.

445{
446 std::vector<G4AugerTransition>* dataSet = &augerTransitionTable[Z];
447 std::vector<G4AugerTransition>::iterator vectorIndex =
448 dataSet->begin() + vacancyShellIndex;
449
450 G4AugerTransition* augerTransition = &(*vectorIndex);
451 return augerTransition;
452}

Referenced by G4AtomicTransitionManager::ReachableAugerShell().

◆ GetAugerTransitions()

std::vector< G4AugerTransition > * G4AugerData::GetAugerTransitions ( G4int Z)

Given the atomic number returns a vector of possible AugerTransition objects.

Definition at line 456 of file G4AugerData.cc.

457{
458 std::vector<G4AugerTransition>* dataSet = &augerTransitionTable[Z];
459 return dataSet;
460}

◆ LoadData()

std::vector< G4AugerTransition > G4AugerData::LoadData ( G4int Z)

Definition at line 225 of file G4AugerData.cc.

226{
227 // Build the complete string identifying the file with the data set
228 std::ostringstream ost;
229 if(Z != 0){
230 ost << "au-tr-pr-"<< Z << ".dat";
231 }
232 else{
233 ost << "au-tr-pr-"<<".dat";
234 }
235 G4String name(ost.str());
236
237 const char* path = G4FindDataDir("G4LEDATA");
238 if (nullptr == path)
239 {
240 G4String excep = "G4AugerData::LoadData";
241 G4Exception(excep,"em0006", FatalException,"" );
242 std::vector<G4AugerTransition> a;
243 return a;
244 }
245
246 G4String pathString(path);
247 G4String dirFile = pathString + "/auger/" + name;
248 std::ifstream file(dirFile);
249 std::filebuf* lsdp = file.rdbuf();
250
251 if (! (lsdp->is_open()) )
252 {
253 G4String excep = "G4AugerData::LoadData";
254 G4String msg = "Missing" + dirFile;
255 G4Exception(excep,"em0003", FatalException, msg);
256 }
257
258 G4double a = 0;
259 G4int k = 1;
260 G4int sLocal = 0;
261
262 G4int vacId = 0;
263 std::vector<G4int>* initIds = new std::vector<G4int>;
264 std::vector<G4int>* newIds = new std::vector<G4int>;
265 G4DataVector* transEnergies = new G4DataVector;
266 G4DataVector* transProbabilities = new G4DataVector;
267 std::vector<G4AugerTransition> augerTransitionVector;
268 std::map<G4int,std::vector<G4int>,std::less<G4int> >* newIdMap =
269 new std::map<G4int,std::vector<G4int>,std::less<G4int> >;
270 std::map<G4int,G4DataVector,std::less<G4int> >* newEnergyMap =
271 new std::map<G4int,G4DataVector,std::less<G4int> >;
272 std::map<G4int,G4DataVector,std::less<G4int> >* newProbabilityMap =
273 new std::map<G4int,G4DataVector,std::less<G4int> >;
274
275 do {
276 file >> a;
277 G4int nColumns = 4;
278 if (a == -1)
279 {
280 if (sLocal == 0)
281 {
282 // End of a shell data set
283 std::vector<G4int>::iterator vectorIndex = initIds->begin();
284
285 vacId = *vectorIndex;
286 std::vector<G4int> identifiers;
287 for (vectorIndex = initIds->begin()+1 ; vectorIndex != initIds->end(); ++vectorIndex){
288 identifiers.push_back(*vectorIndex);
289 }
290 vectorIndex = (initIds->end())-1;
291 G4int augerShellId = *(vectorIndex);
292
293 (*newIdMap)[augerShellId] = *newIds;
294 (*newEnergyMap)[augerShellId] = *transEnergies;
295 (*newProbabilityMap)[augerShellId] = *transProbabilities;
296
297 augerTransitionVector.push_back(G4AugerTransition(vacId, identifiers,
298 newIdMap, newEnergyMap, newProbabilityMap));
299 // Now deleting all the variables I used, and creating new ones for the next shell
300 delete newIdMap;
301 delete newEnergyMap;
302 delete newProbabilityMap;
303
304 G4int n = (G4int)initIds->size();
305 nInitShells.push_back(n);
306 numberOfVacancies[Z]++;
307 delete initIds;
308 delete newIds;
309 delete transEnergies;
310 delete transProbabilities;
311 initIds = new std::vector<G4int>;
312 newIds = new std::vector<G4int>;
313 transEnergies = new G4DataVector;
314 transProbabilities = new G4DataVector;
315 newIdMap =
316 new std::map<G4int,std::vector<G4int>,std::less<G4int> >;
317 newEnergyMap = new std::map<G4int,G4DataVector,std::less<G4int> >;
318 newProbabilityMap =
319 new std::map<G4int,G4DataVector,std::less<G4int> >;
320 }
321 ++sLocal;
322 if (sLocal == nColumns)
323 {
324 sLocal = 0;
325 }
326 }
327 else
328 {
329
330 if (k%nColumns == 3){
331 // 3rd column is the transition probabilities
332 transProbabilities->push_back(a);
333 ++k;
334 }
335 else if(k%nColumns == 2){
336 // 2nd column is new auger vacancy
337 G4int l = (G4int)a;
338 newIds->push_back(l);
339 ++k;
340 }
341 else if (k%nColumns == 1)
342 {
343 // 1st column is shell id
344 if(initIds->size() == 0) {
345 // if this is the first data of the shell, all the colums are equal
346 // to the shell Id; so we skip the next colums ang go to the next row
347 initIds->push_back((G4int)a);
348 // first line of initIds is the original shell of the vacancy
349 file >> a;
350 file >> a;
351 file >> a;
352 k = k+3;
353 }
354 else {
355 if((G4int)a != initIds->back()){
356 if((initIds->size()) == 1) {
357 initIds->push_back((G4int)a);
358 }
359 else {
360
361
362 G4int augerShellId = 0;
363 augerShellId = initIds->back();
364
365 (*newIdMap)[augerShellId] = *newIds;
366 (*newEnergyMap)[augerShellId] = *transEnergies;
367 (*newProbabilityMap)[augerShellId] = *transProbabilities;
368 delete newIds;
369 delete transEnergies;
370 delete transProbabilities;
371 newIds = new std::vector<G4int>;
372 transEnergies = new G4DataVector;
373 transProbabilities = new G4DataVector;
374 initIds->push_back((G4int)a);
375 }
376 }
377 }
378 k++;
379 }
380 else if (k%nColumns == 0)
381 {//fourth column is transition energies
382 G4double e = a * MeV;
383 transEnergies->push_back(e);
384 k=1;
385 }
386 }
387 }
388 while (a != -2); // end of file
389 file.close();
390 delete initIds;
391 delete newIds;
392 delete transEnergies;
393 delete transProbabilities;
394 delete newIdMap ;
395 delete newEnergyMap;
396 delete newProbabilityMap;
397 return augerTransitionVector;
398}
const char * G4FindDataDir(const char *)
@ FatalException
double G4double
Definition G4Types.hh:83
const char * name(G4int ptype)

Referenced by BuildAugerTransitionTable().

◆ NumberOfAuger()

std::size_t G4AugerData::NumberOfAuger ( G4int Z,
G4int initIndex,
G4int vacancyId ) const

Given the atomic number, the index of the starting vacancy shell and the transition shell Id, returns the number of shells wich an auger electron can come from.

Definition at line 110 of file G4AugerData.cc.

111{
112 std::size_t n = 0;
113 if (initIndex<0 || initIndex>=numberOfVacancies[Z])
114 {
115 G4Exception("G4AugerData::VacancyId()","de0002", FatalErrorInArgument,"");
116 return 0;
117 }
118 else {
119 trans_Table::const_iterator element = augerTransitionTable.find(Z);
120 if (element == augerTransitionTable.end()) {
121 G4Exception("G4AugerData::VacancyId()","de0004", FatalErrorInArgument, "Check element");
122 return 0;
123 }
124 std::vector<G4AugerTransition> dataSet = (*element).second;
125 const std::vector<G4int>* temp =
126 dataSet[initIndex].AugerOriginatingShellIds(vacancyId);
127 n = temp->size();
128 }
129 return n;
130}

Referenced by PrintData().

◆ NumberOfTransitions()

std::size_t G4AugerData::NumberOfTransitions ( G4int Z,
G4int vacancyIndex ) const

Given the index of a vacancy in the atom with the atomc number Z, returns the number of shells starting from wich an electron can fill the vacancy

Definition at line 87 of file G4AugerData.cc.

88{
89 std::size_t n = 0;
90 if (vacancyIndex<0 || vacancyIndex>=numberOfVacancies[Z])
91 {
92 G4Exception("G4AugerData::VacancyId()","de0002", JustWarning, "Energy deposited locally");
93 return 0;
94 }
95 else {
96 trans_Table::const_iterator element = augerTransitionTable.find(Z);
97 if (element == augerTransitionTable.end())
98 {
99 G4Exception("G4AugerData::VacancyId()","de0004", FatalErrorInArgument, "Check element");
100 return 0;
101 }
102 std::vector<G4AugerTransition> dataSet = (*element).second;
103 n = dataSet[vacancyIndex].TransitionOriginatingShellIds()->size();
104 }
105 return n;
106}
@ JustWarning

Referenced by PrintData().

◆ NumberOfVacancies()

std::size_t G4AugerData::NumberOfVacancies ( G4int Z) const

The method returns the number of shells in wich a vacancy can be filled by a NON-radiative transition, given the atomic number

Definition at line 58 of file G4AugerData.cc.

59{
60 return numberOfVacancies[Z];
61}

Referenced by G4AtomicTransitionManager::NumberOfReachableAugerShells().

◆ PrintData()

void G4AugerData::PrintData ( G4int Z)

Definition at line 411 of file G4AugerData.cc.

412{
413 for (G4int i = 0; i < numberOfVacancies[Z]; ++i)
414 {
415 G4cout << "---- TransitionData for the vacancy nb "
416 <<i
417 <<" of the atomic number elemnt "
418 << Z
419 <<"----- "
420 <<G4endl;
421
422 for (G4int k = 0; k<=(G4int)NumberOfTransitions(Z,i); ++k)
423 {
424 G4int id = StartShellId(Z,i,k);
425
426 for (G4int a = 0; a <= (G4int)NumberOfAuger(Z,i,id); ++a) {
427 G4double e = StartShellEnergy(Z,i,id,a)/MeV;
428 G4double p = StartShellProb(Z,i,id,a);
429 std::size_t augerId = AugerShellId(Z, i, id, a);
430 G4cout << k <<") Shell id: " << id <<G4endl;
431 G4cout << " Auger Originatig Shell Id :"<< augerId <<G4endl;
432 G4cout << " - Transition energy = " << e << " MeV "<<G4endl;
433 G4cout << " - Transition probability = " << p <<G4endl;
434 }
435 }
436 G4cout << "-------------------------------------------------"
437 << G4endl;
438 }
439}
#define G4endl
Definition G4ios.hh:67
G4GLOB_DLL std::ostream G4cout
size_t AugerShellId(G4int Z, G4int vacancyIndex, G4int transId, G4int augerIndex) const
size_t NumberOfTransitions(G4int Z, G4int vacancyIndex) const
G4int StartShellId(G4int Z, G4int initialVacancyIndex, G4int transitionShellIndex) const
size_t NumberOfAuger(G4int Z, G4int initIndex, G4int vacancyId) const
G4double StartShellProb(G4int Z, G4int vacancyIndex, G4int transitionId, G4int augerIndex) const
G4double StartShellEnergy(G4int Z, G4int vacancyIndex, G4int transitionId, G4int augerIndex) const

◆ StartShellEnergy()

G4double G4AugerData::StartShellEnergy ( G4int Z,
G4int vacancyIndex,
G4int transitionId,
G4int augerIndex ) const

Given the atomic number , the indexes of the starting, the auger originating shell, and the transition shell Id, returns the transition energy

Definition at line 178 of file G4AugerData.cc.

179{
180 G4double energy = 0;
181
182 if (vacancyIndex<0 || vacancyIndex>=numberOfVacancies[Z])
183 {
184 G4Exception("G4AugerData::VacancyId()","de0002", FatalErrorInArgument,"");
185 return 0;
186 }
187 else {
188 trans_Table::const_iterator element = augerTransitionTable.find(Z);
189 if (element == augerTransitionTable.end()) {
190 G4Exception("G4AugerData::VacancyId()","de0004", FatalErrorInArgument, "Check element");
191 return 0;
192 }
193 std::vector<G4AugerTransition> dataSet = (*element).second;
194 energy = dataSet[vacancyIndex].AugerTransitionEnergy(augerIndex,transitionId);
195
196 }
197 return energy;
198}
G4double energy(const ThreeVector &p, const G4double m)

Referenced by PrintData().

◆ StartShellId()

G4int G4AugerData::StartShellId ( G4int Z,
G4int initialVacancyIndex,
G4int transitionShellIndex ) const

Given the atomic number Z, the Index of the initial vacancy shell and the index of the starting shell for the transition, returns the identity of the shell originating the electron transition

Definition at line 156 of file G4AugerData.cc.

157{
158 G4int n = 0;
159
160 if (vacancyIndex<0 || vacancyIndex>=numberOfVacancies[Z]) {
161 G4Exception("G4AugerData::VacancyId()","de0002", FatalErrorInArgument,"");
162 return 0;
163 }
164 else {
165 trans_Table::const_iterator element = augerTransitionTable.find(Z);
166 if (element == augerTransitionTable.end()) {
167 G4Exception("G4AugerData::VacancyId()","de0004", FatalErrorInArgument, "Check element");
168 return 0;
169 }
170 std::vector<G4AugerTransition> dataSet = (*element).second;
171 n = dataSet[vacancyIndex].TransitionOriginatingShellId(transitionShellIndex);
172 }
173 return n;
174}

Referenced by PrintData().

◆ StartShellProb()

G4double G4AugerData::StartShellProb ( G4int Z,
G4int vacancyIndex,
G4int transitionId,
G4int augerIndex ) const

Given the atomic number, the index of the starting shell, the auger originating shells, and the transition shell Id, returns the transition probability

Definition at line 202 of file G4AugerData.cc.

203{
204 G4double prob = 0;
205
206 if (vacancyIndex<0 || vacancyIndex>=numberOfVacancies[Z])
207 {
208 G4Exception("G4AugerData::VacancyId()","de0002", FatalErrorInArgument,"");
209 return 0;
210 }
211 else {
212 trans_Table::const_iterator element = augerTransitionTable.find(Z);
213 if (element == augerTransitionTable.end()) {
214 G4Exception("G4AugerData::VacancyId()","de0004", FatalErrorInArgument, "Check element");
215 return 0;
216 }
217 std::vector<G4AugerTransition> dataSet = (*element).second;
218 prob = dataSet[vacancyIndex].AugerTransitionProbability(augerIndex, transitionId);
219 }
220 return prob;
221}

Referenced by PrintData().

◆ VacancyId()

G4int G4AugerData::VacancyId ( G4int Z,
G4int vacancyIndex ) const

Given the index of the vacancy (and the atomic number Z) returns its identity.

Definition at line 65 of file G4AugerData.cc.

66{
67 G4int n = 0;
68 if (vacancyIndex<0 || vacancyIndex>=numberOfVacancies[Z])
69 {
70 G4Exception("G4AugerData::VacancyId()","de0002", FatalErrorInArgument,"");
71 }
72 else {
73 trans_Table::const_iterator element = augerTransitionTable.find(Z);
74 if (element == augerTransitionTable.end()) {
75 G4Exception("G4AugerData::VacancyId()","de0004", FatalErrorInArgument, "Check element");
76 return 0;
77 }
78 std::vector<G4AugerTransition> dataSet = (*element).second;
79 n = (G4int) dataSet[vacancyIndex].FinalShellId();
80 }
81 return n;
82}

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