Geant4-11
Public Member Functions | Private Types | Private Attributes
G4AugerData Class Reference

#include <G4AugerData.hh>

Public Member Functions

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

Private Types

typedef std::map< G4int, std::vector< G4AugerTransition >, std::less< G4int > > trans_Table
 

Private Attributes

trans_Table augerTransitionTable
 
std::vector< G4intnInitShells
 
std::vector< G4intnumberOfVacancies
 

Detailed Description

Definition at line 50 of file G4AugerData.hh.

Member Typedef Documentation

◆ trans_Table

typedef std::map<G4int,std::vector<G4AugerTransition>,std::less<G4int> > G4AugerData::trans_Table
private

Definition at line 101 of file G4AugerData.hh.

Constructor & Destructor Documentation

◆ G4AugerData()

G4AugerData::G4AugerData ( )
explicit

Definition at line 51 of file G4AugerData.cc.

52{
53 G4int n = 0;
54 numberOfVacancies.resize(100,n);
55
57}
int G4int
Definition: G4Types.hh:85
void BuildAugerTransitionTable()
Definition: G4AugerData.cc:408
std::vector< G4int > numberOfVacancies
Definition: G4AugerData.hh:105

References BuildAugerTransitionTable(), CLHEP::detail::n, and numberOfVacancies.

◆ ~G4AugerData()

G4AugerData::~G4AugerData ( )

Definition at line 61 of file G4AugerData.cc.

62{;}

Member Function Documentation

◆ AugerShellId()

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 141 of file G4AugerData.cc.

142{
143 size_t n = 0;
144 if (vacancyIndex<0 || vacancyIndex>=numberOfVacancies[Z])
145 {
146 G4Exception("G4AugerData::VacancyId()","de0002", FatalErrorInArgument,"");
147 return 0;
148 }
149 else {
150 trans_Table::const_iterator element = augerTransitionTable.find(Z);
151 if (element == augerTransitionTable.end()) {
152 G4Exception("G4AugerData::VacancyId()","de0004", FatalErrorInArgument, "Check element");
153 return 0;
154 }
155 std::vector<G4AugerTransition> dataSet = (*element).second;
156 n = dataSet[vacancyIndex].AugerOriginatingShellId(augerIndex,transId);
157 }
158 return n;
159}
@ FatalErrorInArgument
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
const G4int Z[17]
trans_Table augerTransitionTable
Definition: G4AugerData.hh:102

References augerTransitionTable, FatalErrorInArgument, G4Exception(), CLHEP::detail::n, numberOfVacancies, and Z.

Referenced by PrintData().

◆ BuildAugerTransitionTable()

void G4AugerData::BuildAugerTransitionTable ( )

Definition at line 408 of file G4AugerData.cc.

409{
410 for (G4int element = 6; element < 100; ++element)
411 {
412 augerTransitionTable.insert(trans_Table::value_type(element,LoadData(element)));
413 }
414}
std::vector< G4AugerTransition > LoadData(G4int Z)
Definition: G4AugerData.cc:233

References augerTransitionTable, and LoadData().

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 450 of file G4AugerData.cc.

451{
452 std::vector<G4AugerTransition>* dataSet = &augerTransitionTable[Z];
453 std::vector<G4AugerTransition>::iterator vectorIndex = dataSet->begin() + vacancyShellIndex;
454
455 G4AugerTransition* augerTransition = &(*vectorIndex);
456 return augerTransition;
457}

References augerTransitionTable, and Z.

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 461 of file G4AugerData.cc.

462{
463 std::vector<G4AugerTransition>* dataSet = &augerTransitionTable[Z];
464 return dataSet;
465}

References augerTransitionTable, and Z.

◆ LoadData()

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

Definition at line 233 of file G4AugerData.cc.

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

References FatalException, geant4_check_module_cycles::file, G4Exception(), MeV, CLHEP::detail::n, G4InuclParticleNames::name(), nInitShells, numberOfVacancies, and Z.

Referenced by BuildAugerTransitionTable().

