Geant4-11
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
G4AtomicTransitionManager Class Reference

#include <G4AtomicTransitionManager.hh>

Public Member Functions

G4int GetVerboseLevel ()
 
void Initialise ()
 needs to be called once from other code before start of run More...
 
G4int NumberOfReachableAugerShells (G4int Z) const
 
G4int NumberOfReachableShells (G4int Z) const
 
G4int NumberOfShells (G4int Z) const
 
const G4AugerTransitionReachableAugerShell (G4int Z, G4int shellIndex) const
 
const G4FluoTransitionReachableShell (G4int Z, size_t shellIndex) const
 
void SetVerboseLevel (G4int vl)
 Verbosity control. More...
 
G4AtomicShellShell (G4int Z, size_t shellIndex) const
 
G4double TotalNonRadiativeTransitionProbability (G4int Z, size_t shellIndex) const
 
G4double TotalRadiativeTransitionProbability (G4int Z, size_t shellIndex) const
 

Static Public Member Functions

static G4AtomicTransitionManagerInstance ()
 

Private Member Functions

 G4AtomicTransitionManager ()
 
 G4AtomicTransitionManager (const G4AtomicTransitionManager &)
 
G4AtomicTransitionManageroperator= (const G4AtomicTransitionManager &right)
 
 ~G4AtomicTransitionManager ()
 

Private Attributes

G4AugerDataaugerData
 
G4int infTableLimit = 6
 
G4bool isInitialized
 
std::map< G4int, std::vector< G4AtomicShell * >, std::less< G4int > > shellTable
 
G4int supTableLimit = 100
 
std::map< G4int, std::vector< G4FluoTransition * >, std::less< G4int > > transitionTable
 
G4int verboseLevel
 
G4int zMax = 100
 
G4int zMin = 1
 

Static Private Attributes

static G4AtomicTransitionManagerinstance = nullptr
 

Detailed Description

Definition at line 57 of file G4AtomicTransitionManager.hh.

Constructor & Destructor Documentation

◆ G4AtomicTransitionManager() [1/2]

G4AtomicTransitionManager::G4AtomicTransitionManager ( )
explicitprivate

◆ ~G4AtomicTransitionManager()

G4AtomicTransitionManager::~G4AtomicTransitionManager ( )
private

Definition at line 64 of file G4AtomicTransitionManager.cc.

65{
66 delete augerData;
67
68 for (auto& pos : shellTable){
69 std::vector<G4AtomicShell*>vec = pos.second;
70 G4int vecSize = vec.size();
71 for (G4int i=0; i< vecSize; ++i){
72 G4AtomicShell* shell = vec[i];
73 delete shell;
74 }
75 }
76
77 for (auto& ppos : transitionTable)
78 {
79 std::vector<G4FluoTransition*>vec = ppos.second;
80 G4int vecSize=vec.size();
81
82 for (G4int i=0; i< vecSize; ++i){
83 G4FluoTransition* transition = vec[i];
84 delete transition;
85 }
86 }
87}
static const G4double pos
int G4int
Definition: G4Types.hh:85
std::map< G4int, std::vector< G4AtomicShell * >, std::less< G4int > > shellTable
std::map< G4int, std::vector< G4FluoTransition * >, std::less< G4int > > transitionTable

References augerData, pos, shellTable, and transitionTable.

◆ G4AtomicTransitionManager() [2/2]

G4AtomicTransitionManager::G4AtomicTransitionManager ( const G4AtomicTransitionManager )
private

Member Function Documentation

◆ GetVerboseLevel()

G4int G4AtomicTransitionManager::GetVerboseLevel ( )
inline

Definition at line 110 of file G4AtomicTransitionManager.hh.

110{return verboseLevel;};

References verboseLevel.

◆ Initialise()

void G4AtomicTransitionManager::Initialise ( )

needs to be called once from other code before start of run

Definition at line 278 of file G4AtomicTransitionManager.cc.

