Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-31 09:22:07

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 //
0027 // 
0028 // Based on G4AtomicTransition.cc by 
0029 // Elena Guardincerri (Elena.Guardincerri@ge.infn.it)
0030 // 
0031 // Author: Alfonso Mantero (Alfonso.Mantero@ge.infn.it)
0032 //
0033 // History:
0034 // -----------
0035 // 4 Mar 2002: first implementation
0036 //
0037 // -------------------------------------------------------------------
0038 
0039 #include "G4RDAugerTransition.hh"
0040 
0041 // the final shell in wich the electron goes is needed, to know the data for the auger electron emitted
0042 // (i.e. originating shell id, electron energy and transition probability) 
0043 
0044 G4RDAugerTransition::G4RDAugerTransition(G4int finalShell, std::vector<G4int> transIds,
0045                      const std::map<G4int,std::vector<G4int>,std::less<G4int> >* idMap,
0046                      const std::map<G4int,G4DataVector,std::less<G4int> >* energyMap,
0047                      const std::map<G4int,G4DataVector,std::less<G4int> >* probabilityMap)
0048 {
0049   finalShellId = finalShell;
0050   augerOriginatingShellIdsMap = *idMap;
0051   augerTransitionEnergiesMap = *energyMap;
0052   augerTransitionProbabilitiesMap = *probabilityMap;
0053   transitionOriginatingShellIds = transIds;
0054   
0055 
0056 }
0057 
0058 G4RDAugerTransition::~G4RDAugerTransition()
0059 { 
0060 
0061 }
0062 
0063 // Returns the ids of the shells from wich an auger electron culd came from, given th shell
0064 // from wich the transition electron cames from.
0065 
0066 const std::vector<G4int>* G4RDAugerTransition::AugerOriginatingShellIds(G4int startShellId) const
0067 {
0068   std::map<G4int,std::vector<G4int>,std::less<G4int> >::const_iterator shellId = augerOriginatingShellIdsMap.find(startShellId);
0069 
0070   const std::vector<G4int>* dataSet = &(*shellId).second;
0071   //const std::vector<G4int>* dataOut = 0;
0072 
0073   if (dataSet->size() == 0) {G4cout << "Error: no auger Id found"<< G4endl;}
0074   else {
0075     
0076     // dataOut = &dataSet;  
0077 
0078   }
0079 
0080   return dataSet;
0081 }
0082 
0083 // Returns the ids of the shells from wich an electron cuuld fill the vacancy in finalShellId
0084 
0085 const std::vector<G4int>* G4RDAugerTransition::TransitionOriginatingShellIds() const
0086 {
0087 
0088   const std::vector<G4int>* dataSet = &transitionOriginatingShellIds;
0089   return dataSet;
0090 }
0091 
0092 // Returns the energiess of the possible auger electrons, given th shell
0093 // from wich the transition electron cames from.
0094 
0095 const G4DataVector* G4RDAugerTransition::AugerTransitionEnergies(G4int startShellId) const
0096 {
0097   std::map<G4int,G4DataVector,std::less<G4int> >::const_iterator shellId = augerTransitionEnergiesMap.find(startShellId);
0098   const G4DataVector* dataSet = &(*shellId).second;
0099 
0100 
0101   return dataSet;
0102 }
0103 
0104 // Returns the emission probabilities of the auger electrons, given th shell
0105 // from wich the transition electron cames from.
0106 
0107 const G4DataVector* G4RDAugerTransition::AugerTransitionProbabilities(G4int startShellId) const
0108 {
0109   std::map<G4int,G4DataVector,std::less<G4int> >::const_iterator shellId = augerTransitionProbabilitiesMap.find(startShellId);
0110   const G4DataVector* dataSet = &(*shellId).second;
0111   return dataSet; 
0112 }
0113 
0114 G4int G4RDAugerTransition::FinalShellId() const
0115 { 
0116   return finalShellId;
0117 }
0118 
0119 // Returns the id of the shell from wich come the auger electron , given the shell
0120 // from wich the transition electron cames from and the index number.
0121 
0122 G4int G4RDAugerTransition::AugerOriginatingShellId(G4int index, G4int startShellId) const
0123 {
0124   const std::vector<G4int>* ids = AugerOriginatingShellIds(startShellId);
0125   // G4int i = 
0126   std::vector<G4int>::const_iterator pos = ids->begin();
0127   G4int n = 0;
0128   n = *(pos+index);
0129   return n;
0130 }
0131 
0132 // Returns the energy of the auger electron, given the shell
0133 // from wich the transition electron cames from and the index number.
0134 
0135 G4double G4RDAugerTransition::AugerTransitionEnergy(G4int index, G4int startShellId) const
0136 {
0137   const G4DataVector* energies = AugerTransitionEnergies(startShellId);
0138     G4double energy = 0;    
0139   if (index < (G4int) energies->size()) {
0140     G4DataVector::const_iterator pos = energies->begin();
0141     energy = *(pos+index);
0142   }
0143   return energy; 
0144 }
0145 
0146 // Returns the probability of the auger emission, given the shell
0147 // from wich the transition electron cames from and the index number.
0148 
0149 G4double G4RDAugerTransition::AugerTransitionProbability(G4int index, G4int startShellId) const
0150 {
0151 
0152   const G4DataVector *probabilities = AugerTransitionProbabilities(startShellId);
0153   G4DataVector::const_iterator pos = probabilities->begin();
0154 
0155   G4double probability = 0; 
0156   probability = *(pos+index);
0157 
0158   return  probability;
0159   
0160 }
0161 
0162 G4int G4RDAugerTransition::TransitionOriginatingShellId(G4int index) const
0163 {
0164   return  transitionOriginatingShellIds[index];
0165 }
0166 
0167 
0168 
0169 
0170 
0171 
0172 
0173 
0174 
0175 
0176 
0177 
0178 
0179 
0180 
0181 
0182 
0183 
0184 
0185 
0186