Ignore:
Timestamp:
Jun 18, 2010, 11:42:07 AM (14 years ago)
Author:
garnier
Message:

update geant4-09-04-beta-cand-01 interfaces-V09-03-09 vis-V09-03-08

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/materials/src/G4IonisParamElm.cc

    r1196 r1315  
    2525//
    2626//
    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
    3338// 06-09-04, Update calculated values after any change of ionisation
    3439//           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
    4041//
    4142//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
    4243
    4344#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
     50G4IonisParamElm::G4IonisParamElm(G4double AtomNumber)
     51{
     52  G4int Z = G4int(AtomNumber + 0.5);
     53  if (Z < 1) {
    5054    G4Exception (" ERROR! It is not allowed to create an Element with Z < 1" );
    51    
     55  }
     56  G4Pow* g4pow = G4Pow::GetInstance();
     57
    5258  // 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.;
    5763   
    5864  // Parameters for energy loss by ionisation   
    59 
     65  /*
    6066  // Mean excitation energy
    6167  // from "Stopping Powers for Electrons and Positrons"
     
    7379     9.6,  9.7,  9.7,  9.8,  9.8,  9.8,  9.8,  9.9,  9.9,  9.9 };
    7480
    75   G4int iz = (G4int)Z - 1 ;
    76   if(0  > iz) iz = 0;
    77   else if(99 < iz) iz = 99 ;
    7881  fMeanExcitationEnergy = fZ * exc[iz] * eV ;
     82  */
     83
     84  fMeanExcitationEnergy =
     85    G4NistManager::Instance()->GetMeanIonisationEnergy(Z);
    7986
    8087  // compute parameters for ion transport
     
    8592  // Fast ions or hadrons
    8693
    87   if(91 < iz) iz = 91;
     94  G4int iz = Z - 1;
     95  if(91 < iz) { iz = 91; }
    8896
    8997  static G4double vFermi[92] = {
     
    150158G4IonisParamElm::G4IonisParamElm(__void__&)
    151159  : fShellCorrectionVector(0)
    152 {
    153 }
     160{}
    154161
    155162//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
     
    157164G4IonisParamElm::~G4IonisParamElm()
    158165{
    159   if (fShellCorrectionVector) delete [] fShellCorrectionVector;
     166  if (fShellCorrectionVector) { delete [] fShellCorrectionVector; }
    160167}
    161168
     
    184191      fClow                  = right.fClow;
    185192      fMeanExcitationEnergy  = right.fMeanExcitationEnergy;
    186       if (fShellCorrectionVector) delete [] fShellCorrectionVector;           
     193      if (fShellCorrectionVector) { delete [] fShellCorrectionVector; }
    187194      fShellCorrectionVector = new G4double[3];           
    188195      fShellCorrectionVector[0] = right.fShellCorrectionVector[0];
Note: See TracChangeset for help on using the changeset viewer.