◆ NumberOfAuger()

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 118 of file G4AugerData.cc.

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

References augerTransitionTable, FatalErrorInArgument, G4Exception(), CLHEP::detail::n, numberOfVacancies, and Z.

Referenced by PrintData().

◆ NumberOfTransitions()

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 95 of file G4AugerData.cc.

96{
97 G4int n = 0;
98 if (vacancyIndex<0 || vacancyIndex>=numberOfVacancies[Z])
99 {
100 G4Exception("G4AugerData::VacancyId()","de0002", JustWarning, "Energy deposited locally");
101 return 0;
102 }
103 else {
104 trans_Table::const_iterator element = augerTransitionTable.find(Z);
105 if (element == augerTransitionTable.end())
106 {
107 G4Exception("G4AugerData::VacancyId()","de0004", FatalErrorInArgument, "Check element");
108 return 0;
109 }
110 std::vector<G4AugerTransition> dataSet = (*element).second;
111 n = (G4int)dataSet[vacancyIndex].TransitionOriginatingShellIds()->size();
112 }
113 return n;
114}
@ JustWarning

References augerTransitionTable, FatalErrorInArgument, G4Exception(), JustWarning, CLHEP::detail::n, numberOfVacancies, and Z.

Referenced by PrintData().

◆ NumberOfVacancies()

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 66 of file G4AugerData.cc.

67{
68 return numberOfVacancies[Z];
69}

References numberOfVacancies, and Z.

Referenced by G4AtomicTransitionManager::NumberOfReachableAugerShells().

◆ PrintData()

void G4AugerData::PrintData ( G4int  Z)

Definition at line 418 of file G4AugerData.cc.

419{
420 for (G4int i = 0; i < numberOfVacancies[Z]; ++i)
421 {
422 G4cout << "---- TransitionData for the vacancy nb "
423 <<i
424 <<" of the atomic number elemnt "
425 << Z
426 <<"----- "
427 <<G4endl;
428
429 for (size_t k = 0; k<=NumberOfTransitions(Z,i); k++)
430 {
431 G4int id = StartShellId(Z,i,k);
432
433 for (size_t a = 0; a <= NumberOfAuger(Z,i,id); a++) {
434 G4double e = StartShellEnergy(Z,i,id,a)/MeV;
435 G4double p = StartShellProb(Z,i,id,a);
436 G4int augerId = AugerShellId(Z, i, id, a);
437 G4cout << k <<") Shell id: " << id <<G4endl;
438 G4cout << " Auger Originatig Shell Id :"<< augerId <<G4endl;
439 G4cout << " - Transition energy = " << e << " MeV "<<G4endl;
440 G4cout << " - Transition probability = " << p <<G4endl;
441 }
442 }
443 G4cout << "-------------------------------------------------"
444 << G4endl;
445 }
446}
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
size_t NumberOfTransitions(G4int Z, G4int vacancyIndex) const
Definition: G4AugerData.cc:95
size_t NumberOfAuger(G4int Z, G4int initIndex, G4int vacancyId) const
Definition: G4AugerData.cc:118
G4int StartShellId(G4int Z, G4int initialVacancyIndex, G4int transitionShellIndex) const
Definition: G4AugerData.cc:163
size_t AugerShellId(G4int Z, G4int vacancyIndex, G4int transId, G4int augerIndex) const
Definition: G4AugerData.cc:141
G4double StartShellProb(G4int Z, G4int vacancyIndex, G4int transitionId, G4int augerIndex) const
Definition: G4AugerData.cc:210
G4double StartShellEnergy(G4int Z, G4int vacancyIndex, G4int transitionId, G4int augerIndex) const
Definition: G4AugerData.cc:186

References AugerShellId(), G4cout, G4endl, MeV, NumberOfAuger(), NumberOfTransitions(), numberOfVacancies, StartShellEnergy(), StartShellId(), StartShellProb(), and Z.

◆ 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 186 of file G4AugerData.cc.

