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 ( G4int  minZ = 1,
G4int  maxZ = 100,
G4int  limitInfTable = 6,
G4int  limitSupTable = 100 
) [protected]

Definition at line 41 of file G4AtomicTransitionManager.cc.

References G4ShellData::BindingEnergy(), G4InuclSpecialFunctions::bindingEnergy(), G4ShellData::LoadData(), G4ShellData::NumberOfShells(), and G4ShellData::ShellId().

00043   :zMin(minZ), 
00044   zMax(maxZ),
00045   infTableLimit(limitInfTable),
00046   supTableLimit(limitSupTable)
00047 {
00048   // infTableLimit is initialized to 6 because EADL lacks data for Z<=5
00049   G4ShellData* shellManager = new G4ShellData;
00050 
00051   // initialization of the data for auger effect
00052   
00053   augerData = new G4AugerData;
00054 
00055   shellManager->LoadData("/fluor/binding");
00056   
00057   // Fills shellTable with the data from EADL, identities and binding 
00058   // energies of shells
00059   for (G4int Z = zMin; Z<= zMax; Z++)
00060     {
00061       std::vector<G4AtomicShell*> vectorOfShells;  
00062       size_t shellIndex = 0; 
00063 
00064       size_t numberOfShells=shellManager->NumberOfShells(Z);
00065       for (shellIndex = 0; shellIndex<numberOfShells; shellIndex++) 
00066         { 
00067           G4int shellId = shellManager->ShellId(Z,shellIndex);
00068           G4double bindingEnergy = shellManager->BindingEnergy(Z,shellIndex);
00069          
00070           G4AtomicShell * shell = new G4AtomicShell(shellId,bindingEnergy);
00071         
00072           vectorOfShells.push_back(shell);
00073         }
00074     
00075       //     shellTable.insert(std::make_pair(Z, vectorOfShells));
00076       shellTable[Z] = vectorOfShells;
00077     }
00078   
00079   // Fills transitionTable with the data from EADL, identities, transition 
00080   // energies and transition probabilities
00081   for (G4int Znum= infTableLimit; Znum<=supTableLimit; Znum++)
00082     {  G4FluoData* fluoManager = new G4FluoData;
00083     std::vector<G4FluoTransition*> vectorOfTransitions;
00084     fluoManager->LoadData(Znum);
00085     
00086     size_t numberOfVacancies = fluoManager-> NumberOfVacancies();
00087     
00088     for (size_t vacancyIndex = 0; vacancyIndex<numberOfVacancies;  vacancyIndex++)
00089       
00090       {
00091         std::vector<G4int>  vectorOfIds;
00092         G4DataVector vectorOfEnergies;
00093         G4DataVector vectorOfProbabilities;
00094         
00095         G4int finalShell = fluoManager->VacancyId(vacancyIndex);
00096         size_t numberOfTransitions = fluoManager->NumberOfTransitions(vacancyIndex);
00097         for (size_t origShellIndex = 0; origShellIndex < numberOfTransitions;
00098              origShellIndex++)
00099             
00100           {
00101             
00102             G4int originatingShellId = fluoManager->StartShellId(origShellIndex,vacancyIndex);
00103             
00104             vectorOfIds.push_back(originatingShellId);
00105             
00106             G4double transitionEnergy = fluoManager->StartShellEnergy(origShellIndex,vacancyIndex);
00107             vectorOfEnergies.push_back(transitionEnergy);
00108             G4double transitionProbability = fluoManager->StartShellProb(origShellIndex,vacancyIndex);
00109             vectorOfProbabilities.push_back(transitionProbability);
00110           }
00111           G4FluoTransition * transition = new G4FluoTransition (finalShell,vectorOfIds,
00112                                                                     vectorOfEnergies,vectorOfProbabilities);
00113           vectorOfTransitions.push_back(transition); 
00114       }
00115     //      transitionTable.insert(std::make_pair(Znum, vectorOfTransitions));
00116     transitionTable[Znum] = vectorOfTransitions;
00117       
00118       delete fluoManager;
00119     }
00120   delete shellManager;
00121 }

