Changeset 1315 for trunk/source/materials/src/G4IonisParamElm.cc
- Timestamp:
- Jun 18, 2010, 11:42:07 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/materials/src/G4IonisParamElm.cc
r1196 r1315 25 25 // 26 26 // 27 // $Id: G4IonisParamElm.cc,v 1.15 2008/06/03 14:30:10 vnivanch Exp $ 28 // GEANT4 tag $Name: materials-V09-02-18 $ 29 // 30 // 31 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo.... 32 // 27 // $Id: G4IonisParamElm.cc,v 1.16 2010/04/29 11:11:56 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 // 30 // 31 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo.... 32 // 33 // 09-07-98, data moved from G4Element. M.Maire 34 // 22-11-00, tabulation of ionisation potential from 35 // the ICRU Report N#37. V.Ivanchenko 36 // 08-03-01, correct handling of fShellCorrectionVector. M.Maire 37 // 17-10-02, Fix excitation energy interpolation. V.Ivanchenko 33 38 // 06-09-04, Update calculated values after any change of ionisation 34 39 // potential change. V.Ivanchenko 35 // 17-10-02, Fix excitation energy interpolation. V.Ivanchenko 36 // 08-03-01, correct handling of fShellCorrectionVector. M.Maire 37 // 22-11-00, tabulation of ionisation potential from 38 // the ICRU Report N#37. V.Ivanchenko 39 // 09-07-98, data moved from G4Element. M.Maire 40 // 29-04-10, Using G4Pow and mean ionisation energy from NIST V.Ivanchenko 40 41 // 41 42 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo.... 42 43 43 44 #include "G4IonisParamElm.hh" 44 45 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo.... 46 47 G4IonisParamElm::G4IonisParamElm(G4double Z) 48 { 49 if (Z < 1.) 45 #include "G4NistManager.hh" 46 #include "G4Pow.hh" 47 48 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo.... 49 50 G4IonisParamElm::G4IonisParamElm(G4double AtomNumber) 51 { 52 G4int Z = G4int(AtomNumber + 0.5); 53 if (Z < 1) { 50 54 G4Exception (" ERROR! It is not allowed to create an Element with Z < 1" ); 51 55 } 56 G4Pow* g4pow = G4Pow::GetInstance(); 57 52 58 // some basic functions of the atomic number 53 fZ = Z;54 fZ3 = std::pow(fZ, 1./3.);55 fZZ3 = std::pow(fZ*(fZ+1.), 1./3.);56 flogZ3 = std::log(fZ)/3.;59 fZ = Z; 60 fZ3 = g4pow->Z13(Z); 61 fZZ3 = fZ3*g4pow->Z13(Z+1); 62 flogZ3 = g4pow->logZ(Z)/3.; 57 63 58 64 // Parameters for energy loss by ionisation 59 65 /* 60 66 // Mean excitation energy 61 67 // from "Stopping Powers for Electrons and Positrons" … … 73 79 9.6, 9.7, 9.7, 9.8, 9.8, 9.8, 9.8, 9.9, 9.9, 9.9 }; 74 80 75 G4int iz = (G4int)Z - 1 ;76 if(0 > iz) iz = 0;77 else if(99 < iz) iz = 99 ;78 81 fMeanExcitationEnergy = fZ * exc[iz] * eV ; 82 */ 83 84 fMeanExcitationEnergy = 85 G4NistManager::Instance()->GetMeanIonisationEnergy(Z); 79 86 80 87 // compute parameters for ion transport … … 85 92 // Fast ions or hadrons 86 93 87 if(91 < iz) iz = 91; 94 G4int iz = Z - 1; 95 if(91 < iz) { iz = 91; } 88 96 89 97 static G4double vFermi[92] = { … … 150 158 G4IonisParamElm::G4IonisParamElm(__void__&) 151 159 : fShellCorrectionVector(0) 152 { 153 } 160 {} 154 161 155 162 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo.... … … 157 164 G4IonisParamElm::~G4IonisParamElm() 158 165 { 159 if (fShellCorrectionVector) delete [] fShellCorrectionVector;166 if (fShellCorrectionVector) { delete [] fShellCorrectionVector; } 160 167 } 161 168 … … 184 191 fClow = right.fClow; 185 192 fMeanExcitationEnergy = right.fMeanExcitationEnergy; 186 if (fShellCorrectionVector) delete [] fShellCorrectionVector;193 if (fShellCorrectionVector) { delete [] fShellCorrectionVector; } 187 194 fShellCorrectionVector = new G4double[3]; 188 195 fShellCorrectionVector[0] = right.fShellCorrectionVector[0];
Note: See TracChangeset
for help on using the changeset viewer.