G4AugerTransition.cc

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //
00027 // $Id: G4AugerTransition.cc,v 1.2 ????
00028 // 
00029 // Based on G4AtomicTransition.cc by 
00030 // Elena Guardincerri (Elena.Guardincerri@ge.infn.it)
00031 // 
00032 // Author: Alfonso Mantero (Alfonso.Mantero@ge.infn.it)
00033 //
00034 // History:
00035 // -----------
00036 // 4 Mar 2002: first implementation
00037 //
00038 // -------------------------------------------------------------------
00039 
00040 #include "G4AugerTransition.hh"
00041 
00042 // the final shell in wich the electron goes is needed, to know the data for the auger electron emitted
00043 // (i.e. originating shell id, electron energy and transition probability) 
00044 
00045 G4AugerTransition::G4AugerTransition(G4int finalShell, std::vector<G4int> transIds,
00046                                      const std::map<G4int,std::vector<G4int>,std::less<G4int> >* idMap,
00047                                      const std::map<G4int,G4DataVector,std::less<G4int> >* energyMap,
00048                                      const std::map<G4int,G4DataVector,std::less<G4int> >* probabilityMap)
00049 {
00050   finalShellId = finalShell;
00051   augerOriginatingShellIdsMap = *idMap;
00052   augerTransitionEnergiesMap = *energyMap;
00053   augerTransitionProbabilitiesMap = *probabilityMap;
00054   transitionOriginatingShellIds = transIds;
00055   
00056 
00057 }
00058 
00059 G4AugerTransition::~G4AugerTransition()
00060 { 
00061 
00062 }
00063 
00064 // Returns the ids of the shells from wich an auger electron culd came from, given th shell
00065 // from wich the transition electron cames from.
00066 
00067 const std::vector<G4int>* G4AugerTransition::AugerOriginatingShellIds(G4int startShellId) const
00068 {
00069   std::map<G4int,std::vector<G4int>,std::less<G4int> >::const_iterator shellId = augerOriginatingShellIdsMap.find(startShellId);
00070 
00071   const std::vector<G4int>* dataSet = &(*shellId).second;
00072   //const std::vector<G4int>* dataOut = 0;
00073 
00074   if (dataSet->size() == 0) {G4cout << "Error: no auger Id found"<< G4endl;}
00075   else {
00076     
00077     // dataOut = &dataSet;  
00078 
00079   }
00080 
00081   return dataSet;
00082 }
00083 
00084 // Returns the ids of the shells from wich an electron cuuld fill the vacancy in finalShellId
00085 
00086 const std::vector<G4int>* G4AugerTransition::TransitionOriginatingShellIds() const
00087 {
00088 
00089   const std::vector<G4int>* dataSet = &transitionOriginatingShellIds;
00090   return dataSet;
00091 }
00092 
00093 // Returns the energiess of the possible auger electrons, given th shell
00094 // from wich the transition electron cames from.
00095 
00096 const G4DataVector* G4AugerTransition::AugerTransitionEnergies(G4int startShellId) const
00097 {
00098   std::map<G4int,G4DataVector,std::less<G4int> >::const_iterator shellId = augerTransitionEnergiesMap.find(startShellId);
00099 
00100   if (shellId == augerTransitionEnergiesMap.end() ) 
00101     {
00102       G4Exception("G4AugerTransition::AugerTransitionEnergies()","de0002",JustWarning,"corresponding map element not found, energy deposited locally");
00103       return 0; 
00104     }
00105 
00106   const G4DataVector* dataSet = &(*shellId).second;
00107 
00108 
00109   return dataSet;
00110 }
00111 
00112 // Returns the emission probabilities of the auger electrons, given the shell
00113 // from wich the transition electron cames from.
00114 
00115 const G4DataVector* G4AugerTransition::AugerTransitionProbabilities(G4int startShellId) const
00116 {
00117 
00118   //debugging
00119   //if (startShellId == 1){G4cout <<"OI!!!"<< G4endl;}
00120 
00121   std::map<G4int,G4DataVector,std::less<G4int> >::const_iterator shellId = augerTransitionProbabilitiesMap.find(startShellId);
00122 
00123   if (shellId == augerTransitionProbabilitiesMap.end() ) 
00124     {
00125 
00126       G4Exception("G4AugerTransition::AugerTransitionProbabilities()","de0002",JustWarning,"corresponding map element not found, energy deposited locally");
00127       return 0;
00128     }
00129   
00130   const G4DataVector* dataSet = &(*shellId).second;
00131   // debugging purpose:
00132   /*  G4cout << "id: " << shellId->first << G4endl;
00133   G4cout << "size:" << dataSet->size() << G4endl;
00134   for (G4int i = 0; i < dataSet->size(); i++){
00135     G4cout << (dataSet[0])[i] << G4endl;
00136     }*/
00137   return dataSet; 
00138 }
00139 
00140 G4int G4AugerTransition::FinalShellId() const
00141 { 
00142   return finalShellId;
00143 }
00144 
00145 // Returns the id of the shell from wich come the auger electron , given the shell
00146 // from wich the transition electron cames from and the index number.
00147 
00148 G4int G4AugerTransition::AugerOriginatingShellId(G4int index, G4int startShellId) const
00149 {
00150   const std::vector<G4int>* ids = AugerOriginatingShellIds(startShellId);
00151   // G4int i = 
00152   std::vector<G4int>::const_iterator pos = ids->begin();
00153   G4int n = 0;
00154   n = *(pos+index);
00155   return n;
00156 }
00157 
00158 // Returns the energy of the auger electron, given the shell
00159 // from wich the transition electron cames from and the index number.
00160 
00161 G4double G4AugerTransition::AugerTransitionEnergy(G4int index, G4int startShellId) const
00162 {
00163   const G4DataVector* energies = AugerTransitionEnergies(startShellId);
00164     G4double energy = 0;    
00165   if (index < (G4int) energies->size()) {
00166     G4DataVector::const_iterator pos = energies->begin();
00167     energy = *(pos+index);
00168   }
00169   return energy; 
00170 }
00171 
00172 // Returns the probability of the auger emission, given the shell
00173 // from wich the transition electron cames from and the index number.
00174 
00175 G4double G4AugerTransition::AugerTransitionProbability(G4int index, G4int startShellId) const
00176 {
00177 
00178   const G4DataVector *probabilities = AugerTransitionProbabilities(startShellId);
00179   G4DataVector::const_iterator pos = probabilities->begin();
00180 
00181   G4double probability = 0; 
00182   probability = *(pos+index);
00183 
00184   return  probability;
00185   
00186 }
00187 
00188 G4int G4AugerTransition::TransitionOriginatingShellId(G4int index) const
00189 {
00190   return  transitionOriginatingShellIds[index];
00191 }
00192 
00193 
00194 
00195 
00196 
00197 
00198 
00199 
00200 
00201 
00202 
00203 
00204 
00205 
00206 
00207 
00208 
00209 
00210 
00211 
00212 

Generated on Mon May 27 17:47:42 2013 for Geant4 by  doxygen 1.4.7