G4AtomicTransitionManager::~G4AtomicTransitionManager (  )  [protected]

Definition at line 123 of file G4AtomicTransitionManager.cc.

00125 { 
00126 
00127   delete augerData;
00128 
00129 std::map<G4int,std::vector<G4AtomicShell*>,std::less<G4int> >::iterator pos;
00130  
00131  for (pos = shellTable.begin(); pos != shellTable.end(); pos++){
00132    
00133    std::vector< G4AtomicShell*>vec = (*pos).second;
00134    
00135    G4int vecSize=vec.size();
00136    
00137    for (G4int i=0; i< vecSize; i++){
00138      G4AtomicShell* shell = vec[i];
00139      delete shell;     
00140    }
00141    
00142  }
00143  
00144  std::map<G4int,std::vector<G4FluoTransition*>,std::less<G4int> >::iterator ppos;
00145  
00146  for (ppos = transitionTable.begin(); ppos != transitionTable.end(); ppos++){
00147    
00148    std::vector<G4FluoTransition*>vec = (*ppos).second;
00149    
00150    G4int vecSize=vec.size();
00151    
00152    for (G4int i=0; i< vecSize; i++){
00153          G4FluoTransition* transition = vec[i];
00154          delete transition;      
00155    }
00156    
00157  }   
00158  
00159 }


Member Function Documentation

G4AtomicTransitionManager * G4AtomicTransitionManager::Instance (  )  [static]

Definition at line 163 of file G4AtomicTransitionManager.cc.

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::InitialiseForNewRun(), G4hImpactIonisation::PostStepDoIt(), G4eIonisationSpectrum::Probability(), G4eIonisationSpectrum::SampleEnergy(), G4PenelopePhotoElectricModel::SampleSecondaries(), and G4PenelopeIonisationModel::SampleSecondaries().

00164 {
00165   if (instance == 0)
00166     {
00167       instance = new G4AtomicTransitionManager;
00168      
00169     }
00170   return instance;
00171 }

G4int G4AtomicTransitionManager::NumberOfReachableAugerShells ( G4int  Z  )  const

Definition at line 310 of file G4AtomicTransitionManager.cc.

References CLHEP::detail::n, and G4AugerData::NumberOfVacancies().

00311 {
00312   G4int n = augerData->NumberOfVacancies(Z);
00313   return n;
00314 }

G4int G4AtomicTransitionManager::NumberOfReachableShells ( G4int  Z  )  const

Definition at line 281 of file G4AtomicTransitionManager.cc.

References G4Exception(), and JustWarning.

00282 {
00283 std::map<G4int,std::vector<G4FluoTransition*>,std::less<G4int> >::const_iterator pos;
00284 
00285   pos = transitionTable.find(Z);
00286 
00287   if (pos!= transitionTable.end())
00288     {
00289       std::vector<G4FluoTransition*> v = (*pos).second;
00290       return v.size();
00291     }
00292   else
00293     {
00294       //      G4cout << "G4AtomicTransitionMagare warning: No fluorescence or Auger for Z=" << Z << G4endl;
00295       //      G4cout << "Absorbed enrgy deposited locally" << G4endl;
00296       
00297       G4String msg = "No deexcitation for Z=" + (G4String(Z))+ ". Energy Deposited Locally.";
00298 
00299       G4Exception("G4AtomicTransitionManager::NumberOfReachebleShells()","de0001",JustWarning,msg);
00300 
00301       //"No deexcitation for Z=" + (G4String(Z))+". Energy Deposited Locally.");
00302 
00303       return 0;
00304     } 
00305 }

G4int G4AtomicTransitionManager::NumberOfShells ( G4int  Z  )  const

Definition at line 250 of file G4AtomicTransitionManager.cc.

References G4Exception(), and JustWarning.

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