279{
281
282 if(isInitialized) { return; }
283 isInitialized = true;
284
285 // Selection of fluorescence files
286
287 G4String fluoDirectory = "/fluor";
288
289 fluoDirectory = (G4EmParameters::Instance()->BeardenFluoDir()?
290 "/fluor_Bearden":"/fluor");
291
292 // infTableLimit is initialized to 6 because EADL lacks data for Z<=5
293 G4ShellData* shellManager = new G4ShellData;
294 shellManager->LoadData(fluoDirectory+"/binding");
295
296 // initialization of the data for auger effect
298
300 {
301 fluoDirectory = "/fluor_ANSTO";
302 G4cout << "The ANSTO fluorescence radiation yields substitute the EADL data libraries" << G4endl;
303 }
304 // Fills shellTable with the data from EADL, identities and binding
305 // energies of shells
306 for (G4int Z = zMin; Z<= zMax; ++Z)
307 {
308
309 if ((Z > 92) && (G4EmParameters::Instance()->ANSTOFluoDir())) fluoDirectory ="/fluor";
310
311 std::vector<G4AtomicShell*> vectorOfShells;
312 size_t shellIndex = 0;
313
314 size_t numberOfShells = shellManager->NumberOfShells(Z);
315 // G4cout << fluoDirectory <<" For Z= " << Z << " " << numberOfShells << " shells" << G4endl;
316 for (shellIndex = 0; shellIndex<numberOfShells; ++shellIndex)
317 {
318 G4int shellId = shellManager->ShellId(Z,shellIndex);
319 G4double bindingEnergy = shellManager->BindingEnergy(Z,shellIndex);
320
321 G4AtomicShell * shell = new G4AtomicShell(shellId,bindingEnergy);
322
323 vectorOfShells.push_back(shell);
324 }
325 shellTable[Z] = vectorOfShells;
326 }
327
328 // Fills transitionTable with the data from EADL, identities, transition
329 // energies and transition probabilities
330 if (G4EmParameters::Instance()->ANSTOFluoDir()) fluoDirectory = "/fluor_ANSTO";
331
332
333 for (G4int Znum= infTableLimit; Znum<=supTableLimit; ++Znum)
334 {
335 if ((Znum > 92) && (G4EmParameters::Instance()->ANSTOFluoDir())) fluoDirectory ="/fluor";
336 G4FluoData* fluoManager = new G4FluoData(fluoDirectory);
337 std::vector<G4FluoTransition*> vectorOfTransitions;
338 fluoManager->LoadData(Znum);
339
340 size_t numberOfVacancies = fluoManager-> NumberOfVacancies();
341
342 for(size_t vacancyIndex = 0; vacancyIndex<numberOfVacancies;
343 ++vacancyIndex)
344 {
345 std::vector<G4int> vectorOfIds;
346 G4DataVector vectorOfEnergies;
347 G4DataVector vectorOfProbabilities;
348
349 G4int finalShell = fluoManager->VacancyId(vacancyIndex);
350 size_t numberOfTransitions =
351 fluoManager->NumberOfTransitions(vacancyIndex);
352 for (size_t origShellIndex = 0; origShellIndex < numberOfTransitions;
353 ++origShellIndex)
354 {
355 G4int originatingShellId =
356 fluoManager->StartShellId(origShellIndex,vacancyIndex);
357 vectorOfIds.push_back(originatingShellId);
358
359 G4double transitionEnergy =
360 fluoManager->StartShellEnergy(origShellIndex,vacancyIndex);
361 vectorOfEnergies.push_back(transitionEnergy);
362 G4double transitionProbability =
363 fluoManager->StartShellProb(origShellIndex,vacancyIndex);
364 vectorOfProbabilities.push_back(transitionProbability);
365 }
366 G4FluoTransition* transition =
367 new G4FluoTransition (finalShell,vectorOfIds,
368 vectorOfEnergies,vectorOfProbabilities);
369 vectorOfTransitions.push_back(transition);
370 }
371 transitionTable[Znum] = vectorOfTransitions;
372 delete fluoManager;
373 }
374 delete shellManager;
375}
double G4double
Definition: G4Types.hh:83
const G4int Z[17]
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
static G4EmParameters * Instance()
G4bool BeardenFluoDir() const
G4bool ANSTOFluoDir() const
G4double StartShellEnergy(G4int initIndex, G4int vacancyIndex) const
Definition: G4FluoData.cc:152
size_t NumberOfTransitions(G4int vacancyIndex) const
Definition: G4FluoData.cc:103
G4int VacancyId(G4int vacancyIndex) const
Given the index of the vacancy returns its identity.
Definition: G4FluoData.cc:81
void LoadData(G4int Z)
Definition: G4FluoData.cc:204
G4int StartShellId(G4int initIndex, G4int vacancyIndex) const
Definition: G4FluoData.cc:124
G4double StartShellProb(G4int initIndex, G4int vacancyIndex) const
Definition: G4FluoData.cc:177
G4int ShellId(G4int Z, G4int shellIndex) const
Definition: G4ShellData.cc:118
G4double BindingEnergy(G4int Z, G4int shellIndex) const
Definition: G4ShellData.cc:161
size_t NumberOfShells(G4int Z) const
Definition: G4ShellData.cc:81
void LoadData(const G4String &fileName)
Definition: G4ShellData.cc:228
G4double bindingEnergy(G4int A, G4int Z)

