Import Geant4 4.1.0 source tree
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4AtomicTransitionManager.cc,v 1.2 ????
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
// Authors: Elena Guardincerri (Elena.Guardincerri@ge.infn.it)
|
||||
// Alfonso Mantero (Alfonso.Mantero@ge.infn.it)
|
||||
@@ -35,12 +35,20 @@
|
||||
|
||||
#include "G4AtomicTransitionManager.hh"
|
||||
|
||||
G4AtomicTransitionManager::G4AtomicTransitionManager(G4int minZ, G4int maxZ, G4int limitInfTable,G4int limitSupTable)
|
||||
:zMin(minZ), zMax(maxZ),infTableLimit(limitInfTable),supTableLimit(limitSupTable)
|
||||
G4AtomicTransitionManager::G4AtomicTransitionManager(G4int minZ, G4int maxZ,
|
||||
G4int limitInfTable,G4int limitSupTable)
|
||||
:zMin(minZ),
|
||||
zMax(maxZ),
|
||||
infTableLimit(limitInfTable),
|
||||
supTableLimit(limitSupTable)
|
||||
{
|
||||
// infTableLimit is initialized to 6 because EADL lacks data for Z<=5
|
||||
G4ShellData* shellManager = new G4ShellData;
|
||||
|
||||
// initialization of the data for auger effect
|
||||
|
||||
augerData = new G4AugerData;
|
||||
|
||||
shellManager->LoadData("/fluor/binding");
|
||||
|
||||
// Fills shellTable with the data from EADL, identities and binding
|
||||
@@ -68,7 +76,7 @@ G4AtomicTransitionManager::G4AtomicTransitionManager(G4int minZ, G4int maxZ, G4i
|
||||
// energies and transition probabilities
|
||||
for (G4int Znum= infTableLimit; Znum<=supTableLimit; Znum++)
|
||||
{ G4FluoData* fluoManager = new G4FluoData;
|
||||
G4std::vector<G4AtomicTransition*> vectorOfTransitions;
|
||||
G4std::vector<G4FluoTransition*> vectorOfTransitions;
|
||||
fluoManager->LoadData(Znum);
|
||||
|
||||
size_t numberOfVacancies = fluoManager-> NumberOfVacancies();
|
||||
@@ -82,7 +90,8 @@ G4AtomicTransitionManager::G4AtomicTransitionManager(G4int minZ, G4int maxZ, G4i
|
||||
|
||||
G4int finalShell = fluoManager->VacancyId(vacancyIndex);
|
||||
size_t numberOfTransitions = fluoManager->NumberOfTransitions(vacancyIndex);
|
||||
for (size_t origShellIndex = 0; origShellIndex <= numberOfTransitions;origShellIndex++)
|
||||
for (size_t origShellIndex = 0; origShellIndex <= numberOfTransitions;
|
||||
origShellIndex++)
|
||||
|
||||
{
|
||||
|
||||
@@ -95,7 +104,7 @@ G4AtomicTransitionManager::G4AtomicTransitionManager(G4int minZ, G4int maxZ, G4i
|
||||
G4double transitionProbability = fluoManager->StartShellProb(origShellIndex,vacancyIndex);
|
||||
vectorOfProbabilities.push_back(transitionProbability);
|
||||
}
|
||||
G4AtomicTransition * transition = new G4AtomicTransition (finalShell,vectorOfIds,
|
||||
G4FluoTransition * transition = new G4FluoTransition (finalShell,vectorOfIds,
|
||||
vectorOfEnergies,vectorOfProbabilities);
|
||||
vectorOfTransitions.push_back(transition);
|
||||
}
|
||||
@@ -109,7 +118,11 @@ G4AtomicTransitionManager::G4AtomicTransitionManager(G4int minZ, G4int maxZ, G4i
|
||||
|
||||
G4AtomicTransitionManager::~G4AtomicTransitionManager()
|
||||
|
||||
{ G4std::map<G4int,G4std::vector<G4AtomicShell*>,G4std::less<G4int> >::iterator pos;
|
||||
{
|
||||
|
||||
delete augerData;
|
||||
|
||||
G4std::map<G4int,G4std::vector<G4AtomicShell*>,G4std::less<G4int> >::iterator pos;
|
||||
|
||||
for (pos = shellTable.begin(); pos != shellTable.end(); pos++){
|
||||
|
||||
@@ -118,23 +131,23 @@ G4AtomicTransitionManager::~G4AtomicTransitionManager()
|
||||
G4int vecSize=vec.size();
|
||||
|
||||
for (G4int i=0; i< vecSize; i++){
|
||||
|
||||
delete vec[i];
|
||||
G4AtomicShell* shell = vec[i];
|
||||
delete shell;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
G4std::map<G4int,G4std::vector<G4AtomicTransition*>,G4std::less<G4int> >::iterator ppos;
|
||||
G4std::map<G4int,G4std::vector<G4FluoTransition*>,G4std::less<G4int> >::iterator ppos;
|
||||
|
||||
for (ppos = transitionTable.begin(); ppos != transitionTable.end(); ppos++){
|
||||
|
||||
G4std::vector< G4AtomicTransition*>vec = (*ppos).second;
|
||||
G4std::vector<G4FluoTransition*>vec = (*ppos).second;
|
||||
|
||||
G4int vecSize=vec.size();
|
||||
|
||||
for (G4int i=0; i< vecSize; i++){
|
||||
|
||||
delete vec[i];
|
||||
G4FluoTransition* transition = vec[i];
|
||||
delete transition;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -145,7 +158,7 @@ G4AtomicTransitionManager* G4AtomicTransitionManager::instance = 0;
|
||||
|
||||
G4AtomicTransitionManager* G4AtomicTransitionManager::Instance()
|
||||
{
|
||||
if (instance==0)
|
||||
if (instance == 0)
|
||||
{
|
||||
instance = new G4AtomicTransitionManager;
|
||||
|
||||
@@ -154,9 +167,9 @@ G4AtomicTransitionManager* G4AtomicTransitionManager::Instance()
|
||||
}
|
||||
|
||||
|
||||
const G4AtomicShell* G4AtomicTransitionManager::Shell(G4int Z, size_t shellIndex)
|
||||
G4AtomicShell* G4AtomicTransitionManager::Shell(G4int Z, size_t shellIndex) const
|
||||
{
|
||||
G4std::map<G4int,G4std::vector<G4AtomicShell*>,G4std::less<G4int> >::iterator pos;
|
||||
G4std::map<G4int,G4std::vector<G4AtomicShell*>,G4std::less<G4int> >::const_iterator pos;
|
||||
|
||||
pos = shellTable.find(Z);
|
||||
|
||||
@@ -180,13 +193,16 @@ const G4AtomicShell* G4AtomicTransitionManager::Shell(G4int Z, size_t shellIndex
|
||||
}
|
||||
}
|
||||
|
||||
const G4AtomicTransition* G4AtomicTransitionManager:: ReachableShell(G4int Z,size_t shellIndex)
|
||||
// This function gives, upon Z and the Index of the initial shell where te vacancy is,
|
||||
// the radiative transition that can happen (originating shell, energy, probability)
|
||||
|
||||
const G4FluoTransition* G4AtomicTransitionManager::ReachableShell(G4int Z,size_t shellIndex) const
|
||||
{
|
||||
G4std::map<G4int,G4std::vector<G4AtomicTransition*>,G4std::less<G4int> >::iterator pos;
|
||||
G4std::map<G4int,G4std::vector<G4FluoTransition*>,G4std::less<G4int> >::const_iterator pos;
|
||||
pos = transitionTable.find(Z);
|
||||
if (pos!= transitionTable.end())
|
||||
{
|
||||
G4std::vector<G4AtomicTransition*> v = (*pos).second;
|
||||
G4std::vector<G4FluoTransition*> v = (*pos).second;
|
||||
if (shellIndex < v.size()) return(v[shellIndex]);
|
||||
else {
|
||||
G4Exception("G4AtomicTransitionManager:reachable shell not found");
|
||||
@@ -199,10 +215,19 @@ const G4AtomicTransition* G4AtomicTransitionManager:: ReachableShell(G4int Z,siz
|
||||
}
|
||||
}
|
||||
|
||||
G4int G4AtomicTransitionManager::NumberOfShells (G4int Z)
|
||||
const G4AugerTransition* G4AtomicTransitionManager::ReachableAugerShell(G4int Z, G4int vacancyShellIndex) const
|
||||
{
|
||||
|
||||
G4AugerTransition* augerTransition = augerData->GetAugerTransition(Z,vacancyShellIndex);
|
||||
return augerTransition;
|
||||
}
|
||||
|
||||
|
||||
|
||||
G4int G4AtomicTransitionManager::NumberOfShells (G4int Z) const
|
||||
{
|
||||
|
||||
G4std::map<G4int,G4std::vector<G4AtomicShell*>,G4std::less<G4int> >::iterator pos;
|
||||
G4std::map<G4int,G4std::vector<G4AtomicShell*>,G4std::less<G4int> >::const_iterator pos;
|
||||
|
||||
pos = shellTable.find(Z);
|
||||
|
||||
@@ -219,15 +244,18 @@ G4std::map<G4int,G4std::vector<G4AtomicShell*>,G4std::less<G4int> >::iterator po
|
||||
}
|
||||
}
|
||||
|
||||
G4int G4AtomicTransitionManager::NumberOfReachableShells(G4int Z)
|
||||
// This function returns the number of possible radiative transitions for the atom with atomic number Z
|
||||
// i.e. the number of shell in wich a vacancy can be filled with a radiative transition
|
||||
|
||||
G4int G4AtomicTransitionManager::NumberOfReachableShells(G4int Z) const
|
||||
{
|
||||
G4std::map<G4int,G4std::vector<G4AtomicTransition*>,G4std::less<G4int> >::iterator pos;
|
||||
G4std::map<G4int,G4std::vector<G4FluoTransition*>,G4std::less<G4int> >::const_iterator pos;
|
||||
|
||||
pos = transitionTable.find(Z);
|
||||
|
||||
if (pos!= transitionTable.end())
|
||||
{
|
||||
G4std::vector<G4AtomicTransition*> v = (*pos).second;
|
||||
G4std::vector<G4FluoTransition*> v = (*pos).second;
|
||||
return v.size();
|
||||
}
|
||||
else
|
||||
@@ -237,21 +265,32 @@ G4std::map<G4int,G4std::vector<G4AtomicTransition*>,G4std::less<G4int> >::iterat
|
||||
}
|
||||
}
|
||||
|
||||
// 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 with a NON-radiative transition
|
||||
|
||||
G4int G4AtomicTransitionManager::NumberOfReachableAugerShells(G4int Z)const
|
||||
{
|
||||
G4int n = augerData->NumberOfVacancies(Z);
|
||||
return n;
|
||||
}
|
||||
|
||||
|
||||
|
||||
G4double G4AtomicTransitionManager::TotalRadiativeTransitionProbability(G4int Z,
|
||||
size_t shellIndex)
|
||||
|
||||
{
|
||||
G4std::map<G4int,G4std::vector<G4AtomicTransition*>,G4std::less<G4int> >::iterator pos;
|
||||
G4std::map<G4int,G4std::vector<G4FluoTransition*>,G4std::less<G4int> >::iterator pos;
|
||||
|
||||
pos = transitionTable.find(Z);
|
||||
|
||||
if (pos!= transitionTable.end())
|
||||
{
|
||||
G4std::vector<G4AtomicTransition*> v = (*pos).second;
|
||||
G4std::vector<G4FluoTransition*> v = (*pos).second;
|
||||
|
||||
if (shellIndex < v.size())
|
||||
{
|
||||
G4AtomicTransition* transition = v[shellIndex];
|
||||
G4FluoTransition* transition = v[shellIndex];
|
||||
G4DataVector transProb = transition->TransitionProbabilities();
|
||||
G4double totalRadTransProb = 0;
|
||||
|
||||
@@ -278,18 +317,18 @@ G4double G4AtomicTransitionManager::TotalNonRadiativeTransitionProbability(G4int
|
||||
|
||||
{
|
||||
|
||||
G4std::map<G4int,G4std::vector<G4AtomicTransition*>,G4std::less<G4int> >::iterator pos;
|
||||
G4std::map<G4int,G4std::vector<G4FluoTransition*>,G4std::less<G4int> >::iterator pos;
|
||||
|
||||
pos = transitionTable.find(Z);
|
||||
|
||||
if (pos!= transitionTable.end()){
|
||||
|
||||
G4std::vector<G4AtomicTransition*> v = (*pos).second;
|
||||
G4std::vector<G4FluoTransition*> v = (*pos).second;
|
||||
|
||||
|
||||
if (shellIndex<v.size()){
|
||||
|
||||
G4AtomicTransition* transition=v[shellIndex];
|
||||
G4FluoTransition* transition=v[shellIndex];
|
||||
G4DataVector transProb = transition->TransitionProbabilities();
|
||||
G4double totalRadTransProb = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user