- Timestamp:
- Apr 17, 2009, 12:17:14 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopePhotoElectric.cc
r961 r991 25 25 // 26 26 // 27 // $Id: G4PenelopePhotoElectric.cc,v 1.1 3 2009/01/08 09:42:54 pandolaExp $28 // GEANT4 tag $Name: geant4-09-02 -ref-02$27 // $Id: G4PenelopePhotoElectric.cc,v 1.12 2006/06/29 19:40:51 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-02 $ 29 29 // 30 30 // Author: L. Pandola … … 37 37 // 31 May 2005 L. Pandola Added Sauter formula for the sampling of 38 38 // the electron direction 39 // 08 Jan 2009 L. Pandola Check shell index to avoid mismatch between40 // the Penelope cross section database and the41 // G4AtomicTransitionManager database. It suppresses42 // a warning from G4AtomicTransitionManager only.43 // Results are unchanged.44 39 // -------------------------------------------------------------- 45 40 … … 151 146 // Retrieve the corresponding identifier and binding energy of the selected shell 152 147 const G4AtomicTransitionManager* transitionManager = G4AtomicTransitionManager::Instance(); 153 154 //The number of shell cross section possibly reported in the Penelope database155 //might be different from the number of shells in the G4AtomicTransitionManager156 //(namely, Penelope may contain more shell, especially for very light elements).157 //In order to avoid a warning message from the G4AtomicTransitionManager, I158 //add this protection. Results are anyway changed, because when G4AtomicTransitionManager159 //has a shellID>maxID, it sets the shellID to the last valid shell.160 size_t numberOfShells = (size_t) transitionManager->NumberOfShells(Z);161 if (shellIndex >= numberOfShells)162 shellIndex = numberOfShells-1;163 164 148 const G4AtomicShell* shell = transitionManager->Shell(Z,shellIndex); 165 149 G4double bindingEnergy = shell->BindingEnergy();
Note: See TracChangeset
for help on using the changeset viewer.