References G4EmParameters::ANSTOFluoDir(), anonymous_namespace{G4AtomicTransitionManager.cc}::AtomicTransitionManagerMutex, augerData, G4EmParameters::BeardenFluoDir(), G4InuclSpecialFunctions::bindingEnergy(), G4ShellData::BindingEnergy(), G4cout, G4endl, infTableLimit, G4EmParameters::Instance(), isInitialized, G4ShellData::LoadData(), G4FluoData::LoadData(), G4ShellData::NumberOfShells(), G4FluoData::NumberOfTransitions(), G4ShellData::ShellId(), shellTable, G4FluoData::StartShellEnergy(), G4FluoData::StartShellId(), G4FluoData::StartShellProb(), supTableLimit, transitionTable, G4FluoData::VacancyId(), Z, zMax, and zMin.

Referenced by G4LivermoreIonisationModel::Initialise(), G4UAtomicDeexcitation::InitialiseForNewRun(), and G4PenelopeOscillatorManager::ReadElementData().

◆ Instance()

G4AtomicTransitionManager * G4AtomicTransitionManager::Instance ( void  )
static

The only way to get an instance of this class is to call the function Instance()

Definition at line 48 of file G4AtomicTransitionManager.cc.

49{
50 if (instance == nullptr) {
52 }
53 return instance;
54}
static G4AtomicTransitionManager * instance

References G4AtomicTransitionManager(), and instance.

Referenced by G4eIonisationSpectrum::AverageEnergy(), G4ecpssrBaseKxsModel::CalculateCrossSection(), G4ecpssrBaseLixsModel::CalculateL1CrossSection(), G4ecpssrBaseLixsModel::CalculateL2CrossSection(), G4ecpssrBaseLixsModel::CalculateL3CrossSection(), G4ecpssrBaseLixsModel::CalculateVelocity(), G4LivermoreIonisationCrossSection::G4LivermoreIonisationCrossSection(), G4LivermoreIonisationModel::G4LivermoreIonisationModel(), G4OrlicLiXsModel::G4OrlicLiXsModel(), G4PenelopeComptonModel::G4PenelopeComptonModel(), G4PenelopeIonisationCrossSection::G4PenelopeIonisationCrossSection(), G4PenelopePhotoElectricModel::G4PenelopePhotoElectricModel(), G4UAtomicDeexcitation::G4UAtomicDeexcitation(), G4AtomicDeexcitation::GenerateAuger(), G4AtomicDeexcitation::GenerateFluorescence(), G4hImpactIonisation::PostStepDoIt(), G4eIonisationSpectrum::Probability(), G4PenelopeOscillatorManager::ReadElementData(), G4eIonisationSpectrum::SampleEnergy(), G4PenelopeIonisationModel::SampleSecondaries(), G4PenelopePhotoElectricModel::SampleSecondaries(), and G4AtomicDeexcitation::SelectTypeOfTransition().

◆ NumberOfReachableAugerShells()

G4int G4AtomicTransitionManager::NumberOfReachableAugerShells ( G4int  Z) const

This function returns the number of possible NON-radiative transitions for the atom with atomic number Z i.e. the number of shell in wich a vacancy can be filled by a NON-radiative transition

Definition at line 211 of file G4AtomicTransitionManager.cc.

212{
214}
size_t NumberOfVacancies(G4int Z) const
Definition: G4AugerData.cc:66

References augerData, G4AugerData::NumberOfVacancies(), and Z.

Referenced by G4AtomicDeexcitation::GenerateAuger(), and G4UAtomicDeexcitation::GenerateAuger().

◆ NumberOfReachableShells()

G4int G4AtomicTransitionManager::NumberOfReachableShells ( G4int  Z) const

This function returns the number of those shells of the element whose atomic number is Z which are reachable through a radiative transition

Definition at line 188 of file G4AtomicTransitionManager.cc.

189{
190 auto pos = transitionTable.find(Z);
191 G4int res = 0;
192 if (pos!= transitionTable.end())
193 {
194 res = ((*pos).second).size();
195 }
196 else
197 {
199 ed << "No deexcitation for Z= " << Z
200 << ", so energy deposited locally";
201 G4Exception("G4AtomicTransitionManager::NumberOfReachebleShells()",
202 "de0001",FatalException,ed,"");
203 }
204 return res;
205}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:40

References FatalException, G4Exception(), pos, transitionTable, and Z.