187{
188 G4double energy = 0;
189
190 if (vacancyIndex<0 || vacancyIndex>=numberOfVacancies[Z])
191 {
192 G4Exception("G4AugerData::VacancyId()","de0002", FatalErrorInArgument,"");
193 return 0;
194 }
195 else {
196 trans_Table::const_iterator element = augerTransitionTable.find(Z);
197 if (element == augerTransitionTable.end()) {
198 G4Exception("G4AugerData::VacancyId()","de0004", FatalErrorInArgument, "Check element");
199 return 0;
200 }
201 std::vector<G4AugerTransition> dataSet = (*element).second;
202 energy = dataSet[vacancyIndex].AugerTransitionEnergy(augerIndex,transitionId);
203
204 }
205 return energy;
206}
G4double energy(const ThreeVector &p, const G4double m)

References augerTransitionTable, G4INCL::KinematicsUtils::energy(), FatalErrorInArgument, G4Exception(), numberOfVacancies, and Z.

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 163 of file G4AugerData.cc.

164{
165 G4int n = 0;
166
167 if (vacancyIndex<0 || vacancyIndex>=numberOfVacancies[Z])
168 {
169 G4Exception("G4AugerData::VacancyId()","de0002", FatalErrorInArgument,"");
170 return 0;
171 }
172 else {
173 trans_Table::const_iterator element = augerTransitionTable.find(Z);
174 if (element == augerTransitionTable.end()) {
175 G4Exception("G4AugerData::VacancyId()","de0004", FatalErrorInArgument, "Check element");
176 return 0;
177 }
178 std::vector<G4AugerTransition> dataSet = (*element).second;
179 n = dataSet[vacancyIndex].TransitionOriginatingShellId(transitionShellIndex);
180 }
181 return n;
182}

References augerTransitionTable, FatalErrorInArgument, G4Exception(), CLHEP::detail::n, numberOfVacancies, and Z.

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 210 of file G4AugerData.cc.

211{
212 G4double prob = 0;
213
214 if (vacancyIndex<0 || vacancyIndex>=numberOfVacancies[Z])
215 {
216 G4Exception("G4AugerData::VacancyId()","de0002", FatalErrorInArgument,"");
217 return 0;
218 }
219 else {
220 trans_Table::const_iterator element = augerTransitionTable.find(Z);
221 if (element == augerTransitionTable.end()) {
222 G4Exception("G4AugerData::VacancyId()","de0004", FatalErrorInArgument, "Check element");
223 return 0;
224 }
225 std::vector<G4AugerTransition> dataSet = (*element).second;
226 prob = dataSet[vacancyIndex].AugerTransitionProbability(augerIndex, transitionId);
227 }
228 return prob;
229}

References augerTransitionTable, FatalErrorInArgument, G4Exception(), numberOfVacancies, and Z.

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 73 of file G4AugerData.cc.

74{
75 G4int n = 0;
76 if (vacancyIndex<0 || vacancyIndex>=numberOfVacancies[Z])
77 {
78 G4Exception("G4AugerData::VacancyId()","de0002", FatalErrorInArgument,"");
79 }
80 else {
81 trans_Table::const_iterator element = augerTransitionTable.find(Z);
82 if (element == augerTransitionTable.end()) {
83 G4Exception("G4AugerData::VacancyId()","de0004", FatalErrorInArgument, "Check element");
84 return 0;
85 }
86 std::vector<G4AugerTransition> dataSet = (*element).second;
87 n = (G4int) dataSet[vacancyIndex].FinalShellId();
88 }
89 return n;
90}

References augerTransitionTable, FatalErrorInArgument, G4Exception(), CLHEP::detail::n, numberOfVacancies, and Z.

Field Documentation

◆ augerTransitionTable

trans_Table G4AugerData::augerTransitionTable
private

◆ nInitShells

std::vector<G4int> G4AugerData::nInitShells
private

Definition at line 104 of file G4AugerData.hh.

Referenced by LoadData().

◆ numberOfVacancies

std::vector<G4int> G4AugerData::numberOfVacancies
private

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