- Timestamp:
- Dec 22, 2010, 3:52:27 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopeComptonModel.cc
r1337 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PenelopeComptonModel.cc,v 1. 9 2010/03/26 09:32:50pandola Exp $27 // GEANT4 tag $Name: geant4-09-04- beta-01$26 // $Id: G4PenelopeComptonModel.cc,v 1.11 2010/12/01 15:20:26 pandola Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 28 // 29 29 // Author: Luciano Pandola … … 108 108 { 109 109 std::map <G4int,G4DataVector*>::iterator i; 110 for (i=ionizationEnergy->begin();i != ionizationEnergy->end();i++)111 if (i->second) delete i->second;112 for (i=hartreeFunction->begin();i != hartreeFunction->end();i++)113 if (i->second) delete i->second;114 for (i=occupationNumber->begin();i != occupationNumber->end();i++)115 if (i->second) delete i->second;116 117 118 110 if (ionizationEnergy) 119 delete ionizationEnergy; 111 { 112 for (i=ionizationEnergy->begin();i != ionizationEnergy->end();i++) 113 if (i->second) delete i->second; 114 delete ionizationEnergy; 115 } 120 116 if (hartreeFunction) 121 delete hartreeFunction; 117 { 118 for (i=hartreeFunction->begin();i != hartreeFunction->end();i++) 119 if (i->second) delete i->second; 120 delete hartreeFunction; 121 } 122 122 if (occupationNumber) 123 delete occupationNumber; 123 { 124 for (i=occupationNumber->begin();i != occupationNumber->end();i++) 125 if (i->second) delete i->second; 126 delete occupationNumber; 127 } 124 128 } 125 129 … … 265 269 266 270 const G4int nmax = 64; 267 G4double rn[nmax],pac[nmax]; 271 G4double rn[nmax]={0.0}; 272 G4double pac[nmax]={0.0}; 268 273 269 274 G4double ki,ki1,ki2,ki3,taumin,a1,a2; … … 629 634 G4String excep = "G4PenelopeComptonModel - G4LEDATA environment variable not set!"; 630 635 G4Exception(excep); 636 return; 631 637 } 632 638 G4String pathString(path); … … 648 654 G4String excep = "G4PenelopeComptonModel: problem with reading data from file"; 649 655 G4Exception(excep); 656 return; 650 657 } 651 658 652 659 do{ 653 660 G4double harOfElectronsBelowThreshold = 0; 654 G4int nbOfElectronsBelowThreshold = 0; 661 G4int nbOfElectronsBelowThreshold = 0; 662 file >> Z >> nLevels; 663 //Check for nLevels validity, before using it in a loop 664 if (nLevels<0 || nLevels>64) 665 { 666 G4String excep = "G4PenelopeComptonModel: corrupted data file?"; 667 G4Exception(excep); 668 return; 669 } 655 670 G4DataVector* occVector = new G4DataVector; 656 671 G4DataVector* harVector = new G4DataVector; 657 672 G4DataVector* bindingEVector = new G4DataVector; 658 file >> Z >> nLevels;659 673 for (G4int h=0;h<nLevels;h++) 660 674 {
Note: See TracChangeset
for help on using the changeset viewer.