Referenced by G4AtomicDeexcitation::GenerateFluorescence(), G4UAtomicDeexcitation::GenerateFluorescence(), G4AtomicDeexcitation::SelectTypeOfTransition(), and G4UAtomicDeexcitation::SelectTypeOfTransition().

◆ NumberOfShells()

G4int G4AtomicTransitionManager::NumberOfShells ( G4int  Z) const

This function returns the number of shells of the element whose atomic number is Z

Definition at line 166 of file G4AtomicTransitionManager.cc.

167{
168 auto pos = shellTable.find(Z);
169
170 G4int res = 0;
171 if (pos != shellTable.end()){
172
173 res = ((*pos).second).size();
174
175 } else {
177 ed << "No deexcitation for Z= " << Z;
178 G4Exception("G4AtomicTransitionManager::NumberOfShells()","de0001",
179 FatalException, ed, "");
180 }
181 return res;
182}

References FatalException, G4Exception(), pos, shellTable, and Z.

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

◆ operator=()

G4AtomicTransitionManager & G4AtomicTransitionManager::operator= ( const G4AtomicTransitionManager right)
private

◆ ReachableAugerShell()

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

This function gives, upon Z and the Index of the initial shell where the vacancy is, the NON-radiative transition that can happen with originating shell for the transition, and the data for the possible auger electrons emitted (originating vacancy, energy amnd probability)

Definition at line 159 of file G4AtomicTransitionManager.cc.

161{
162 return augerData->GetAugerTransition(Z,vacancyShellIndex);
163}
G4AugerTransition * GetAugerTransition(G4int Z, G4int vacancyShellIndex)
Definition: G4AugerData.cc:450

References augerData, G4AugerData::GetAugerTransition(), and Z.

Referenced by G4AtomicDeexcitation::GenerateAuger(), and G4UAtomicDeexcitation::GenerateAuger().

◆ ReachableShell()

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

Z is the atomic number of the element, shellIndex is the index (in EADL) of the final shell for the transition This function gives, upon Z and the Index of the initial shell where the vacancy is, the radiative transition that can happen (originating shell, energy, probability)

Definition at line 130 of file G4AtomicTransitionManager.cc.

131{
132 auto pos = transitionTable.find(Z);
133 if (pos!= transitionTable.end())
134 {
135 std::vector<G4FluoTransition*> v = (*pos).second;
136 if (shellIndex < v.size()) { return(v[shellIndex]); }
137
138 else {
140 ed << "No fluo transition for Z= " << Z
141 << " shellIndex= " << shellIndex;
142 G4Exception("G4AtomicTransitionManager::ReachebleShell()","de0002",
143 FatalException,ed,"");
144 }
145 }
146 else
147 {
149 ed << "No transition table for Z= " << Z
150 << " shellIndex= " << shellIndex;
151 G4Exception("G4AtomicTransitionManager::ReachableShell()","de0001",
152 FatalException,ed,"");
153 }
154 return 0;
155}

References FatalException, G4Exception(), pos, transitionTable, and Z.

Referenced by G4AtomicDeexcitation::SelectTypeOfTransition(), and G4UAtomicDeexcitation::SelectTypeOfTransition().

◆ SetVerboseLevel()

void G4AtomicTransitionManager::SetVerboseLevel ( G4int  vl)
inline

Verbosity control.

Definition at line 109 of file G4AtomicTransitionManager.hh.

109{verboseLevel = vl;};

References verboseLevel.

◆ Shell()

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

Z is the atomic number of the element, shellIndex is the index (in EADL) of the shell

Definition at line 90 of file G4AtomicTransitionManager.cc.

91{
92 auto pos = shellTable.find(Z);
93
94 if (pos!= shellTable.end())
95 {
96 std::vector<G4AtomicShell*> v = (*pos).second;
97 if (shellIndex < v.size()) { return v[shellIndex]; }
98
99 else
100 {
101 size_t lastShell = v.size();
103 ed << "No de-excitation for Z= " << Z
104 << " shellIndex= " << shellIndex
105 << ">= numberOfShells= " << lastShell;
106 if (verboseLevel > 0)
107 G4Exception("G4AtomicTransitionManager::Shell()","de0001",
108 JustWarning,ed," AtomicShell not found");
109 if (lastShell > 0) { return v[lastShell - 1]; }
110 }
111 }
112 else
113 {
115 ed << "No de-excitation for Z= " << Z
116 << " shellIndex= " << shellIndex
117 << ". AtomicShell not found - check if data are uploaded";
118 G4Exception("G4AtomicTransitionManager::Shell()","de0001",
119 FatalException,ed,"");
120 }
121 return 0;
122}
@ JustWarning