00251 {
00252 
00253 std::map<G4int,std::vector<G4AtomicShell*>,std::less<G4int> >::const_iterator pos;
00254 
00255   pos = shellTable.find(Z);
00256 
00257   if (pos!= shellTable.end()){
00258 
00259     std::vector<G4AtomicShell*> v = (*pos).second;
00260 
00261     return v.size();
00262   }
00263 
00264   else{
00265     //    G4cout << "G4AtomicTransitionMagare warning: No fluorescence or Auger for Z=" << Z << G4endl;
00266     //    G4cout << "Absorbed enrgy deposited locally" << G4endl;
00267 
00268     G4String msg = "No deexcitation for Z=" + (G4String(Z))+ ". Energy Deposited Locally.";
00269 
00270     G4Exception("G4AtomicTransitionManager::NumberOfShells()","de0001",JustWarning,msg);
00271 
00272     //"No deexcitation for Z=" + (G4String(Z))+". Energy Deposited Locally.");
00273 
00274     return 0;
00275   } 
00276 }

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

Definition at line 241 of file G4AtomicTransitionManager.cc.

References G4AugerData::GetAugerTransition().

00242 {
00243   
00244   G4AugerTransition* augerTransition = augerData->GetAugerTransition(Z,vacancyShellIndex);
00245   return augerTransition;
00246 }

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

Definition at line 214 of file G4AtomicTransitionManager.cc.

References G4Exception(), and JustWarning.

00215 {
00216   std::map<G4int,std::vector<G4FluoTransition*>,std::less<G4int> >::const_iterator pos;
00217   pos = transitionTable.find(Z);
00218   if (pos!= transitionTable.end())
00219     {
00220       std::vector<G4FluoTransition*> v = (*pos).second;      
00221       if (shellIndex < v.size()) return(v[shellIndex]);
00222       else {
00223         G4Exception("G4AtomicTransitionManager::ReachebleShell()","de0002", JustWarning,"Energy Deposited Locally.");
00224         return 0;
00225       }
00226   }
00227   else{
00228     //    G4cout << "G4AtomicTransitionMagare warning: No fluorescence or Auger for Z=" << Z << G4endl;
00229     //    G4cout << "Absorbed enrgy deposited locally" << G4endl;
00230 
00231     //    G4String pippo = (G4String(Z));
00232 
00233     G4String msg = "No deexcitation for Z=" + (G4String(Z))+ ". Energy Deposited Locally.";
00234 
00235     G4Exception("G4AtomicTransitionManager::ReachableShell()","de0001",JustWarning,msg);
00236     //"No deexcitation for Z=" + (G4String(Z))+". Energy Deposited Locally.");
00237     return 0;
00238   } 
00239 }

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

Definition at line 174 of file G4AtomicTransitionManager.cc.

References FatalErrorInArgument, G4cout, G4endl, and G4Exception().

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

00175 { 
00176   std::map<G4int,std::vector<G4AtomicShell*>,std::less<G4int> >::const_iterator pos;
00177   
00178   pos = shellTable.find(Z);
00179   
00180   if (pos!= shellTable.end())
00181     {
00182       std::vector<G4AtomicShell*> v = (*pos).second;
00183       if (shellIndex<v.size())
00184         {
00185           return(v[shellIndex]);
00186         }
00187       else 
00188         {
00189           size_t lastShell = v.size();
00190           G4cout << "G4AtomicTransitionManager::Shell - Z = " 
00191                  << Z << ", shellIndex = " << shellIndex 
00192                  << " not found; number of shells = " << lastShell << G4endl;
00193           //  G4Exception("G4AtomicTransitionManager:shell not found");
00194           if (lastShell > 0)
00195             {
00196               return v[lastShell - 1];
00197             }
00198           else
00199             {       
00200               return 0;
00201             }
00202         }
00203     }
00204   else
00205     {
00206       G4Exception("G4AtomicTransitionManager::Shell()","de0001",FatalErrorInArgument,"Z not found");
00207       return 0;
00208     } 
00209 }

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

Definition at line 364 of file G4AtomicTransitionManager.cc.

References FatalException, G4Exception(), and JustWarning.

