Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer << 3 // * DISCLAIMER * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th << 5 // * The following disclaimer summarizes all the specific disclaimers * 6 // * the Geant4 Collaboration. It is provided << 6 // * of contributors to this software. The specific disclaimers,which * 7 // * conditions of the Geant4 Software License << 7 // * govern, are listed with their locations in: * 8 // * LICENSE and available at http://cern.ch/ << 8 // * http://cern.ch/geant4/license * 9 // * include a list of copyright holders. << 10 // * 9 // * * 11 // * Neither the authors of this software syst 10 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 11 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 12 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 13 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file << 14 // * use. * 16 // * for the full disclaimer and the limitatio << 17 // * 15 // * * 18 // * This code implementation is the result << 16 // * This code implementation is the intellectual property of the * 19 // * technical work of the GEANT4 collaboratio << 17 // * GEANT4 collaboration. * 20 // * By using, copying, modifying or distri << 18 // * By copying, distributing or modifying the Program (or any work * 21 // * any work based on the software) you ag << 19 // * based on the Program) you indicate your acceptance of this * 22 // * use in resulting scientific publicati << 20 // * statement, and all its terms. * 23 // * acceptance of all terms of the Geant4 Sof << 24 // ******************************************* 21 // ******************************************************************** 25 << 22 // 26 // 09-07-98, data moved from G4Element. M.Mair << 23 // 27 // 22-11-00, tabulation of ionisation potentia << 24 // $Id: G4IonisParamElm.cc,v 1.8 2002/10/17 09:00:29 vnivanch Exp $ 28 // the ICRU Report N#37. V.Ivanchenk << 25 // GEANT4 tag $Name: geant4-05-02-patch-01 $ 29 // 08-03-01, correct handling of fShellCorrect << 26 // >> 27 // >> 28 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo.... >> 29 // 30 // 17-10-02, Fix excitation energy interpolati 30 // 17-10-02, Fix excitation energy interpolation. V.Ivanchenko 31 // 06-09-04, Update calculated values after an << 31 // 08-03-01, correct handling of fShellCorrectionVector. M.Maire 32 // potential change. V.Ivanchenko << 32 // 22-11-00, tabulation of ionisation potential from 33 // 29-04-10, Using G4Pow and mean ionisation e << 33 // the ICRU Report N#37. V.Ivanchenko 34 // 27.10.11: new scheme for G4Exception (mma) << 34 // 09-07-98, data moved from G4Element. M.Maire >> 35 // >> 36 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo.... 35 37 36 #include "G4IonisParamElm.hh" 38 #include "G4IonisParamElm.hh" 37 39 38 #include "G4NistManager.hh" << 40 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo.... 39 #include "G4PhysicalConstants.hh" << 41 40 #include "G4Pow.hh" << 42 G4IonisParamElm::G4IonisParamElm(G4double Z) 41 #include "G4SystemOfUnits.hh" << 43 { 42 << 44 if (Z < 1.) G4Exception 43 //....oooOO0OOooo........oooOO0OOooo........oo << 45 (" ERROR! It is not allowed to create an Element with Z < 1" ); 44 << 46 45 G4IonisParamElm::G4IonisParamElm(G4double Atom << 47 // some basic functions of the atomic number 46 { << 48 fZ = Z; 47 G4int Z = G4lrint(AtomNumber); << 49 fZ3 = pow(fZ, 1./3.); 48 if (Z < 1) { << 50 fZZ3 = pow(fZ*(fZ+1.), 1./3.); 49 G4Exception("G4IonisParamElm::G4IonisParam << 51 flogZ3 = log(fZ)/3.; 50 "It is not allowed to create an Element << 52 51 } << 53 // Parameters for energy loss by ionisation 52 G4Pow* g4pow = G4Pow::GetInstance(); << 54 53 << 55 // Mean excitation energy 54 // some basic functions of the atomic number << 56 // from "Stopping Powers for Electrons and Positrons" 55 fZ = Z; << 57 // ICRU Report N#37, 1984 (energy in eV) 56 fZ3 = g4pow->Z13(Z); << 58 static double exc[100] = { 57 fZZ3 = fZ3 * g4pow->Z13(Z + 1); << 59 21.8, 20.9, 13.3, 15.9, 15.2, 13.0, 11.7, 11.9, 11.5, 13.7, 58 flogZ3 = g4pow->logZ(Z) / 3.; << 60 13.6, 13.0, 12.8, 12.4, 11.5, 11.3, 10.2, 10.4, 10.0, 9.6, 59 << 61 10.3, 10.6, 10.7, 10.7, 10.9, 11.0, 11.0, 11.1, 11.1, 11.0, 60 fMeanExcitationEnergy = G4NistManager::Insta << 62 10.8, 10.4, 10.5, 10.2, 9.8, 9.8, 9.8, 9.6, 9.7, 9.8, 61 << 63 10.2, 10.1, 10.0, 10.0, 10.0, 10.2, 10.0, 9.8, 10.0, 9.8, 62 // compute parameters for ion transport << 64 9.5, 9.3, 9.3, 8.9, 8.9, 8.8, 8.8, 8.8, 9.1, 9.1, 63 // The aproximation from: << 65 9.2, 9.3, 9.2, 9.2, 9.4, 9.5, 9.7, 9.7, 9.8, 9.8, 64 // J.F.Ziegler, J.P. Biersack, U. Littmark << 66 9.8, 9.8, 9.8, 9.8, 9.8, 9.8, 9.8, 10.1, 10.0, 10.0, 65 // The Stopping and Range of Ions in Matter, << 67 10.0, 10.0, 9.9, 9.9, 9.7, 9.2, 9.5, 9.4, 9.4, 9.4, 66 // Vol.1, Pergamon Press, 1985 << 68 9.6, 9.7, 9.7, 9.8, 9.8, 9.8, 9.8, 9.9, 9.9, 9.9 }; 67 // Fast ions or hadrons << 69 68 << 70 G4int iz = (G4int)Z - 1 ; 69 G4int iz = Z - 1; << 71 if(0 > iz) iz = 0; 70 if (91 < iz) { << 72 else if(99 < iz) iz = 99 ; 71 iz = 91; << 73 fMeanExcitationEnergy = fZ * exc[iz] * eV ; 72 } << 74 73 << 75 74 // clang-format off << 76 fTau0 = 0.1*fZ3*MeV/proton_mass_c2; 75 static const G4double vFermi[92] = { << 77 fTaul = 2.*MeV/proton_mass_c2; 76 1.0309, 0.15976, 0.59782, 1.0781, 1.0486 << 78 77 0.45259, 0.71074, 0.90519, 0.97411, 0.9718 << 79 // compute the Bethe-Bloch formula for energy = fTaul*particle mass 78 0.81707, 0.9943, 1.1423, 1.2381, 1.1222 << 80 G4double rate = fMeanExcitationEnergy/electron_mass_c2 ; 79 0.84912, 0.95, 1.0903, 1.0429, 0.4971 << 81 G4double w = fTaul*(fTaul+2.) ; 80 1.029, 1.2542, 1.122, 1.1241, 1.0882 << 82 fBetheBlochLow = (fTaul+1.)*(fTaul+1.)*log(2.*w/rate)/w - 1. ; 81 0.93155, 1.0047, 0.55379, 0.43289, 0.3263 << 83 fBetheBlochLow = 2.*fZ*twopi_mc2_rcl2*fBetheBlochLow ; 82 0.71418, 0.71453, 0.5911, 0.70263, 0.6804 << 84 83 0.71801, 0.83048, 1.1222, 1.2381, 1.045, << 85 fClow = sqrt(fTaul)*fBetheBlochLow; 84 0.66401, 0.84912, 0.88433, 0.80746, 0.4335 << 86 fAlow = 6.458040 * fClow/fTau0; 85 1.9578, 1.0257} ; << 87 G4double Taum = 0.035*fZ3*MeV/proton_mass_c2; 86 << 88 fBlow =-3.229020*fClow/(fTau0*sqrt(Taum)); 87 static const G4double lFactor[92] = { << 89 88 1.0, 1.0, 1.1, 1.06, 1.01, 1.03, 1.04, << 90 // Shell correction factors 89 0.82, 0.81, 0.83, 0.88, 1.0, 0.95, 0.97, << 91 fShellCorrectionVector = new G4double[3]; 90 0.98, 0.97, 0.96, 0.93, 0.91, 0.9, 0.88, << 92 G4double rate2 = rate*rate; 91 0.9, 0.85, 0.9, 0.9, 0.91, 0.92, 0.9, << 93 92 0.9, 0.88, 0.9, 0.88, 0.88, 0.9, 0.9, << 94 fShellCorrectionVector[0] = ( 1.10289e5 + 5.14781e8*rate)*rate2 ; 93 0.9, 0.9, 0.96, 1.2, 0.9, 0.88, 0.88, << 95 fShellCorrectionVector[1] = ( 7.93805e3 - 2.22565e7*rate)*rate2 ; 94 0.92, 0.95, 0.99, 1.03, 1.05, 1.07, 1.08, << 96 fShellCorrectionVector[2] = (-9.92256e1 + 2.10823e5*rate)*rate2 ; 95 1.08, 1.08, 1.09, 1.09, 1.1, 1.11, 1.12, << 97 } 96 1.17, 1.2, 1.18, 1.17, 1.17, 1.16, 1.16, << 98 97 1.16, 1.16} ; << 99 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo.... 98 // clang-format on << 100 99 << 101 G4IonisParamElm::~G4IonisParamElm() 100 fVFermi = vFermi[iz]; << 102 { 101 fLFactor = lFactor[iz]; << 103 if (fShellCorrectionVector) delete [] fShellCorrectionVector; 102 << 104 } 103 // obsolete parameters for ionisation << 105 104 fTau0 = 0.1 * fZ3 * MeV / proton_mass_c2; << 106 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo.... 105 fTaul = 2. * MeV / proton_mass_c2; << 107 106 << 108 G4IonisParamElm::G4IonisParamElm(G4IonisParamElm& right) 107 // compute the Bethe-Bloch formula for energ << 109 { 108 G4double rate = fMeanExcitationEnergy / elec << 110 *this = right; 109 G4double w = fTaul * (fTaul + 2.); << 111 } 110 fBetheBlochLow = (fTaul + 1.) * (fTaul + 1.) << 112 111 fBetheBlochLow = 2. * fZ * twopi_mc2_rcl2 * << 113 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo.... 112 << 114 113 fClow = std::sqrt(fTaul) * fBetheBlochLow; << 115 const G4IonisParamElm& G4IonisParamElm::operator=(const G4IonisParamElm& right) 114 fAlow = 6.458040 * fClow / fTau0; << 116 { 115 G4double Taum = 0.035 * fZ3 * MeV / proton_m << 117 if (this != &right) 116 fBlow = -3.229020 * fClow / (fTau0 * std::sq << 118 { 117 << 119 fZ = right.fZ; 118 // Shell correction parameterization << 120 fZ3 = right.fZ3; 119 fShellCorrectionVector = new G4double[3]; / << 121 fZZ3 = right.fZZ3; 120 rate = 0.001 * fMeanExcitationEnergy / eV; << 122 flogZ3 = right.flogZ3; 121 G4double rate2 = rate * rate; << 123 fTau0 = right.fTau0; 122 fShellCorrectionVector[0] = (0.422377 + 3.85 << 124 fTaul = right.fTaul; 123 fShellCorrectionVector[1] = (0.0304043 - 0.1 << 125 fBetheBlochLow = right.fBetheBlochLow; 124 fShellCorrectionVector[2] = (-0.00038106 + 0 << 126 fAlow = right.fAlow; >> 127 fBlow = right.fBlow; >> 128 fClow = right.fClow; >> 129 fMeanExcitationEnergy = right.fMeanExcitationEnergy; >> 130 if (fShellCorrectionVector) delete [] fShellCorrectionVector; >> 131 fShellCorrectionVector = new G4double[3]; >> 132 fShellCorrectionVector[0] = right.fShellCorrectionVector[0]; >> 133 fShellCorrectionVector[1] = right.fShellCorrectionVector[1]; >> 134 fShellCorrectionVector[2] = right.fShellCorrectionVector[2]; >> 135 } >> 136 return *this; >> 137 } >> 138 >> 139 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo.... >> 140 >> 141 G4int G4IonisParamElm::operator==(const G4IonisParamElm& right) const >> 142 { >> 143 return (this == (G4IonisParamElm *) &right); 125 } 144 } 126 145 127 //....oooOO0OOooo........oooOO0OOooo........oo 146 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo.... 128 147 129 G4IonisParamElm::~G4IonisParamElm() { delete[] << 148 G4int G4IonisParamElm::operator!=(const G4IonisParamElm& right) const >> 149 { >> 150 return (this != (G4IonisParamElm *) &right); >> 151 } >> 152 >> 153 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo.... 130 154