References FatalException, G4Exception(), JustWarning, pos, shellTable, verboseLevel, and Z.

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

◆ TotalNonRadiativeTransitionProbability()

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

Gives the sum of the probabilities of non radiative transition from the shell whose index is shellIndex

Definition at line 260 of file G4AtomicTransitionManager.cc.

262{
263 G4double prob = 1.0 - TotalRadiativeTransitionProbability(Z, shellIndex);
264 if(prob > 1.0 || prob < 0.0) {
266 ed << "Total probability mismatch Z= " << Z
267 << " shellIndex= " << shellIndex
268 << " prob= " << prob;
270 "G4AtomicTransitionManager::TotalNonRadiativeTransitionProbability()",
271 "de0003",FatalException,ed,"Cannot compute non-radiative probability");
272 return 0.0;
273 }
274 return prob;
275}
G4double TotalRadiativeTransitionProbability(G4int Z, size_t shellIndex) const

References FatalException, G4Exception(), TotalRadiativeTransitionProbability(), and Z.

◆ TotalRadiativeTransitionProbability()

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

Gives the sum of the probabilities of radiative transition towards the shell whose index is shellIndex

Definition at line 217 of file G4AtomicTransitionManager.cc.

219{
220 auto pos = transitionTable.find(Z);
221 G4double totalRadTransProb = 0.0;
222
223 if (pos!= transitionTable.end())
224 {
225 std::vector<G4FluoTransition*> v = (*pos).second;
226
227 if (shellIndex < v.size())
228 {
229 G4FluoTransition* transition = v[shellIndex];
230 G4DataVector transProb = transition->TransitionProbabilities();
231
232 for (size_t j=0; j<transProb.size(); ++j)
233 {
234 totalRadTransProb += transProb[j];
235 }
236 }
237 else
238 {
240 ed << "Zero transition probability for Z=" << Z
241 << " shellIndex= " << shellIndex;
243 "G4AtomicTransitionManager::TotalRadiativeTransitionProbability()",
244 "de0002",FatalException,"Incorrect de-excitation");
245 }
246 }
247 else
248 {
250 ed << "No deexcitation for Z=" << Z
251 << " shellIndex= " << shellIndex;
253 "G4AtomicTransitionManager::TotalRadiativeTransitionProbability()",
254 "de0001",FatalException,ed,"Cannot compute transition probability");
255 }
256 return totalRadTransProb;
257}
const G4DataVector & TransitionProbabilities() const
Return the probabilities of the transitions.

References FatalException, G4Exception(), pos, G4FluoTransition::TransitionProbabilities(), transitionTable, and Z.

Referenced by TotalNonRadiativeTransitionProbability().

Field Documentation

◆ augerData

G4AugerData* G4AtomicTransitionManager::augerData
private

◆ infTableLimit

G4int G4AtomicTransitionManager::infTableLimit = 6
private

Definition at line 141 of file G4AtomicTransitionManager.hh.

Referenced by Initialise().

◆ instance

G4AtomicTransitionManager * G4AtomicTransitionManager::instance = nullptr
staticprivate

Definition at line 121 of file G4AtomicTransitionManager.hh.

Referenced by Instance().

◆ isInitialized

G4bool G4AtomicTransitionManager::isInitialized
private

Definition at line 144 of file G4AtomicTransitionManager.hh.

Referenced by Initialise().

◆ shellTable

std::map<G4int,std::vector<G4AtomicShell*>,std::less<G4int> > G4AtomicTransitionManager::shellTable
private

◆ supTableLimit

G4int G4AtomicTransitionManager::supTableLimit = 100
private

Definition at line 142 of file G4AtomicTransitionManager.hh.

Referenced by Initialise().

◆ transitionTable

std::map<G4int,std::vector<G4FluoTransition*>,std::less<G4int> > G4AtomicTransitionManager::transitionTable
private

◆ verboseLevel

G4int G4AtomicTransitionManager::verboseLevel
private

Definition at line 143 of file G4AtomicTransitionManager.hh.

Referenced by GetVerboseLevel(), SetVerboseLevel(), and Shell().

◆ zMax

G4int G4AtomicTransitionManager::zMax = 100
private

Definition at line 137 of file G4AtomicTransitionManager.hh.

Referenced by Initialise().

◆ zMin

G4int G4AtomicTransitionManager::zMin = 1
private

Definition at line 136 of file G4AtomicTransitionManager.hh.

Referenced by Initialise().


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