00366 {
00367 
00368   std::map<G4int,std::vector<G4FluoTransition*>,std::less<G4int> >::iterator pos;
00369   
00370   pos = transitionTable.find(Z);
00371   
00372   if (pos!= transitionTable.end()){
00373     
00374     std::vector<G4FluoTransition*> v = (*pos).second;
00375   
00376     
00377     if (shellIndex<v.size()){
00378 
00379       G4FluoTransition* transition=v[shellIndex];
00380       G4DataVector transProb = transition->TransitionProbabilities();
00381       G4double totalRadTransProb = 0;
00382       
00383       for(size_t j = 0; j<transProb.size(); j++) // AM -- Corrected, was 1
00384         {
00385           totalRadTransProb = totalRadTransProb + transProb[j];
00386         }
00387       
00388       if (totalRadTransProb > 1) {
00389         G4Exception( "G4AtomicTransitionManager::TotalNonRadiativeTransitionProbability()","de0003",FatalException,"Total probability mismatch");
00390       return 0;
00391 }
00392       G4double totalNonRadTransProb= (1 - totalRadTransProb);
00393       
00394       return totalNonRadTransProb;    }
00395     
00396     else {
00397 
00398 G4Exception("G4AtomicTransitionManager::TotalNonRadiativeTransitionProbability()","de0002", JustWarning,"Energy Deposited Locally.");
00399 
00400       return 0;
00401     }
00402   }
00403   else{
00404     //    G4cout << "G4AtomicTransitionMagare warning: No fluorescence or Auger for Z=" << Z << G4endl;
00405     //    G4cout << "Absorbed enrgy deposited locally" << G4endl;
00406 
00407     G4String msg = "No deexcitation for Z=" + (G4String(Z))+ ". Energy Deposited Locally.";
00408 
00409     G4Exception("G4AtomicTransitionManager::TotalNonRadiativeTransitionProbability()","de0001",JustWarning,msg);
00410 
00411 //"No deexcitation for Z=" + (G4String(Z))+ ". Energy Deposited Locally.");
00412 
00413     return 0;
00414   } 
00415 }

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

Definition at line 318 of file G4AtomicTransitionManager.cc.

References G4Exception(), and JustWarning.

00321 {
00322 std::map<G4int,std::vector<G4FluoTransition*>,std::less<G4int> >::iterator pos;
00323 
00324   pos = transitionTable.find(Z);
00325 
00326   if (pos!= transitionTable.end())
00327     {
00328       std::vector<G4FluoTransition*> v = (*pos).second;
00329       
00330     if (shellIndex < v.size())
00331       {
00332         G4FluoTransition* transition = v[shellIndex];
00333         G4DataVector transProb = transition->TransitionProbabilities();
00334         G4double totalRadTransProb = 0;
00335         
00336         for (size_t j = 0; j<transProb.size(); j++) // AM -- corrected, it was 1
00337         {
00338           totalRadTransProb = totalRadTransProb + transProb[j];
00339         }
00340       return totalRadTransProb;   
00341       
00342     }
00343     else {
00344 
00345       G4Exception("G4AtomicTransitionManager::TotalRadiativeTransitionProbability()","de0002", JustWarning,"Energy Deposited Locally.");
00346       return 0;
00347       
00348     }
00349   }
00350   else{
00351     //G4cout << "G4AtomicTransitionMagare warning: No fluorescence or Auger for Z=" << Z << G4endl;
00352     //G4cout << "Absorbed enrgy deposited locally" << G4endl;
00353     
00354     G4String msg = "No deexcitation for Z=" + (G4String(Z))+ ". Energy Deposited Locally.";
00355 
00356     G4Exception("G4AtomicTransitionManager::TotalRadiativeTransitionProbability()","de0001",JustWarning,msg);
00357     //"No deexcitation for Z=" + (G4String(Z))+". Energy Deposited Locally.");
00358 
00359 
00360     return 0;
00361   } 
00362 }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:51:28 2013 for Geant4 by  doxygen 1.4.7