Changeset 850 for trunk/source/materials
- Timestamp:
- Sep 10, 2008, 5:40:37 PM (17 years ago)
- Location:
- trunk/source/materials
- Files:
-
- 38 edited
-
History (modified) (2 diffs)
-
include/G4AtomicShells.hh (modified) (1 diff)
-
include/G4Element.hh (modified) (1 diff)
-
include/G4ElementTable.hh (modified) (1 diff)
-
include/G4ElementVector.hh (modified) (1 diff)
-
include/G4IonisParamElm.hh (modified) (3 diffs)
-
include/G4IonisParamMat.hh (modified) (4 diffs)
-
include/G4Isotope.hh (modified) (2 diffs)
-
include/G4IsotopeVector.hh (modified) (1 diff)
-
include/G4MPVEntry.hh (modified) (5 diffs)
-
include/G4Material.hh (modified) (2 diffs)
-
include/G4MaterialPropertiesTable.hh (modified) (3 diffs)
-
include/G4MaterialPropertyVector.hh (modified) (8 diffs)
-
include/G4MaterialTable.hh (modified) (1 diff)
-
include/G4NistElementBuilder.hh (modified) (11 diffs)
-
include/G4NistManager.hh (modified) (22 diffs)
-
include/G4NistMaterialBuilder.hh (modified) (3 diffs)
-
include/G4NistMessenger.hh (modified) (1 diff)
-
include/G4OpticalSurface.hh (modified) (3 diffs)
-
include/G4SandiaTable.hh (modified) (1 diff)
-
include/G4StaticSandiaData.hh (modified) (1 diff)
-
include/G4SurfaceProperty.hh (modified) (4 diffs)
-
src/G4AtomicShells.cc (modified) (1 diff)
-
src/G4Element.cc (modified) (8 diffs)
-
src/G4IonisParamElm.cc (modified) (4 diffs)
-
src/G4IonisParamMat.cc (modified) (12 diffs)
-
src/G4Isotope.cc (modified) (2 diffs)
-
src/G4MPVEntry.cc (modified) (7 diffs)
-
src/G4Material.cc (modified) (11 diffs)
-
src/G4MaterialPropertiesTable.cc (modified) (10 diffs)
-
src/G4MaterialPropertyVector.cc (modified) (20 diffs)
-
src/G4NistElementBuilder.cc (modified) (9 diffs)
-
src/G4NistManager.cc (modified) (5 diffs)
-
src/G4NistMaterialBuilder.cc (modified) (4 diffs)
-
src/G4NistMessenger.cc (modified) (1 diff)
-
src/G4OpticalSurface.cc (modified) (2 diffs)
-
src/G4SandiaTable.cc (modified) (1 diff)
-
src/G4SurfaceProperty.cc (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/materials/History
r822 r850 1 $Id: History,v 1.1 03.2.3 2008/04/28 08:39:02 gcosmoExp $1 $Id: History,v 1.127 2008/08/13 16:06:42 vnivanch Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 18 18 ---------------------------------------------------------- 19 19 20 06-03-07 V.Ivanchenko (materials-V09-00-09) 20 13-08-08 V.Ivanchenko (materials-V09-01-15) 21 G4Material - use array size defined in material constructor, extend it if 22 a component is a compound material 23 24 07-08-08 V.Ivanchenko (materials-V09-01-14) 25 - G4NistElementBuilder - use best known parameterisation for total 26 binding energy of atoms, use standard masses 27 for lightest stable isotopes 28 -G4NistManager and G4NistElementBuilder - added method 29 GetTotalElectronBindingEnergy 30 -G4Isotope - use AtomicMass instead of NuclearMass 31 -G4Element - use G4int(fZeff) everywhere in the class 32 33 23-07-08 V.Ivanchenko (materials-V09-01-13) 34 - G4NistManager - bug introduced in tag (-11) is fixed 35 36 21-07-08 P.Gumplinger (materials-V09-01-12) 37 - G4SurfaceProperty and G4OpticalSurface, make them truly Polymorphic 38 39 17-07-08 V.Ivanchenko (materials-V09-01-11) 40 - G4NistManager - added inline methods to speed up EM computations 41 42 16-07-08 P.Gumplinger (materials-V09-01-10) 43 - G4SurfaceProperty changed method name from DumpInfo to DumpTableInfo. 44 45 08-07-08 V.Ivanchenko (materials-V09-01-09) 46 - G4IonisParamMat - added fMeanEnergyPerIon and Set/Get methods 47 48 27-06-08 G.Cosmo (materials-V09-01-08) 49 - Added virtual destructor to G4OpticalSurface and derivated. 50 Addresses problem report #1014. 51 52 05-06-08 P.Gumplinger (materials-V09-01-07) 53 - G4MPVEntry, G4MaterialPropertyVector, G4MaterialPropertiesTable - 54 trivial name changes: momentum->energy, momenta->energies 55 56 04-06-08 V.Ivanchenko (materials-V09-01-06) 57 - G4NistElementBuilder - provided unique name for each isotope of an element 58 (P.Gumplinger) 59 - G4IonisParamElm - added Fermi velocity and L-factor (both used for 60 parameterizations of the effective charge and 61 stragling of ions); 62 - G4IonisParamMat - use Fermi velocity and L-factor from G4IonisParamElm 63 64 02-06-08 V.Ivanchenko (materials-V09-01-05) 65 - G4Element - extended printput of errors and warnings; more safe check 66 of consistence between Z and A in the constructor 67 68 28-04-08 V.Ivanchenko (materials-V09-01-04) 69 - G4NistManager, G4NistMaterialBuilder, G4NistElementBuilder 70 added better comments 71 72 17-03-08 mma (materials-V09-01-03) 73 - G4Material : cout << NuclearInteractionLength 74 75 11-03-08 mma (materials-V09-01-02) 76 - G4IonisParamMat - remove NistManager dependence 77 78 10-03-08 mma (materials-V09-01-01) 79 - G4IonisParamMat - add Birks constant 80 81 06-03-08 V.Ivanchenko (materials-V09-01-00) 21 82 - G4NistMaterialBuilder - use correct dimension for the density for 22 83 ConstructNewMaterial methods -
trunk/source/materials/include/G4AtomicShells.hh
r822 r850 26 26 // 27 27 // $Id: G4AtomicShells.hh,v 1.7 2006/10/17 15:15:46 vnivanch Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: HEAD $ 29 29 30 30 // class description -
trunk/source/materials/include/G4Element.hh
r822 r850 26 26 // 27 27 // $Id: G4Element.hh,v 1.22 2006/10/17 15:15:46 vnivanch Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: HEAD $ 29 29 // 30 30 -
trunk/source/materials/include/G4ElementTable.hh
r822 r850 26 26 // 27 27 // $Id: G4ElementTable.hh,v 1.6 2006/06/29 19:10:58 gunter Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: HEAD $ 29 29 // 30 30 // -
trunk/source/materials/include/G4ElementVector.hh
r822 r850 26 26 // 27 27 // $Id: G4ElementVector.hh,v 1.6 2006/06/29 19:11:00 gunter Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: HEAD $ 29 29 // 30 30 // -
trunk/source/materials/include/G4IonisParamElm.hh
r822 r850 25 25 // 26 26 // 27 // $Id: G4IonisParamElm.hh,v 1. 9 2006/06/29 19:11:02 gunterExp $28 // GEANT4 tag $Name: $27 // $Id: G4IonisParamElm.hh,v 1.10 2008/06/03 14:30:10 vnivanch Exp $ 28 // GEANT4 tag $Name: HEAD $ 29 29 // 30 30 … … 75 75 76 76 G4double GetMeanExcitationEnergy() const {return fMeanExcitationEnergy;} 77 // 16*std::pow(Z,0.9)*eV 77 // ICRU'37 report 78 79 G4double GetFermiVelocity() const {return fVFermi;}; 80 G4double GetLFactor() const {return fLFactor;}; 78 81 79 82 G4double* GetShellCorrectionVector() const {return fShellCorrectionVector;} … … 110 113 G4double fMeanExcitationEnergy; // 111 114 G4double* fShellCorrectionVector; // shell correction coefficients 115 116 // parameters for ion corrections computations 117 G4double fVFermi; 118 G4double fLFactor; 112 119 }; 113 120 -
trunk/source/materials/include/G4IonisParamMat.hh
r822 r850 25 25 // 26 26 // 27 // $Id: G4IonisParamMat.hh,v 1.1 0 2007/09/27 14:05:47vnivanch Exp $28 // GEANT4 tag $Name: geant4-09-01-patch-02$27 // $Id: G4IonisParamMat.hh,v 1.12 2008/07/08 10:34:56 vnivanch Exp $ 28 // GEANT4 tag $Name: HEAD $ 29 29 // 30 30 … … 41 41 // 28-10-02: add setMeanExcitationEnergy (V.Ivanchenko) 42 42 // 27-09-07: add computation of parameters for ions (V.Ivanchenko) 43 // 04-03-08: add fBirks constant (mma) 43 44 44 45 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo.... … … 94 95 G4double GetFermiEnergy() const {return fFermiEnergy;}; 95 96 G4double GetLFactor() const {return fLfactor;}; 97 98 // parameters for Birks attenuation: 99 void SetBirksConstant(G4double value) {fBirks = value;}; 100 G4double GetBirksConstant() const {return fBirks;}; 96 101 102 // parameters for average energy per ion 103 void SetMeanEnergyPerIonPair(G4double value) {fMeanEnergyPerIon = value;}; 104 G4double GetMeanEnergyPerIonPair() const {return fMeanEnergyPerIon;}; 105 97 106 public: // without description 98 107 … … 155 164 G4double fFermiEnergy; 156 165 G4double fLfactor; 166 167 // parameter for Birks attenuation 168 G4double fBirks; 169 // average energy per ion pair 170 G4double fMeanEnergyPerIon; 157 171 }; 158 172 -
trunk/source/materials/include/G4Isotope.hh
r822 r850 25 25 // 26 26 // 27 // $Id: G4Isotope.hh,v 1. 19 2006/06/29 19:11:07 gunterExp $28 // GEANT4 tag $Name: $27 // $Id: G4Isotope.hh,v 1.20 2008/08/11 11:53:11 vnivanch Exp $ 28 // GEANT4 tag $Name: HEAD $ 29 29 // 30 30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 36 36 // N: number of nucleons, 37 37 // A: mass of a mole (optional). 38 // If A is not defined it is taken from Geant4 database 38 39 // 39 40 // The class contains as a private static member the table of defined -
trunk/source/materials/include/G4IsotopeVector.hh
r822 r850 26 26 // 27 27 // $Id: G4IsotopeVector.hh,v 1.6 2006/06/29 19:11:09 gunter Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: HEAD $ 29 29 // 30 30 // -
trunk/source/materials/include/G4MPVEntry.hh
r822 r850 25 25 // 26 26 // 27 // $Id: G4MPVEntry.hh,v 1. 6 2006/06/29 19:11:11 gunterExp $28 // GEANT4 tag $Name: $27 // $Id: G4MPVEntry.hh,v 1.7 2008/06/05 23:36:56 gum Exp $ 28 // GEANT4 tag $Name: HEAD $ 29 29 // 30 30 // … … 84 84 /////////////////////////////// 85 85 86 G4MPVEntry(G4double aPhoton Momentum, G4double aPropertyValue);86 G4MPVEntry(G4double aPhotonEnergy, G4double aPropertyValue); 87 87 88 88 G4MPVEntry(const G4MPVEntry &right); … … 94 94 //////////// 95 95 96 G4double GetPhoton Momentum();96 G4double GetPhotonEnergy(); 97 97 98 98 G4double GetProperty(); … … 110 110 ///////////////////////// 111 111 112 G4double thePhoton Momentum;112 G4double thePhotonEnergy; 113 113 G4double theProperty; 114 114 }; … … 118 118 //////////////////// 119 119 120 // GetPhoton Momentum121 // --------------- --120 // GetPhotonEnergy 121 // --------------- 122 122 // 123 123 124 124 inline 125 G4double G4MPVEntry::GetPhoton Momentum()125 G4double G4MPVEntry::GetPhotonEnergy() 126 126 { 127 return thePhoton Momentum;127 return thePhotonEnergy; 128 128 } 129 129 -
trunk/source/materials/include/G4Material.hh
r822 r850 25 25 // 26 26 // 27 // $Id: G4Material.hh,v 1.2 5 2006/06/29 19:11:13 gunterExp $28 // GEANT4 tag $Name: $27 // $Id: G4Material.hh,v 1.26 2008/08/13 16:06:42 vnivanch Exp $ 28 // GEANT4 tag $Name: HEAD $ 29 29 // 30 30 … … 273 273 274 274 G4int maxNbComponents; // totalNbOfComponentsInTheMaterial 275 G4int fArrayLength; // the length of FAtomVector 275 276 size_t fNumberOfComponents; // Nb of components declared so far 276 277 -
trunk/source/materials/include/G4MaterialPropertiesTable.hh
r822 r850 25 25 // 26 26 // 27 // $Id: G4MaterialPropertiesTable.hh,v 1.1 8 2006/06/29 19:11:15 gunterExp $28 // GEANT4 tag $Name: $27 // $Id: G4MaterialPropertiesTable.hh,v 1.19 2008/06/05 23:38:03 gum Exp $ 28 // GEANT4 tag $Name: HEAD $ 29 29 // 30 30 // … … 101 101 102 102 void AddProperty(const char *key, 103 G4double *Photon Momenta,103 G4double *PhotonEnergies, 104 104 G4double *PropertyValues, 105 105 G4int NumEntries); … … 126 126 // Get the property from the table corresponding to the key-name. 127 127 128 void AddEntry(const char *key, G4double aPhoton Momentum,128 void AddEntry(const char *key, G4double aPhotonEnergy, 129 129 G4double aPropertyValue); 130 130 // Add a new entry (pair of numbers) to the table for a given key. 131 131 132 void RemoveEntry(const char *key, G4double aPhoton Momentum);132 void RemoveEntry(const char *key, G4double aPhotonEnergy); 133 133 // Remove an entry from the table for a given key and x-value. 134 134 -
trunk/source/materials/include/G4MaterialPropertyVector.hh
r822 r850 25 25 // 26 26 // 27 // $Id: G4MaterialPropertyVector.hh,v 1.1 0 2006/06/29 19:11:17 gunterExp $28 // GEANT4 tag $Name: $27 // $Id: G4MaterialPropertyVector.hh,v 1.11 2008/06/05 23:37:37 gum Exp $ 28 // GEANT4 tag $Name: HEAD $ 29 29 // 30 30 // … … 35 35 // File: G4MaterialPropertyVector.hh 36 36 // 37 // Description: A one-to-one mapping from Photon Momentumto some37 // Description: A one-to-one mapping from Photon Energy to some 38 38 // optical property 39 39 // Version: 1.0 … … 59 59 60 60 // Class Description: 61 // A one-to-one mapping from Photon Momentumto some optical property.61 // A one-to-one mapping from Photon Energy to some optical property. 62 62 // Class Description - End: 63 63 … … 96 96 public: // With description 97 97 98 G4MaterialPropertyVector(G4double *Photon Momenta,98 G4MaterialPropertyVector(G4double *PhotonEnergies, 99 99 G4double *PropertyValues, 100 100 G4int NumElements); … … 119 119 void ResetIterator(); 120 120 121 void AddElement(G4double aPhoton Momentum,121 void AddElement(G4double aPhotonEnergy, 122 122 G4double aPropertyValue); 123 123 // Add a new element (pair of numbers) to the G4MaterialPropertyVector. 124 void RemoveElement(G4double aPhoton Momentum);124 void RemoveElement(G4double aPhotonEnergy); 125 125 // Remove the element with given x-value. 126 126 127 G4double GetProperty(G4double aPhoton Momentum) const;127 G4double GetProperty(G4double aPhotonEnergy) const; 128 128 // Returns the y-value for given x-value (with interpolation). 129 G4double GetPhoton Momentum(G4double aProperty) const;129 G4double GetPhotonEnergy(G4double aProperty) const; 130 130 // Returns the x-value for given y-value (with interpolation). 131 131 // NOTE: Assumes that the y-value is an increasing function of … … 135 135 // x-value in the vector that corresponds to that value. 136 136 // For use with G4MaterialPropertyVector iterator: return 137 // property (or Photon momentum) at current point of iterator.137 // property (or Photon Energy) at current point of iterator. 138 138 139 139 G4double GetProperty() const; 140 G4double GetPhoton Momentum() const;140 G4double GetPhotonEnergy() const; 141 141 142 142 G4double GetMaxProperty() const; 143 143 G4double GetMinProperty() const; 144 G4double GetMaxPhoton Momentum() const;145 G4double GetMinPhoton Momentum() const;144 G4double GetMaxPhotonEnergy() const; 145 G4double GetMinPhotonEnergy() const; 146 146 147 147 ////////// … … 159 159 G4MPVEntry GetEntry(G4int i) const; 160 160 161 void GetAdjacentBins(G4double aPhoton Momentum,161 void GetAdjacentBins(G4double aPhotonEnergy, 162 162 G4int *left,G4int *right) const; 163 163 … … 188 188 189 189 inline 190 G4double G4MaterialPropertyVector::GetMaxPhoton Momentum() const191 { 192 return MPV.back()->GetPhoton Momentum();190 G4double G4MaterialPropertyVector::GetMaxPhotonEnergy() const 191 { 192 return MPV.back()->GetPhotonEnergy(); 193 193 } 194 194 195 195 inline 196 G4double G4MaterialPropertyVector::GetMinPhoton Momentum() const197 { 198 return MPV.front()->GetPhoton Momentum();196 G4double G4MaterialPropertyVector::GetMinPhotonEnergy() const 197 { 198 return MPV.front()->GetPhotonEnergy(); 199 199 } 200 200 -
trunk/source/materials/include/G4MaterialTable.hh
r822 r850 26 26 // 27 27 // $Id: G4MaterialTable.hh,v 1.6 2006/06/29 19:11:19 gunter Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: HEAD $ 29 29 // 30 30 // -
trunk/source/materials/include/G4NistElementBuilder.hh
r822 r850 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4NistElementBuilder.hh,v 1.1 3 2007/07/26 18:52:12vnivanch Exp $27 // GEANT4 tag $Name: $26 // $Id: G4NistElementBuilder.hh,v 1.18 2008/08/07 10:15:16 vnivanch Exp $ 27 // GEANT4 tag $Name: HEAD $ 28 28 29 29 #ifndef G4NistElementBuilder_h … … 41 41 // Modifications: 42 42 // 27.02.06 V.Ivanchenko Return m=0 if Z&N combination is out of NIST 43 // 27.02.06 V.Ivanchneko add GetAtomicMassAmu 44 // 17.10.06 V.Ivanchneko add GetAtomicMass and GetNistElementNames methods 45 // 02.05.07 V.Ivanchneko add GetNistFirstIsotopeN and GetNumberOfNistIsotopes 43 // 27.02.06 V.Ivanchenko add GetAtomicMassAmu 44 // 17.10.06 V.Ivanchenko add GetAtomicMass and GetNistElementNames methods 45 // 02.05.07 V.Ivanchenko add GetNistFirstIsotopeN and GetNumberOfNistIsotopes 46 // 06.08.08 V.Ivanchenko add binding energy parameterisation and use isotope 47 // mass in G4 units 46 48 // 47 49 //---------------------------------------------------------------------------- … … 55 57 56 58 #include "globals.hh" 57 #include "G4AtomicShells.hh"58 59 #include <vector> 59 60 … … 68 69 { 69 70 public: 71 70 72 G4NistElementBuilder(G4int vb); 71 73 ~G4NistElementBuilder(); 72 74 73 G4int GetZ (const G4String& symb); 74 G4double GetA (G4int Z); 75 G4double GetIsotopeMass (G4int Z, G4int N); 76 G4double GetAtomicMass (G4int Z, G4int N); 77 78 G4double GetIsotopeAbundance (G4int Z, G4int N); 79 80 G4int GetNistFirstIsotopeN(G4int Z); 81 G4int GetNumberOfNistIsotopes(G4int Z); 82 83 G4int GetMaxNumElements(); 84 85 void SetVerbose (G4int); 86 void PrintElement (G4int Z); 75 // Get atomic number by element symbol 76 G4int GetZ(const G4String& symb); 87 77 88 78 // Find or build a G4Element by atomic number … … 92 82 G4Element* FindOrBuildElement (const G4String& symb, 93 83 G4bool buildIsotopes = true); 94 95 // Return reference to vector of element names 84 // print element information 85 void PrintElement (G4int Z); 86 87 // Access to the vector of Geant4 predefined element names 96 88 const std::vector<G4String>& GetElementNames() const; 97 89 90 // Get the mass of the element in amu for the natuaral isotope composition 91 // with electron shell 92 inline G4double GetA (G4int Z); 93 94 // Get the mass of the isotope in G4 units (without electron shell) 95 inline G4double GetIsotopeMass (G4int Z, G4int N); 96 97 // Get the atomic mass of the isotope in G4 units (with electron shell) 98 inline G4double GetAtomicMass (G4int Z, G4int N); 99 100 // Get total ionisation energy of an atom 101 inline G4double GetTotalElectronBindingEnergy(G4int Z) const; 102 103 // Get natural isotope abandance 104 inline G4double GetIsotopeAbundance (G4int Z, G4int N); 105 106 // Get N for the first natural isotope 107 inline G4int GetNistFirstIsotopeN(G4int Z); 108 109 // Get number of natural isotopes 110 inline G4int GetNumberOfNistIsotopes(G4int Z); 111 112 inline G4int GetMaxNumElements(); 113 114 inline void SetVerbose (G4int); 115 98 116 private: 99 117 100 118 void Initialise(); 101 119 102 void AddElement(const G4String& symbol, G4int Z, G4int nc, const G4int& N, 103 const G4double& A, const G4double& sA, const G4double& W); 104 105 // Build a G4Element from dataBase 120 // Add element parameters to internal G4 database: 121 // Z - atomic number, N - number of nucleons, A - atomic mass (amu), 122 // sigmaA - accuracy of mass in last digits, W - natural abandances (percent) 123 void AddElement(const G4String& symbol, G4int Z, G4int NumberOfIsotopes, 124 const G4int& N, const G4double& A, const G4double& sigmaA, 125 const G4double& W); 126 127 // Build a G4Element from the G4 dataBase 106 128 G4Element* BuildElement(G4int Z, G4bool buildIsotopes); 107 129 … … 109 131 110 132 G4String elmSymbol [maxNumElements]; 111 G4double atomicMass [maxNumElements]; 133 G4double atomicMass [maxNumElements]; // amu 134 G4double bindingEnergy [maxNumElements]; 112 135 G4int nIsotopes [maxNumElements]; 113 136 G4int nFirstIsotope [maxNumElements]; … … 116 139 G4int elmIndex [maxNumElements]; 117 140 118 G4double massIsotopes [maxAbundance]; 119 G4double sigMass [maxAbundance]; 141 G4double massIsotopes [maxAbundance]; // G4 units 142 G4double sigMass [maxAbundance]; // G4 units 120 143 G4double relAbundance [maxAbundance]; 121 144 … … 126 149 127 150 std::vector<G4String> elmNames; 128 G4AtomicShells aShell;129 151 }; 130 152 131 153 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 132 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......133 134 inline G4int G4NistElementBuilder::GetZ(const G4String& name)135 {136 G4int Z = maxNumElements;137 do {Z--;} while( Z>0 && elmSymbol[Z] != name);138 return Z;139 }140 141 154 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 142 155 … … 154 167 G4double m = 0.0; 155 168 G4int i = N - nFirstIsotope[Z]; 156 if(i >= 0 && i <nIsotopes[Z]) 157 m = massIsotopes[i + idxIsotopes[Z]]*amu_c2 158 - Z*electron_mass_c2 + aShell.GetTotalBindingEnergy(Z); 169 if(i >= 0 && i <nIsotopes[Z]) {m = massIsotopes[i + idxIsotopes[Z]];} 159 170 return m; 160 171 } … … 166 177 G4double m = 0.0; 167 178 G4int i = N - nFirstIsotope[Z]; 168 if(i >= 0 && i <nIsotopes[Z]) 169 m = massIsotopes[i + idxIsotopes[Z]]*amu_c2; 179 if(i >= 0 && i <nIsotopes[Z]) { 180 m = massIsotopes[i + idxIsotopes[Z]] + Z*electron_mass_c2 - bindingEnergy[Z]; 181 } 170 182 return m; 171 183 } 184 185 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 186 187 inline 188 G4double G4NistElementBuilder::GetTotalElectronBindingEnergy(G4int Z) const 189 { 190 return bindingEnergy[Z]; 191 } 192 172 193 173 194 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 177 198 G4double x = 0.0; 178 199 G4int i = N - nFirstIsotope[Z]; 179 if(i >= 0 && i <nIsotopes[Z]) x = relAbundance[i + idxIsotopes[Z]];200 if(i >= 0 && i <nIsotopes[Z]) {x = relAbundance[i + idxIsotopes[Z]];} 180 201 return x; 181 202 } -
trunk/source/materials/include/G4NistManager.hh
r822 r850 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4NistManager.hh,v 1. 17 2007/12/11 13:32:08 gcosmoExp $27 // GEANT4 tag $Name: geant4-09-01-patch-02$26 // $Id: G4NistManager.hh,v 1.23 2008/08/07 10:15:16 vnivanch Exp $ 27 // GEANT4 tag $Name: HEAD $ 28 28 // 29 29 // … … 84 84 ~G4NistManager(); 85 85 86 // Elements86 // Get G4Element by index 87 87 // 88 88 inline G4Element* GetElement(size_t index); 89 89 90 90 // Find or build G4Element by atomic number 91 // 91 92 inline G4Element* FindOrBuildElement(G4int Z, G4bool isotopes=true); 92 93 93 94 // Find or build G4Element by symbol 95 // 94 96 inline G4Element* FindOrBuildElement(const G4String& symb, 95 97 G4bool isotopes=true); 96 98 97 inline size_t GetNumberOfElements() const; 98 inline G4int GetZ(const G4String& symb) const; 99 100 // Mass in amu 99 // Get number of elements 100 // 101 inline size_t GetNumberOfElements() const; 102 103 // Get atomic number by element symbol 104 // 105 inline G4int GetZ(const G4String& symb) const; 106 107 // Get the mass of the element in amu for the natuaral isotope composition 108 // with electron shell 109 // 101 110 inline G4double GetAtomicMassAmu(G4int Z) const; 102 111 103 // Mass in Geant4 units 112 // Get mass of the isotope in Geant4 units without electron shell 113 // 104 114 inline G4double GetIsotopeMass(G4int Z, G4int N) const; 115 116 // Get mass of the isotope in Geant4 units with electron shell 117 // 105 118 inline G4double GetAtomicMass(G4int Z, G4int N) const; 106 119 107 // Number of isotopes 108 inline G4int GetNistFirstIsotopeN(G4int Z) const; 109 inline G4int GetNumberOfNistIsotopes(G4int Z) const; 110 120 // Get total ionisation energy of an atom 121 // 122 inline G4double GetTotalElectronBindingEnergy(G4int Z) const; 123 124 // Get N for the first natural isotope 125 // 126 inline G4int GetNistFirstIsotopeN(G4int Z) const; 127 128 // Get number of natural isotopes 129 // 130 inline G4int GetNumberOfNistIsotopes(G4int Z) const; 131 132 // Get natural isotope abandance 133 // 111 134 inline G4double GetIsotopeAbundance(G4int Z, G4int N) const; 112 135 136 // Print element by Z 137 // 113 138 inline void PrintElement(G4int Z); 114 139 140 // Print element from internal DB by symbol, if "all" - print all elements 141 // 115 142 void PrintElement(const G4String&); 143 144 // Print G4Element by name, if "all" - print all G4Elements 145 // 116 146 void PrintG4Element(const G4String&); 117 147 148 // Access to the vector of Geant4 predefined element names 149 // 118 150 inline const std::vector<G4String>& GetNistElementNames() const; 119 151 120 // Materials152 // Get G4Material by index 121 153 // 122 154 inline G4Material* GetMaterial(size_t index); 123 155 124 // Find or build a G4Material by name, from the dataBase156 // Find or build a G4Material by name, from the Geant4 dataBase 125 157 // 126 158 inline G4Material* FindOrBuildMaterial(const G4String& name, … … 128 160 G4bool warning=false); 129 161 130 // construct a G4Material from scratch by atome count162 // Construct a G4Material from scratch by atome count 131 163 // 132 164 inline G4Material* ConstructNewMaterial( … … 140 172 G4double pressure = STP_Pressure); 141 173 142 // construct a G4Material from scratch by fraction mass174 // Construct a G4Material from scratch by fraction mass 143 175 // 144 176 inline G4Material* ConstructNewMaterial( … … 152 184 G4double pressure = STP_Pressure); 153 185 154 // construct a gas G4Material from scratch by atome count186 // Construct a gas G4Material from scratch by atome count 155 187 // 156 188 inline G4Material* ConstructNewGasMaterial(const G4String& name, … … 160 192 G4bool isotopes=true); 161 193 194 // Get number of G4Materials 195 // 162 196 inline size_t GetNumberOfMaterials(); 163 197 … … 166 200 void SetVerbose(G4int); 167 201 202 // Print G4Material by name 203 // 168 204 void PrintG4Material(const G4String&); 169 205 206 // Print predefined Geant4 materials: 207 // "simple" - only pure materials in basic state (Z = 1, ..., 98) 208 // "compound" - NIST compounds 209 // "hep" - HEP materials and compounds 210 // "all" - all 211 // 170 212 inline void ListMaterials(const G4String&); 171 213 214 // Access to the list of names of Geant4 predefined materials 215 // 172 216 inline const std::vector<G4String>& GetNistMaterialNames() const; 173 217 174 G4double GetZ13(G4double Z); 175 176 G4double GetLOGA(G4double A); 218 // Fast computation of Z^1/3 219 // 220 inline G4double GetZ13(G4double Z); 221 inline G4double GetZ13(G4int Z); 222 223 // Fast computation of A^0.27 for natuaral abandances 224 // 225 inline G4double GetA27(G4int Z); 226 227 // Fast computation of log(A) 228 // 229 inline G4double GetLOGA(G4double A); 230 inline G4double GetLOGZ(G4int Z); 231 232 // Fast computation of log(A) for natuaral abandances 233 // 234 inline G4double GetLOGA(G4int Z); 177 235 178 236 private: … … 181 239 static G4NistManager* instance; 182 240 183 static G4double POWERZ13[256]; 184 static G4double LOGA[256]; 241 G4double POWERZ13[256]; 242 G4double LOGA[256]; 243 G4double POWERA27[101]; 244 G4double LOGAZ[101]; 185 245 186 246 std::vector<G4Element*> elements; … … 201 261 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 202 262 203 inline 204 size_t G4NistManager::GetNumberOfMaterials() 263 inline size_t G4NistManager::GetNumberOfMaterials() 205 264 { 206 265 return nMaterials; … … 209 268 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 210 269 211 inline 212 G4Element* G4NistManager::GetElement(size_t index) 270 inline G4Element* G4NistManager::GetElement(size_t index) 213 271 { 214 272 G4Element* elm = 0; … … 237 295 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 238 296 239 inline 240 size_t G4NistManager::GetNumberOfElements() const 297 inline size_t G4NistManager::GetNumberOfElements() const 241 298 { 242 299 return nElements; … … 245 302 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 246 303 247 inline 248 G4int G4NistManager::GetZ(const G4String& symb) const 304 inline G4int G4NistManager::GetZ(const G4String& symb) const 249 305 { 250 306 return elmBuilder->GetZ(symb); … … 253 309 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 254 310 255 inline 256 G4double G4NistManager::GetAtomicMassAmu(G4int Z) const 311 inline G4double G4NistManager::GetAtomicMassAmu(G4int Z) const 257 312 { 258 313 return elmBuilder->GetA(Z); … … 278 333 279 334 inline 335 G4double G4NistManager::GetTotalElectronBindingEnergy(G4int Z) const 336 { 337 return elmBuilder->GetTotalElectronBindingEnergy(Z); 338 } 339 340 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 341 342 inline 280 343 G4double G4NistManager::GetIsotopeAbundance(G4int Z, G4int N) const 281 344 { … … 309 372 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 310 373 311 inline 312 void G4NistManager::PrintElement(G4int Z) 374 inline void G4NistManager::PrintElement(G4int Z) 313 375 { 314 376 elmBuilder->PrintElement(Z); … … 317 379 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 318 380 319 inline 320 G4Material* G4NistManager::GetMaterial(size_t index) 381 inline G4Material* G4NistManager::GetMaterial(size_t index) 321 382 { 322 383 const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable(); … … 328 389 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 329 390 330 inline 331 G4int G4NistManager::GetVerbose() 391 inline G4int G4NistManager::GetVerbose() 332 392 { 333 393 return verbose; … … 346 406 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 347 407 348 inline 349 G4Material* G4NistManager::ConstructNewMaterial( 408 inline G4Material* G4NistManager::ConstructNewMaterial( 350 409 const G4String& name, 351 410 const std::vector<G4String>& elm, … … 364 423 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 365 424 366 inline 367 G4Material* G4NistManager::ConstructNewMaterial( 425 inline G4Material* G4NistManager::ConstructNewMaterial( 368 426 const G4String& name, 369 427 const std::vector<G4String>& elm, … … 380 438 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 381 439 382 inline 383 G4Material* G4NistManager::ConstructNewGasMaterial( 440 inline G4Material* G4NistManager::ConstructNewGasMaterial( 384 441 const G4String& name, 385 442 const G4String& nameNist, … … 393 450 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 394 451 395 inline 396 void G4NistManager::ListMaterials(const G4String& list) 452 inline void G4NistManager::ListMaterials(const G4String& list) 397 453 { 398 454 matBuilder->ListMaterials(list); … … 409 465 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 410 466 467 inline G4double G4NistManager::GetZ13(G4double Z) 468 { 469 G4int iz = G4int(Z); 470 G4double x = (Z - G4double(iz))/(3.0*Z); 471 if(iz > 255) iz = 255; 472 else if(iz < 0) iz = 0; 473 return POWERZ13[iz]*(1.0 + x); 474 } 475 476 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 477 478 inline G4double G4NistManager::GetZ13(G4int Z) 479 { 480 return POWERZ13[Z]; 481 } 482 483 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 484 485 inline G4double G4NistManager::GetA27(G4int Z) 486 { 487 G4double res = 0.0; 488 if(Z < 101) res = POWERA27[Z]; 489 return res; 490 } 491 492 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 493 494 inline G4double G4NistManager::GetLOGZ(G4int Z) 495 { 496 G4double res = 0.0; 497 if(Z < 256) res = LOGA[Z]; 498 return res; 499 } 500 501 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 502 503 inline G4double G4NistManager::GetLOGA(G4double A) 504 { 505 G4int ia = G4int(A); 506 G4double x = (A - G4double(ia))/A; 507 if(ia > 255) ia = 255; 508 else if(ia < 0) ia = 0; 509 return LOGA[ia] + x*(1.0 - 0.5*x); 510 } 511 512 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 513 514 inline G4double G4NistManager::GetLOGA(G4int Z) 515 { 516 G4double res = 0.0; 517 if(Z < 101) res = LOGAZ[Z]; 518 return res; 519 } 520 521 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 522 411 523 #endif 412 524 -
trunk/source/materials/include/G4NistMaterialBuilder.hh
r822 r850 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4NistMaterialBuilder.hh,v 1.1 2 2007/10/30 10:05:52vnivanch Exp $27 // GEANT4 tag $Name: $26 // $Id: G4NistMaterialBuilder.hh,v 1.13 2008/04/28 08:51:29 vnivanch Exp $ 27 // GEANT4 tag $Name: HEAD $ 28 28 29 29 #ifndef G4NistMaterialBuilder_h … … 108 108 G4bool isotopes=true); 109 109 110 // verbosity level defined by G4NistManager 111 // 110 112 void SetVerbose(G4int val); 113 114 // cout predefined materials: 115 // "simple" - only pure materials in basic state (Z = 1, ..., 98) 116 // "compound" - NIST compounds 117 // "hep" - HEP materials and compounds 118 // "all" - all 119 // 111 120 void ListMaterials(const G4String&); 121 122 // cout lists of predefined materials 123 // 112 124 void ListNistSimpleMaterials(); 113 125 void ListNistCompoundMaterials(); 114 126 void ListHepMaterials(); 115 127 128 // access to the list of names of Geant4 predefined materials 129 // 116 130 const std::vector<G4String>& GetMaterialNames() const; 117 131 … … 123 137 void HepAndNuclearMaterials(); 124 138 139 // add parameters of material from NIST DB to internal vectors 140 // density in g/cm3, mean ionisation potential in eV 141 // 125 142 void AddMaterial(const G4String& nameMat, G4double dens, G4int Z=0, 126 143 G4double pot=0.0, G4int ncomp=1, -
trunk/source/materials/include/G4NistMessenger.hh
r822 r850 26 26 // 27 27 // $Id: G4NistMessenger.hh,v 1.4 2007/05/02 10:48:52 vnivanch Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: HEAD $ 29 29 // 30 30 // File name: G4NistMessenger -
trunk/source/materials/include/G4OpticalSurface.hh
r822 r850 25 25 // 26 26 // 27 // $Id: G4OpticalSurface.hh,v 1. 8 2006/06/29 19:12:31 gunterExp $28 // GEANT4 tag $Name: $27 // $Id: G4OpticalSurface.hh,v 1.10 2008/07/21 20:54:57 gum Exp $ 28 // GEANT4 tag $Name: HEAD $ 29 29 // 30 30 // … … 111 111 public: // Without description 112 112 113 ~G4OpticalSurface();113 virtual ~G4OpticalSurface(); 114 114 115 115 //////////// … … 120 120 121 121 public: // With description 122 123 virtual void Overwrite() {G4cout << "G4OpticalSurface" << G4endl;}; 122 124 123 125 G4OpticalSurfaceFinish GetFinish() const {return theFinish;}; -
trunk/source/materials/include/G4SandiaTable.hh
r822 r850 26 26 // 27 27 // $Id: G4SandiaTable.hh,v 1.21 2007/10/02 10:13:33 vnivanch Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: HEAD $ 29 29 30 30 // class description -
trunk/source/materials/include/G4StaticSandiaData.hh
r822 r850 26 26 // 27 27 // $Id: G4StaticSandiaData.hh,v 1.7 2006/06/29 19:12:35 gunter Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: HEAD $ 29 29 // 30 30 -
trunk/source/materials/include/G4SurfaceProperty.hh
r822 r850 25 25 // 26 26 // 27 // $Id: G4SurfaceProperty.hh,v 1. 4 2007/04/25 16:18:34gum Exp $28 // GEANT4 tag $Name: $27 // $Id: G4SurfaceProperty.hh,v 1.7 2008/07/21 20:55:16 gum Exp $ 28 // GEANT4 tag $Name: HEAD $ 29 29 // 30 30 // … … 97 97 //////////////////////////////// 98 98 99 G4SurfaceProperty(const G4String& name, 100 G4SurfaceType type = x_ray) 101 : theName(name), theType(type) 102 { 103 theSurfacePropertyTable.push_back(this); 104 } 99 G4SurfaceProperty(const G4String& name, G4SurfaceType type = x_ray); 105 100 // Constructor of a X-ray optical surface object. 106 101 107 102 public: // Without description 108 103 109 ~G4SurfaceProperty(){};104 virtual ~G4SurfaceProperty(); 110 105 111 106 //////////// … … 116 111 117 112 public: // With description 113 114 virtual void Overwrite() {G4cout << "G4SurfaceProperty" << G4endl;}; 118 115 119 116 G4String GetName() const { return theName; }; … … 130 127 static const G4SurfacePropertyTable* GetSurfacePropertyTable(); 131 128 static size_t GetNumberOfSurfaceProperties(); 132 static void Dump Info();129 static void DumpTableInfo(); 133 130 // To handle the table of surface properties. 134 131 -
trunk/source/materials/src/G4AtomicShells.cc
r822 r850 26 26 // 27 27 // $Id: G4AtomicShells.cc,v 1.7 2006/10/17 15:15:46 vnivanch Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: HEAD $ 29 29 // 30 30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo.... -
trunk/source/materials/src/G4Element.cc
r822 r850 25 25 // 26 26 // 27 // $Id: G4Element.cc,v 1. 26 2007/10/18 11:14:33vnivanch Exp $28 // GEANT4 tag $Name: $27 // $Id: G4Element.cc,v 1.31 2008/08/11 11:53:11 vnivanch Exp $ 28 // GEANT4 tag $Name: HEAD $ 29 29 // 30 30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 69 69 : fName(name), fSymbol(symbol) 70 70 { 71 if (zeff<1.) G4Exception (" ERROR from G4Element::G4Element !" 72 " It is not allowed to create an Element with Z < 1" ); 73 74 if (aeff/(g/mole)<zeff) G4Exception (" ERROR from G4Element::G4Element !" 75 " Attempt to create an Element with N < Z !!!" ); 76 77 if ((zeff-G4int(zeff)) > perMillion) 71 G4int iz = (G4int)zeff; 72 if (zeff<1.) { 73 G4cout << "G4Element ERROR: " << name << " Z= " << zeff 74 << " A= " << aeff/(g/mole) << G4endl; 75 G4Exception (" ERROR from G4Element::G4Element !" 76 " It is not allowed to create an Element with Z < 1" ); 77 } 78 if (std::abs(zeff - iz) > perMillion) { 79 G4cout << "G4Element Warning: " << name << " Z= " << zeff 80 << " A= " << aeff/(g/mole) << G4endl; 78 81 G4cerr << name << " : WARNING from G4Element::G4Element !" 79 82 " Trying to define an element as a mixture directly via effective Z." 80 83 << G4endl; 84 } 81 85 82 86 InitializePointers(); … … 85 89 fNeff = aeff/(g/mole); 86 90 fAeff = aeff; 91 92 if(fNeff < 1.0) fNeff = 1.0; 93 94 if (fNeff < zeff) { 95 G4cout << "G4Element ERROR: " << name << " Z= " << zeff 96 << " A= " << fNeff << G4endl; 97 G4Exception (" ERROR from G4Element::G4Element !" 98 " Attempt to create an Element with N < Z !!!" ); 99 } 87 100 88 fNbOfAtomicShells = G4AtomicShells::GetNumberOfShells( (G4int)fZeff);101 fNbOfAtomicShells = G4AtomicShells::GetNumberOfShells(iz); 89 102 fAtomicShells = new G4double[fNbOfAtomicShells]; 90 for (G4int i=0;i<fNbOfAtomicShells;i++) 91 fAtomicShells[i] = G4AtomicShells::GetBindingEnergy( (G4int)fZeff,i);92 103 for (G4int i=0;i<fNbOfAtomicShells;i++) { 104 fAtomicShells[i] = G4AtomicShells::GetBindingEnergy(iz, i); 105 } 93 106 ComputeDerivedQuantities(); 94 107 } … … 117 130 void G4Element::AddIsotope(G4Isotope* isotope, G4double abundance) 118 131 { 119 if (theIsotopeVector == 0) 132 if (theIsotopeVector == 0) { 133 G4cout << "G4Element ERROR: " << fName << G4endl; 120 134 G4Exception ("ERROR from G4Element::AddIsotope!" 121 135 " Trying to add an Isotope before contructing the element."); 136 } 137 G4int iz = isotope->GetZ(); 122 138 123 139 // filling ... 124 140 if ( fNumberOfIsotopes < theIsotopeVector->size() ) { 125 141 // check same Z 126 if (fNumberOfIsotopes==0) fZeff = G4double(i sotope->GetZ());127 else if (G4double(i sotope->GetZ()) != fZeff)142 if (fNumberOfIsotopes==0) fZeff = G4double(iz); 143 else if (G4double(iz) != fZeff) { 128 144 G4Exception ("ERROR from G4Element::AddIsotope!" 129 145 " Try to add isotopes with different Z"); 146 } 130 147 //Z ok 131 148 fRelativeAbundanceVector[fNumberOfIsotopes] = abundance; … … 133 150 ++fNumberOfIsotopes; 134 151 isotope->increaseCountUse(); 135 } 136 else G4Exception ("ERROR from G4Element::AddIsotope!" 137 " Attempt to add more than the declared number of isotopes."); 152 } else { 153 G4cout << "G4Element ERROR: " << fName << G4endl; 154 G4Exception ("ERROR from G4Element::AddIsotope!" 155 " Attempt to add more than the declared number of isotopes."); 156 } 138 157 139 158 // filled. … … 151 170 fAeff /= wtSum; 152 171 153 fNbOfAtomicShells = G4AtomicShells::GetNumberOfShells( (G4int)fZeff);172 fNbOfAtomicShells = G4AtomicShells::GetNumberOfShells(iz); 154 173 fAtomicShells = new G4double[fNbOfAtomicShells]; 155 for (G4int j=0;j<fNbOfAtomicShells;j++) 156 fAtomicShells[j] = G4AtomicShells::GetBindingEnergy((G4int)fZeff,j); 174 for (G4int j=0;j<fNbOfAtomicShells;j++) { 175 fAtomicShells[j] = G4AtomicShells::GetBindingEnergy(iz, j); 176 } 157 177 158 178 ComputeDerivedQuantities(); … … 213 233 // check if elements with same Z already exist 214 234 fIndexZ = 0; 215 for (size_t J=0 ; J<fIndexInTable ; J++) 235 for (size_t J=0 ; J<fIndexInTable ; J++) { 216 236 if (theElementTable[J]->GetZ() == fZeff) fIndexZ++; 217 237 } 218 238 //nb of materials which use this element 219 239 fCountUse = 0; … … 257 277 258 278 G4double Lrad, Lprad; 259 G4int iz = ( int)(fZeff+0.5) - 1 ;279 G4int iz = (G4int)(fZeff+0.5) - 1 ; 260 280 if (iz <= 3) { Lrad = Lrad_light[iz] ; Lprad = Lprad_light[iz] ; } 261 281 else { Lrad = std::log(184.15) - logZ3 ; Lprad = std::log(1194.) - 2*logZ3;} -
trunk/source/materials/src/G4IonisParamElm.cc
r822 r850 25 25 // 26 26 // 27 // $Id: G4IonisParamElm.cc,v 1.1 4 2006/06/29 19:12:43 gunterExp $28 // GEANT4 tag $Name: $27 // $Id: G4IonisParamElm.cc,v 1.15 2008/06/03 14:30:10 vnivanch Exp $ 28 // GEANT4 tag $Name: HEAD $ 29 29 // 30 30 // … … 47 47 G4IonisParamElm::G4IonisParamElm(G4double Z) 48 48 { 49 if (Z < 1.) G4Exception50 (" ERROR! It is not allowed to create an Element with Z < 1" );49 if (Z < 1.) 50 G4Exception (" ERROR! It is not allowed to create an Element with Z < 1" ); 51 51 52 // some basic functions of the atomic number53 fZ = Z;54 fZ3 = std::pow(fZ, 1./3.);55 fZZ3 = std::pow(fZ*(fZ+1.), 1./3.);56 flogZ3 = std::log(fZ)/3.;52 // 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.; 57 57 58 // Parameters for energy loss by ionisation59 60 // Mean excitation energy61 // from "Stopping Powers for Electrons and Positrons"62 // ICRU Report N#37, 1984 (energy in eV)63 static double exc[100] = {58 // Parameters for energy loss by ionisation 59 60 // Mean excitation energy 61 // from "Stopping Powers for Electrons and Positrons" 62 // ICRU Report N#37, 1984 (energy in eV) 63 static double exc[100] = { 64 64 21.8, 20.9, 13.3, 15.9, 15.2, 13.0, 11.7, 11.9, 11.5, 13.7, 65 65 13.6, 13.0, 12.8, 12.4, 11.5, 11.3, 10.2, 10.4, 10.0, 9.6, … … 73 73 9.6, 9.7, 9.7, 9.8, 9.8, 9.8, 9.8, 9.9, 9.9, 9.9 }; 74 74 75 G4int iz = (G4int)Z - 1 ; 76 if(0 > iz) iz = 0; 77 else if(99 < iz) iz = 99 ; 78 fMeanExcitationEnergy = fZ * exc[iz] * eV ; 79 80 81 fTau0 = 0.1*fZ3*MeV/proton_mass_c2; 82 fTaul = 2.*MeV/proton_mass_c2; 83 84 // compute the Bethe-Bloch formula for energy = fTaul*particle mass 85 G4double rate = fMeanExcitationEnergy/electron_mass_c2 ; 86 G4double w = fTaul*(fTaul+2.) ; 87 fBetheBlochLow = (fTaul+1.)*(fTaul+1.)*std::log(2.*w/rate)/w - 1. ; 88 fBetheBlochLow = 2.*fZ*twopi_mc2_rcl2*fBetheBlochLow ; 75 G4int iz = (G4int)Z - 1 ; 76 if(0 > iz) iz = 0; 77 else if(99 < iz) iz = 99 ; 78 fMeanExcitationEnergy = fZ * exc[iz] * eV ; 79 80 // compute parameters for ion transport 81 // The aproximation from: 82 // J.F.Ziegler, J.P. Biersack, U. Littmark 83 // The Stopping and Range of Ions in Matter, 84 // Vol.1, Pergamon Press, 1985 85 // Fast ions or hadrons 86 87 if(91 < iz) iz = 91; 88 89 static G4double vFermi[92] = { 90 1.0309, 0.15976, 0.59782, 1.0781, 1.0486, 1.0, 1.058, 0.93942, 0.74562, 0.3424, 91 0.45259, 0.71074, 0.90519, 0.97411, 0.97184, 0.89852, 0.70827, 0.39816, 0.36552, 0.62712, 92 0.81707, 0.9943, 1.1423, 1.2381, 1.1222, 0.92705, 1.0047, 1.2, 1.0661, 0.97411, 93 0.84912, 0.95, 1.0903, 1.0429, 0.49715, 0.37755, 0.35211, 0.57801, 0.77773, 1.0207, 94 1.029, 1.2542, 1.122, 1.1241, 1.0882, 1.2709, 1.2542, 0.90094, 0.74093, 0.86054, 95 0.93155, 1.0047, 0.55379, 0.43289, 0.32636, 0.5131, 0.695, 0.72591, 0.71202, 0.67413, 96 0.71418, 0.71453, 0.5911, 0.70263, 0.68049, 0.68203, 0.68121, 0.68532, 0.68715, 0.61884, 97 0.71801, 0.83048, 1.1222, 1.2381, 1.045, 1.0733, 1.0953, 1.2381, 1.2879, 0.78654, 98 0.66401, 0.84912, 0.88433, 0.80746, 0.43357, 0.41923, 0.43638, 0.51464, 0.73087, 0.81065, 99 1.9578, 1.0257} ; 100 101 static G4double lFactor[92] = { 102 1.0, 1.0, 1.1, 1.06, 1.01, 1.03, 1.04, 0.99, 0.95, 0.9, 103 0.82, 0.81, 0.83, 0.88, 1.0, 0.95, 0.97, 0.99, 0.98, 0.97, 104 0.98, 0.97, 0.96, 0.93, 0.91, 0.9, 0.88, 0.9, 0.9, 0.9, 105 0.9, 0.85, 0.9, 0.9, 0.91, 0.92, 0.9, 0.9, 0.9, 0.9, 106 0.9, 0.88, 0.9, 0.88, 0.88, 0.9, 0.9, 0.88, 0.9, 0.9, 107 0.9, 0.9, 0.96, 1.2, 0.9, 0.88, 0.88, 0.85, 0.9, 0.9, 108 0.92, 0.95, 0.99, 1.03, 1.05, 1.07, 1.08, 1.1, 1.08, 1.08, 109 1.08, 1.08, 1.09, 1.09, 1.1, 1.11, 1.12, 1.13, 1.14, 1.15, 110 1.17, 1.2, 1.18, 1.17, 1.17, 1.16, 1.16, 1.16, 1.16, 1.16, 111 1.16, 1.16} ; 112 113 fVFermi = vFermi[iz]; 114 fLFactor = lFactor[iz]; 115 116 // obsolete parameters for ionisation 117 fTau0 = 0.1*fZ3*MeV/proton_mass_c2; 118 fTaul = 2.*MeV/proton_mass_c2; 119 120 // compute the Bethe-Bloch formula for energy = fTaul*particle mass 121 G4double rate = fMeanExcitationEnergy/electron_mass_c2 ; 122 G4double w = fTaul*(fTaul+2.) ; 123 fBetheBlochLow = (fTaul+1.)*(fTaul+1.)*std::log(2.*w/rate)/w - 1. ; 124 fBetheBlochLow = 2.*fZ*twopi_mc2_rcl2*fBetheBlochLow ; 89 125 90 fClow = std::sqrt(fTaul)*fBetheBlochLow;91 fAlow = 6.458040 * fClow/fTau0;92 G4double Taum = 0.035*fZ3*MeV/proton_mass_c2;93 fBlow =-3.229020*fClow/(fTau0*std::sqrt(Taum));94 95 // Shell correction factors96 fShellCorrectionVector = new G4double[3]; //[3]97 rate = 0.001*fMeanExcitationEnergy/eV;98 G4double rate2 = rate*rate;126 fClow = std::sqrt(fTaul)*fBetheBlochLow; 127 fAlow = 6.458040 * fClow/fTau0; 128 G4double Taum = 0.035*fZ3*MeV/proton_mass_c2; 129 fBlow =-3.229020*fClow/(fTau0*std::sqrt(Taum)); 130 131 // Shell correction parameterization 132 fShellCorrectionVector = new G4double[3]; //[3] 133 rate = 0.001*fMeanExcitationEnergy/eV; 134 G4double rate2 = rate*rate; 99 135 /* 100 136 fShellCorrectionVector[0] = ( 1.10289e5 + 5.14781e8*rate)*rate2 ; … … 102 138 fShellCorrectionVector[2] = (-9.92256e1 + 2.10823e5*rate)*rate2 ; 103 139 */ 104 fShellCorrectionVector[0] = ( 0.422377 + 3.858019*rate)*rate2 ;105 fShellCorrectionVector[1] = ( 0.0304043 - 0.1667989*rate)*rate2 ;106 fShellCorrectionVector[2] = (-0.00038106 + 0.00157955*rate)*rate2 ;140 fShellCorrectionVector[0] = ( 0.422377 + 3.858019*rate)*rate2 ; 141 fShellCorrectionVector[1] = ( 0.0304043 - 0.1667989*rate)*rate2 ; 142 fShellCorrectionVector[2] = (-0.00038106 + 0.00157955*rate)*rate2 ; 107 143 } 108 144 -
trunk/source/materials/src/G4IonisParamMat.cc
r822 r850 25 25 // 26 26 // 27 // $Id: G4IonisParamMat.cc,v 1.2 0 2007/09/27 14:05:47vnivanch Exp $28 // GEANT4 tag $Name: geant4-09-01-patch-02$27 // $Id: G4IonisParamMat.cc,v 1.25 2008/07/08 10:34:56 vnivanch Exp $ 28 // GEANT4 tag $Name: HEAD $ 29 29 // 30 30 // … … 39 39 // 10-05-05, add a missing coma in FindMeanExcitationEnergy() - Bug#746 (mma) 40 40 // 27-09-07, add computation of parameters for ions (V.Ivanchenko) 41 // 04-03-08, remove reference to G4NistManager. Add fBirks constant (mma) 41 42 42 43 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo.... … … 44 45 #include "G4IonisParamMat.hh" 45 46 #include "G4Material.hh" 46 #include "G4NistManager.hh"47 47 48 48 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo.... … … 55 55 ComputeFluctModel(); 56 56 ComputeIonParameters(); 57 58 fBirks = 0.; 59 fMeanEnergyPerIon = 0.; 57 60 } 58 61 … … 78 81 fLogMeanExcEnergy = 0.; 79 82 80 81 for (size_t i=0; i < fMaterial->GetNumberOfElements(); i++) { 82 fLogMeanExcEnergy += 83 (fMaterial->GetVecNbOfAtomsPerVolume())[i] 84 *((*(fMaterial->GetElementVector()))[i]->GetZ()) 85 *std::log((*(fMaterial->GetElementVector()))[i]->GetIonisation() 86 ->GetMeanExcitationEnergy()); 83 size_t nElements = fMaterial->GetNumberOfElements(); 84 const G4ElementVector* elmVector = fMaterial->GetElementVector(); 85 const G4double* nAtomsPerVolume = fMaterial->GetVecNbOfAtomsPerVolume(); 86 87 const G4String ch = fMaterial->GetChemicalFormula(); 88 89 if(ch != "") fMeanExcitationEnergy = FindMeanExcitationEnergy(ch); 90 91 // Chemical formula defines mean excitation energy 92 if(fMeanExcitationEnergy > 0.0) { 93 fLogMeanExcEnergy = std::log(fMeanExcitationEnergy); 94 95 // Compute average 96 } else { 97 for (size_t i=0; i < nElements; i++) { 98 const G4Element* elm = (*elmVector)[i]; 99 fLogMeanExcEnergy += nAtomsPerVolume[i]*elm->GetZ() 100 *std::log(elm->GetIonisation()->GetMeanExcitationEnergy()); 101 } 102 fLogMeanExcEnergy /= fMaterial->GetTotNbOfElectPerVolume(); 103 fMeanExcitationEnergy = std::exp(fLogMeanExcEnergy); 87 104 } 88 89 fLogMeanExcEnergy /= fMaterial->GetTotNbOfElectPerVolume();90 fMeanExcitationEnergy = std::exp(fLogMeanExcEnergy);91 105 92 106 fShellCorrectionVector = new G4double[3]; //[3] … … 96 110 fShellCorrectionVector[j] = 0.; 97 111 98 for (size_t k=0; k<fMaterial->GetNumberOfElements(); k++) { 99 fShellCorrectionVector[j] += (fMaterial->GetVecNbOfAtomsPerVolume())[k] 100 *((*(fMaterial->GetElementVector()))[k]->GetIonisation() 101 ->GetShellCorrectionVector()[j]); 112 for (size_t k=0; k<nElements; k++) { 113 fShellCorrectionVector[j] += nAtomsPerVolume[k] 114 *(((*elmVector)[k])->GetIonisation()->GetShellCorrectionVector())[j]; 102 115 } 103 116 fShellCorrectionVector[j] *= 2.0/fMaterial->GetTotNbOfElectPerVolume(); … … 200 213 // need an 'effective Z' ????? 201 214 G4double Zeff = 0.; 202 for (size_t i=0;i<fMaterial->GetNumberOfElements();i++) 215 for (size_t i=0;i<fMaterial->GetNumberOfElements();i++) { 203 216 Zeff += (fMaterial->GetFractionVector())[i] 204 217 *((*(fMaterial->GetElementVector()))[i]->GetZ()); 205 218 } 206 219 if (Zeff > 2.) fF2fluct = 2./Zeff ; 207 220 else fF2fluct = 0.; … … 221 234 void G4IonisParamMat::ComputeIonParameters() 222 235 { 223 // compute parameters for ion transport224 // The aproximation from:225 // J.F.Ziegler, J.P. Biersack, U. Littmark226 // The Stopping and Range of Ions in Matter,227 // Vol.1, Pergamon Press, 1985228 // Fast ions or hadrons229 230 static G4double vFermi[92] = {231 1.0309, 0.15976, 0.59782, 1.0781, 1.0486, 1.0, 1.058, 0.93942, 0.74562, 0.3424,232 0.45259, 0.71074, 0.90519, 0.97411, 0.97184, 0.89852, 0.70827, 0.39816, 0.36552, 0.62712,233 0.81707, 0.9943, 1.1423, 1.2381, 1.1222, 0.92705, 1.0047, 1.2, 1.0661, 0.97411,234 0.84912, 0.95, 1.0903, 1.0429, 0.49715, 0.37755, 0.35211, 0.57801, 0.77773, 1.0207,235 1.029, 1.2542, 1.122, 1.1241, 1.0882, 1.2709, 1.2542, 0.90094, 0.74093, 0.86054,236 0.93155, 1.0047, 0.55379, 0.43289, 0.32636, 0.5131, 0.695, 0.72591, 0.71202, 0.67413,237 0.71418, 0.71453, 0.5911, 0.70263, 0.68049, 0.68203, 0.68121, 0.68532, 0.68715, 0.61884,238 0.71801, 0.83048, 1.1222, 1.2381, 1.045, 1.0733, 1.0953, 1.2381, 1.2879, 0.78654,239 0.66401, 0.84912, 0.88433, 0.80746, 0.43357, 0.41923, 0.43638, 0.51464, 0.73087, 0.81065,240 1.9578, 1.0257} ;241 242 static G4double lFactor[92] = {243 1.0, 1.0, 1.1, 1.06, 1.01, 1.03, 1.04, 0.99, 0.95, 0.9,244 0.82, 0.81, 0.83, 0.88, 1.0, 0.95, 0.97, 0.99, 0.98, 0.97,245 0.98, 0.97, 0.96, 0.93, 0.91, 0.9, 0.88, 0.9, 0.9, 0.9,246 0.9, 0.85, 0.9, 0.9, 0.91, 0.92, 0.9, 0.9, 0.9, 0.9,247 0.9, 0.88, 0.9, 0.88, 0.88, 0.9, 0.9, 0.88, 0.9, 0.9,248 0.9, 0.9, 0.96, 1.2, 0.9, 0.88, 0.88, 0.85, 0.9, 0.9,249 0.92, 0.95, 0.99, 1.03, 1.05, 1.07, 1.08, 1.1, 1.08, 1.08,250 1.08, 1.08, 1.09, 1.09, 1.1, 1.11, 1.12, 1.13, 1.14, 1.15,251 1.17, 1.2, 1.18, 1.17, 1.17, 1.16, 1.16, 1.16, 1.16, 1.16,252 1.16, 1.16} ;253 254 236 // get elements in the actual material, 255 237 const G4ElementVector* theElementVector = fMaterial->GetElementVector() ; … … 263 245 264 246 if( 1 == NumberOfElements ) { 265 z = fMaterial->GetZ() ; 266 G4int iz = G4int(z) - 1 ; 267 if(iz < 0) iz = 0 ; 268 else if(iz > 91) iz = 91 ; 269 vF = vFermi[iz] ; 270 lF = lFactor[iz] ; 247 const G4Element* element = (*theElementVector)[0]; 248 z = element->GetZ(); 249 vF= element->GetIonisation()->GetFermiVelocity(); 250 lF= element->GetIonisation()->GetLFactor(); 271 251 272 252 } else { … … 274 254 { 275 255 const G4Element* element = (*theElementVector)[iel] ; 276 G4double z2 = element->GetZ() ;277 256 const G4double weight = theAtomicNumDensityVector[iel] ; 278 257 norm += weight ; 279 z += z2 * weight ; 280 G4int iz = G4int(z2) - 1 ; 281 if(iz < 0) iz = 0 ; 282 else if(iz > 91) iz =91 ; 283 vF += vFermi[iz] * weight ; 284 lF += lFactor[iz] * weight ; 258 z += element->GetZ() * weight ; 259 vF += element->GetIonisation()->GetFermiVelocity() * weight ; 260 lF += element->GetIonisation()->GetLFactor() * weight ; 285 261 } 286 262 z /= norm ; … … 299 275 if(value == fMeanExcitationEnergy || value <= 0.0) return; 300 276 277 /* 301 278 if (G4NistManager::Instance()->GetVerbose() > 0) 302 279 G4cout << "G4Material: Mean excitation energy is changed for " … … 305 282 << "eV; Inew= " << value/eV << " eV;" 306 283 << G4endl; 307 284 */ 285 308 286 fMeanExcitationEnergy = value; 309 287 fLogMeanExcEnergy = std::log(value); -
trunk/source/materials/src/G4Isotope.cc
r822 r850 25 25 // 26 26 // 27 // $Id: G4Isotope.cc,v 1.2 1 2007/10/18 11:14:33vnivanch Exp $28 // GEANT4 tag $Name: $27 // $Id: G4Isotope.cc,v 1.22 2008/08/11 11:53:11 vnivanch Exp $ 28 // GEANT4 tag $Name: HEAD $ 29 29 // 30 30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 63 63 (" ERROR! Attempt to create an Isotope with N < Z !!!" ); 64 64 65 if (A<=DBL_MIN) 66 fA = (G4NistManager::Instance()->Get IsotopeMass(Z,N))*g/(mole*amu_c2);67 65 if (A<=DBL_MIN) { 66 fA = (G4NistManager::Instance()->GetAtomicMass(Z,N))*g/(mole*amu_c2); 67 } 68 68 theIsotopeTable.push_back(this); 69 69 fIndexInTable = theIsotopeTable.size() - 1; -
trunk/source/materials/src/G4MPVEntry.cc
r822 r850 25 25 // 26 26 // 27 // $Id: G4MPVEntry.cc,v 1. 7 2006/06/29 19:12:49 gunterExp $28 // GEANT4 tag $Name: $27 // $Id: G4MPVEntry.cc,v 1.8 2008/06/05 23:39:18 gum Exp $ 28 // GEANT4 tag $Name: HEAD $ 29 29 // 30 30 // … … 59 59 G4bool G4MPVEntry::operator ==(const G4MPVEntry &right) const 60 60 { 61 if (thePhoton Momentum == right.thePhotonMomentum)61 if (thePhotonEnergy == right.thePhotonEnergy) 62 62 return true; 63 63 else … … 71 71 G4bool G4MPVEntry::operator <(const G4MPVEntry &right) const 72 72 { 73 if (thePhoton Momentum < right.thePhotonMomentum)73 if (thePhotonEnergy < right.thePhotonEnergy) 74 74 return true; 75 75 else … … 85 85 if (this == &right) return *this; 86 86 87 thePhoton Momentum = right.thePhotonMomentum;87 thePhotonEnergy = right.thePhotonEnergy; 88 88 theProperty = right.theProperty; 89 89 return *this; … … 94 94 ///////////////// 95 95 96 G4MPVEntry::G4MPVEntry(G4double aPhoton Momentum, G4double aProperty)96 G4MPVEntry::G4MPVEntry(G4double aPhotonEnergy, G4double aProperty) 97 97 { 98 thePhoton Momentum = aPhotonMomentum;98 thePhotonEnergy = aPhotonEnergy; 99 99 theProperty = aProperty; 100 100 } … … 102 102 G4MPVEntry::G4MPVEntry(const G4MPVEntry &right) 103 103 { 104 thePhoton Momentum = right.thePhotonMomentum;104 thePhotonEnergy = right.thePhotonEnergy; 105 105 theProperty = right.theProperty; 106 106 } … … 120 120 { 121 121 G4cout << "(" 122 << thePhoton Momentum122 << thePhotonEnergy 123 123 << ", " 124 124 << theProperty -
trunk/source/materials/src/G4Material.cc
r822 r850 25 25 // 26 26 // 27 // $Id: G4Material.cc,v 1. 38.2.1 2008/04/28 07:24:36 gcosmoExp $28 // GEANT4 tag $Name: geant4-09-01-patch-02$27 // $Id: G4Material.cc,v 1.42 2008/08/13 16:06:42 vnivanch Exp $ 28 // GEANT4 tag $Name: HEAD $ 29 29 // 30 30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 66 66 // 27-07-07, improve destructor (V.Ivanchenko) 67 67 // 18-10-07, move definition of material index to InitialisePointers (V.Ivanchenko) 68 // 13-08-08, do not use fixed size arrays (V.Ivanchenko) 68 69 // 69 70 … … 107 108 // element corresponding to this material 108 109 maxNbComponents = fNumberOfComponents = fNumberOfElements = 1; 110 fArrayLength = maxNbComponents; 109 111 fImplicitElement = true; 110 112 theElementVector = new G4ElementVector(); … … 152 154 153 155 maxNbComponents = nComponents; 156 fArrayLength = maxNbComponents; 154 157 fNumberOfComponents = fNumberOfElements = 0; 155 158 fImplicitElement = false; … … 185 188 // initialization 186 189 if ( fNumberOfElements == 0 ) { 187 fAtomsVector = new G4int [ maxNbComponents];188 fMassFractionVector = new G4double[ maxNbComponents];190 fAtomsVector = new G4int [fArrayLength]; 191 fMassFractionVector = new G4double[fArrayLength]; 189 192 } 190 193 … … 195 198 fNumberOfComponents = ++fNumberOfElements; 196 199 element->increaseCountUse(); 197 } 198 else 199 G4Exception 200 } else { 201 G4cerr << "G4Material::AddElement ERROR for " << fName << " nElement= " 202 << fNumberOfElements << G4endl; 203 G4Exception 200 204 ("ERROR!!! - Attempt to add more than the declared number of elements."); 201 205 } 202 206 // filled. 203 207 if ( G4int(fNumberOfElements) == maxNbComponents ) { … … 226 230 // initialization 227 231 if (fNumberOfComponents == 0) { 228 fMassFractionVector = new G4double[ 50];229 fAtomsVector = new G4int [ 50];232 fMassFractionVector = new G4double[fArrayLength]; 233 fAtomsVector = new G4int [fArrayLength]; 230 234 } 231 235 … … 242 246 } 243 247 fNumberOfComponents++; 244 } 245 else 246 G4Exception 248 } else { 249 G4cerr << "G4Material::AddElement ERROR for " << fName << " nElement= " 250 << fNumberOfElements << G4endl; 251 G4Exception 247 252 ("ERROR!!! - Attempt to add more than the declared number of components."); 248 253 } 254 249 255 // filled. 250 256 if (G4int(fNumberOfComponents) == maxNbComponents) { … … 281 287 // initialization 282 288 if (fNumberOfComponents == 0) { 283 fMassFractionVector = new G4double[50]; 284 fAtomsVector = new G4int [50]; 289 fMassFractionVector = new G4double[fArrayLength]; 290 fAtomsVector = new G4int [fArrayLength]; 291 } 292 293 size_t nelm = material->GetNumberOfElements(); 294 295 // arrays should be extended 296 if(nelm > 1) { 297 G4int nold = fArrayLength; 298 fArrayLength += nelm - 1; 299 G4double* v1 = new G4double[fArrayLength]; 300 G4int* i1 = new G4int[fArrayLength]; 301 for(G4int i=0; i<nold; i++) { 302 v1[i] = fMassFractionVector[i]; 303 i1[i] = fAtomsVector[i]; 304 } 305 delete [] fAtomsVector; 306 delete [] fMassFractionVector; 307 fMassFractionVector = v1; 308 fAtomsVector = i1; 285 309 } 286 310 287 311 // filling ... 288 312 if (G4int(fNumberOfComponents) < maxNbComponents) { 289 for (size_t elm=0; elm < material->GetNumberOfElements(); elm++)313 for (size_t elm=0; elm<nelm; elm++) 290 314 { 291 315 G4Element* element = (*(material->GetElementVector()))[elm]; … … 303 327 } 304 328 fNumberOfComponents++; 305 } 306 else 307 G4Exception 308 ("ERROR!!! - Attempt to add more than the declared number of components."); 309 329 } else { 330 G4cerr << "G4Material::AddElement ERROR for " << fName << " nElement= " 331 << fNumberOfElements << G4endl; 332 G4Exception 333 ("ERROR!!! - Attempt to add more than the declared number of components."); 334 } 335 310 336 // filled. 311 337 if (G4int(fNumberOfComponents) == maxNbComponents) { … … 541 567 542 568 flux 543 << " Material: " << std::setw(8) << material->fName569 << " Material: " << std::setw(8) << material->fName 544 570 << " " << material->fChemicalFormula << " " 545 << " density: " << std::setw(6) << std::setprecision(3)571 << " density: " << std::setw(6) << std::setprecision(3) 546 572 << G4BestUnit(material->fDensity,"Volumic Mass") 547 << " RadL: " << std::setw(7) << std::setprecision(3)573 << " RadL: " << std::setw(7) << std::setprecision(3) 548 574 << G4BestUnit(material->fRadlen,"Length") 549 << " Imean: " << std::setw(7) << std::setprecision(3) 575 << " Nucl.Int.Length: " << std::setw(7) << std::setprecision(3) 576 << G4BestUnit(material->fNuclInterLen,"Length") 577 << " Imean: " << std::setw(7) << std::setprecision(3) 550 578 << G4BestUnit(material->GetIonisation()->GetMeanExcitationEnergy(),"Energy"); 579 551 580 if(material->fState == kStateGas) 552 581 flux -
trunk/source/materials/src/G4MaterialPropertiesTable.cc
r822 r850 25 25 // 26 26 // 27 // $Id: G4MaterialPropertiesTable.cc,v 1. 19 2007/04/25 15:46:55gum Exp $28 // GEANT4 tag $Name: $27 // $Id: G4MaterialPropertiesTable.cc,v 1.20 2008/06/05 23:38:34 gum Exp $ 28 // GEANT4 tag $Name: HEAD $ 29 29 // 30 30 // … … 86 86 87 87 void G4MaterialPropertiesTable::AddProperty(const char *key, 88 G4double *Photon Momenta,88 G4double *PhotonEnergies, 89 89 G4double *PropertyValues, 90 90 G4int NumEntries) … … 94 94 95 95 G4MaterialPropertyVector *mpv = 96 new G4MaterialPropertyVector(Photon Momenta,96 new G4MaterialPropertyVector(PhotonEnergies, 97 97 PropertyValues, 98 98 NumEntries); … … 165 165 166 166 void G4MaterialPropertiesTable::AddEntry(const char *key, 167 G4double aPhoton Momentum,167 G4double aPhotonEnergy, 168 168 G4double aPropertyValue) 169 169 … … 174 174 G4MaterialPropertyVector *targetVector=MPT [G4String(key)]; 175 175 if (targetVector != 0) { 176 targetVector->AddElement(aPhoton Momentum, aPropertyValue);176 targetVector->AddElement(aPhotonEnergy, aPropertyValue); 177 177 } 178 178 else { … … 183 183 184 184 void G4MaterialPropertiesTable::RemoveEntry(const char *key, 185 G4double aPhoton Momentum)185 G4double aPhotonEnergy) 186 186 { 187 187 // Allows to remove an entry pair directly from the Material Property Vector … … 190 190 G4MaterialPropertyVector *targetVector=MPT [G4String(key)]; 191 191 if (targetVector) { 192 targetVector->RemoveElement(aPhoton Momentum);192 targetVector->RemoveElement(aPhotonEnergy); 193 193 } 194 194 else { … … 238 238 // fill GROUPVEL vector using RINDEX values 239 239 // rindex built-in "iterator" was advanced to first entry above 240 G4double E0 = rindex->GetPhoton Momentum();240 G4double E0 = rindex->GetPhotonEnergy(); 241 241 G4double n0 = rindex->GetProperty(); 242 242 … … 247 247 // good, we have at least two entries in RINDEX 248 248 // get next energy/value pair 249 G4double E1 = rindex->GetPhoton Momentum();249 G4double E1 = rindex->GetPhotonEnergy(); 250 250 G4double n1 = rindex->GetProperty(); 251 251 … … 268 268 E0 = E1; 269 269 n0 = n1; 270 E1 = rindex->GetPhoton Momentum();270 E1 = rindex->GetPhotonEnergy(); 271 271 n1 = rindex->GetProperty(); 272 272 -
trunk/source/materials/src/G4MaterialPropertyVector.cc
r822 r850 25 25 // 26 26 // 27 // $Id: G4MaterialPropertyVector.cc,v 1.1 5 2006/06/29 19:12:56 gunterExp $28 // GEANT4 tag $Name: $27 // $Id: G4MaterialPropertyVector.cc,v 1.16 2008/06/05 23:38:51 gum Exp $ 28 // GEANT4 tag $Name: HEAD $ 29 29 // 30 30 // … … 98 98 ///////////////// 99 99 100 G4MaterialPropertyVector::G4MaterialPropertyVector(G4double *Photon Momenta,100 G4MaterialPropertyVector::G4MaterialPropertyVector(G4double *PhotonEnergies, 101 101 G4double *PropertyValues, 102 102 G4int NumElements) … … 106 106 107 107 // create a vector filling it with the values 108 // from Photon Momenta[] and PropertyValues[]108 // from PhotonEnergies[] and PropertyValues[] 109 109 110 110 for(G4int i = 0; i < NumElements; i++) { 111 AddElement(Photon Momenta[i], PropertyValues[i]);111 AddElement(PhotonEnergies[i], PropertyValues[i]); 112 112 } 113 113 } … … 141 141 // Methods 142 142 //////////// 143 void G4MaterialPropertyVector::AddElement(G4double aPhoton Momentum,143 void G4MaterialPropertyVector::AddElement(G4double aPhotonEnergy, 144 144 G4double aPropertyValue) 145 145 { 146 146 G4MPVEntry *newElement; 147 147 148 newElement = new G4MPVEntry(aPhoton Momentum, aPropertyValue);148 newElement = new G4MPVEntry(aPhotonEnergy, aPropertyValue); 149 149 MPV.push_back(newElement); 150 150 std::sort(MPV.begin(), MPV.end(), MPVEntry_less()); … … 152 152 } 153 153 154 void G4MaterialPropertyVector::RemoveElement(G4double aPhoton Momentum)154 void G4MaterialPropertyVector::RemoveElement(G4double aPhotonEnergy) 155 155 { 156 156 G4MPVEntry *newElement; 157 157 G4MPVEntry *success=0; 158 158 159 newElement = new G4MPVEntry(aPhoton Momentum, DBL_MAX);159 newElement = new G4MPVEntry(aPhotonEnergy, DBL_MAX); 160 160 161 161 std::vector<G4MPVEntry*>::iterator i; … … 179 179 180 180 G4double 181 G4MaterialPropertyVector::GetProperty(G4double aPhoton Momentum) const181 G4MaterialPropertyVector::GetProperty(G4double aPhotonEnergy) const 182 182 { 183 183 G4MPVEntry *target, *temp; … … 189 189 ///////////////////////// 190 190 191 G4double PMmin = MPV.front()->GetPhoton Momentum();191 G4double PMmin = MPV.front()->GetPhotonEnergy(); 192 192 G4double minProp = MPV.front()->GetProperty(); 193 G4double PMmax = MPV.back() ->GetPhoton Momentum();193 G4double PMmax = MPV.back() ->GetPhotonEnergy(); 194 194 G4double maxProp = MPV.back() ->GetProperty(); 195 195 … … 198 198 /////////////////////////////////////////// 199 199 200 if (aPhoton Momentum< PMmin)200 if (aPhotonEnergy < PMmin) 201 201 { 202 202 G4cout << "\nWarning: G4MaterialPropertyVector::GetProperty"; … … 206 206 } 207 207 208 if (aPhoton Momentum> PMmax)208 if (aPhotonEnergy > PMmax) 209 209 { 210 210 G4cout << "\nWarning: G4MaterialPropertyVector::GetProperty"; … … 214 214 } 215 215 216 target = new G4MPVEntry(aPhoton Momentum, 0.0);216 target = new G4MPVEntry(aPhotonEnergy, 0.0); 217 217 218 218 temp = 0; … … 236 236 ////////////////////////////// 237 237 238 GetAdjacentBins(aPhoton Momentum, &left, &right);239 240 pmleft = MPV[left]->GetPhoton Momentum();241 pmright = MPV[right]->GetPhoton Momentum();242 ratio1 = (aPhoton Momentum-pmleft)/(pmright-pmleft);238 GetAdjacentBins(aPhotonEnergy, &left, &right); 239 240 pmleft = MPV[left]->GetPhotonEnergy(); 241 pmright = MPV[right]->GetPhotonEnergy(); 242 ratio1 = (aPhotonEnergy-pmleft)/(pmright-pmleft); 243 243 ratio2 = 1 - ratio1; 244 244 InterpolatedValue = MPV[left]->GetProperty()*ratio2 + … … 264 264 } 265 265 266 G4double G4MaterialPropertyVector::GetPhoton Momentum() const266 G4double G4MaterialPropertyVector::GetPhotonEnergy() const 267 267 { 268 268 // For use with G4MaterialPropertyVector iterator 269 269 270 270 if(CurrentEntry == -1 || CurrentEntry >= NumEntries) { 271 G4Exception("G4MaterialPropertyVector::GetPhoton Momentum==>"272 "Iterator attempted to Retrieve Photon Momentumout of range");271 G4Exception("G4MaterialPropertyVector::GetPhotonEnergy ==>" 272 "Iterator attempted to Retrieve Photon Energy out of range"); 273 273 return DBL_MAX; 274 274 } 275 275 else { 276 return MPV[CurrentEntry]->GetPhoton Momentum();276 return MPV[CurrentEntry]->GetPhotonEnergy(); 277 277 } 278 278 } 279 279 280 280 G4double 281 G4MaterialPropertyVector::GetPhoton Momentum(G4double aProperty) const281 G4MaterialPropertyVector::GetPhotonEnergy(G4double aProperty) const 282 282 { 283 283 // ***NB*** 284 // Assumes that the property is an increasing function of photon momentum(e.g.284 // Assumes that the property is an increasing function of photon energy (e.g. 285 285 // refraction index) 286 286 // ***NB*** 287 287 // 288 // Returns the photon momentumcorresponding to the property value passed in.289 // If several photon momentumvalues correspond to the value passed in, the290 // function returns the first photon momentumin the vector that corresponds288 // Returns the photon energy corresponding to the property value passed in. 289 // If several photon energy values correspond to the value passed in, the 290 // function returns the first photon energy in the vector that corresponds 291 291 // to that value. 292 292 … … 299 299 300 300 G4double PropMin = MPV.front()->GetProperty(); 301 G4double PMmin = MPV.front()->GetPhoton Momentum();301 G4double PMmin = MPV.front()->GetPhotonEnergy(); 302 302 G4double PropMax = MPV.back() ->GetProperty(); 303 G4double PMmax = MPV.back() ->GetPhoton Momentum();303 G4double PMmax = MPV.back() ->GetPhotonEnergy(); 304 304 305 305 /////////////////////////////////////////// … … 309 309 if (aProperty < PropMin) 310 310 { 311 G4cout << "\nWarning: G4MaterialPropertyVector::GetPhoton Momentum";312 G4cout << "\n==> attempt to Retrieve Photon Momentumout of range"311 G4cout << "\nWarning: G4MaterialPropertyVector::GetPhotonEnergy"; 312 G4cout << "\n==> attempt to Retrieve Photon Energy out of range" 313 313 << G4endl; 314 314 return PMmin; … … 316 316 317 317 if (aProperty > PropMax) { 318 G4cout << "\nWarning: G4MaterialPropertyVector::GetPhoton Momentum";319 G4cout << "\n==> attempt to Retrieve Photon Momentumout of range"318 G4cout << "\nWarning: G4MaterialPropertyVector::GetPhotonEnergy"; 319 G4cout << "\n==> attempt to Retrieve Photon Energy out of range" 320 320 << G4endl; 321 321 return PMmax; … … 335 335 if (MPV[mid]->GetProperty() == aProperty) { 336 336 337 // Get first photon momentumvalue in vector that337 // Get first photon energy value in vector that 338 338 // corresponds to property value 339 339 … … 343 343 } 344 344 345 InterpolatedValue = MPV[mid]->GetPhoton Momentum();346 goto end_GetPhoton Momentum;345 InterpolatedValue = MPV[mid]->GetPhotonEnergy(); 346 goto end_GetPhotonEnergy; 347 347 } 348 348 if (MPV[mid]->GetProperty() < aProperty) … … 357 357 ratio1 = (aProperty - pleft) / (pright - pleft); 358 358 ratio2 = 1 - ratio1; 359 InterpolatedValue = MPV[left]->GetPhoton Momentum()*ratio2 +360 MPV[right]->GetPhoton Momentum()*ratio1;361 362 end_GetPhoton Momentum:359 InterpolatedValue = MPV[left]->GetPhotonEnergy()*ratio2 + 360 MPV[right]->GetPhotonEnergy()*ratio1; 361 362 end_GetPhotonEnergy: 363 363 364 364 return InterpolatedValue; … … 392 392 393 393 void 394 G4MaterialPropertyVector::GetAdjacentBins(G4double aPhoton Momentum,394 G4MaterialPropertyVector::GetAdjacentBins(G4double aPhotonEnergy, 395 395 G4int *left, 396 396 G4int *right) const … … 401 401 *right = (MPV.size() - 1); // was .entries() 402 402 403 // find values in bins on either side of aPhoton Momentum403 // find values in bins on either side of aPhotonEnergy 404 404 405 405 do { 406 406 mid = (*left + *right)/2; 407 407 408 if (MPV[mid]->GetPhoton Momentum() < aPhotonMomentum)408 if (MPV[mid]->GetPhotonEnergy() < aPhotonEnergy) 409 409 { 410 410 *left = mid; -
trunk/source/materials/src/G4NistElementBuilder.cc
r822 r850 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4NistElementBuilder.cc,v 1. 16 2007/07/28 15:58:03vnivanch Exp $27 // GEANT4 tag $Name: $26 // $Id: G4NistElementBuilder.cc,v 1.22 2008/08/11 11:53:11 vnivanch Exp $ 27 // GEANT4 tag $Name: HEAD $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 58 58 #include "G4NistElementBuilder.hh" 59 59 #include "G4Element.hh" 60 #include <sstream> 61 60 62 61 63 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 77 79 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 78 80 81 G4int G4NistElementBuilder::GetZ(const G4String& name) 82 { 83 G4int Z = maxNumElements; 84 do {Z--;} while( Z>0 && elmSymbol[Z] != name); 85 return Z; 86 } 87 88 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 89 79 90 G4Element* G4NistElementBuilder::FindOrBuildElement(const G4String& symb, 80 G4bool buildIsotopes)91 G4bool buildIsotopes) 81 92 { 82 93 if(first) { … … 140 151 for (G4int i=0; i<nc; i++) { 141 152 if (relAbundance[idx + i] > 0.0) { 142 ist = new G4Isotope(elmSymbol[Z],Z, n0 + i, 143 massIsotopes[idx + i]*gram/mole); 153 std::ostringstream os; 154 os << elmSymbol[Z] << n0 + i; 155 ist = new G4Isotope(os.str(), Z, n0 + i, 156 GetAtomicMass(Z, n0 + i)*g/(mole*amu_c2)); 157 /* 158 G4cout << " Z= " << Z << " N= " << n0 + i 159 << " miso(amu)= " << GetIsotopeMass(Z, n0 + i)/amu_c2 160 << " matom(amu)= " << GetAtomicMass(Z, n0 + i)/amu_c2 << G4endl; 161 */ 144 162 iso.push_back(ist); 145 163 } … … 193 211 G4cout << G4endl; 194 212 G4cout << " mass(amu): "; 195 for(j=0; j<nc; j++) {G4cout << massIsotopes[idx + j]<< " ";}213 for(j=0; j<nc; j++) {G4cout << GetAtomicMass(i, n0 + j) << " ";} 196 214 G4cout << G4endl; 197 215 G4cout << " abanbance: "; … … 232 250 G4double www; 233 251 size_t nm = nc; 234 // G4double delm = G4double(Z)*electron_mass_c2/amu_c2;235 252 236 253 for(size_t i=0; i<nm; i++) { 237 254 www = 0.01*(&W)[i]; 238 massIsotopes[index] = (&A)[i]; // - delm; 239 sigMass[index] = (&sA)[i]; 255 // mass of the isotope in G4 units 256 massIsotopes[index] = (&A)[i]*amu_c2 - Z*electron_mass_c2 + bindingEnergy[Z]; 257 sigMass[index] = (&sA)[i]*amu_c2; 240 258 relAbundance[index] = www; 241 259 260 // computation of mean atomic mass of the element in atomic units 242 261 atomicMass[Z] += www*(&A)[i]; 243 262 ww += www; … … 258 277 void G4NistElementBuilder::Initialise() 259 278 { 279 // Parameterisation from D.Lunney,J.M.Pearson,C.Thibault, 280 // Rev.Mod.Phys. 75 (2003) 1021 281 bindingEnergy[0] = 0.0; 282 for(G4int i=1; i<maxNumElements; i++) { 283 G4double Z = G4double(i); 284 bindingEnergy[i] = (14.4381*std::pow(Z,2.39) + 1.55468e-6*std::pow(Z,5.35))*eV; 285 } 286 287 // NIST data 260 288 index = 0; 261 289 … … 266 294 double HA[6] = 267 295 {1.00783, 2.0141, 3.01605, 4.02783, 5.03954, 6.04494}; 296 297 // Garantee consistence with G4 masses 298 HA[0] = (proton_mass_c2 + electron_mass_c2 - bindingEnergy[1])/amu_c2; 299 HA[1] = (1.875613*GeV + electron_mass_c2 - bindingEnergy[1])/amu_c2; 300 HA[2] = (2.80925*GeV + electron_mass_c2 - bindingEnergy[1])/amu_c2; 268 301 269 302 double HS[6] = … … 281 314 double HeA[8] = 282 315 {3.01603, 4.0026, 5.01222, 6.01889, 7.02803, 8.03392, 9.04382, 10.0524}; 316 317 // Garantee consistence with G4 masses 318 HeA[0] = (2.80923*GeV + 2.0*electron_mass_c2 - bindingEnergy[2])/amu_c2; 319 HeA[1] = (3.727417*GeV + 2.0*electron_mass_c2 - bindingEnergy[2])/amu_c2; 283 320 284 321 double HeS[8] = -
trunk/source/materials/src/G4NistManager.cc
r822 r850 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4NistManager.cc,v 1.1 5 2007/12/11 13:32:08 gcosmoExp $27 // GEANT4 tag $Name: geant4-09-01-patch-02$26 // $Id: G4NistManager.cc,v 1.19 2008/07/23 14:49:31 vnivanch Exp $ 27 // GEANT4 tag $Name: HEAD $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 63 63 64 64 G4NistManager* G4NistManager::instance = 0; 65 G4double G4NistManager::POWERZ13[256] = {0};66 G4double G4NistManager::LOGA[256] = {0};67 65 68 66 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... … … 89 87 90 88 messenger = new G4NistMessenger(this); 89 90 // compute frequently used values 91 91 for(G4int i=1; i<256; i++) { 92 92 G4double x = G4double(i); … … 94 94 LOGA[i] = std::log(x); 95 95 } 96 for(G4int j=1; j<101; j++) { 97 G4double A = elmBuilder->GetA(j); 98 POWERA27[j] = std::pow(A,0.27); 99 LOGAZ[j] = std::log(A); 100 } 96 101 POWERZ13[0] = 1.0; 102 POWERA27[0] = 1.0; 97 103 LOGA[0] = 0.0; 104 LOGAZ[0] = 0.0; 98 105 } 99 106 … … 176 183 177 184 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 178 179 G4double G4NistManager::GetZ13(G4double Z)180 {181 G4int iz = G4int(Z);182 G4double x = (Z - G4double(iz))/(3.0*Z);183 if(iz > 255) iz = 255;184 else if(iz < 0) iz = 0;185 return POWERZ13[iz]*(1.0 + x);186 }187 188 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......189 190 G4double G4NistManager::GetLOGA(G4double A)191 {192 G4int ia = G4int(A);193 G4double x = (A - G4double(ia))/A;194 if(ia > 255) ia = 255;195 else if(ia < 0) ia = 0;196 return LOGA[ia] + x;197 }198 199 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/source/materials/src/G4NistMaterialBuilder.cc
r822 r850 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4NistMaterialBuilder.cc,v 1.1 7.2.3 2008/04/28 08:39:03 gcosmoExp $27 // GEANT4 tag $Name: geant4-09-01-patch-02$26 // $Id: G4NistMaterialBuilder.cc,v 1.19 2008/04/28 08:51:29 vnivanch Exp $ 27 // GEANT4 tag $Name: HEAD $ 28 28 // 29 29 // … … 212 212 return 0; 213 213 } 214 215 // add parameters of material into internal vectors 216 // density in g/cm3, mean ionisation potential is not defined 214 217 AddMaterial(name,dens*cm3/g,0,0.,nm,state,temp,pressure); 218 215 219 for (G4int i=0; i<nm; i++) { 216 220 G4int Z = G4int((elmBuilder->FindOrBuildElement(elm[i]))->GetZ()); … … 240 244 return 0; 241 245 } 246 247 // add parameters of material into internal vectors 248 // density in g/cm3, mean ionisation potential is not defined 242 249 AddMaterial(name,dens*cm3/g,0,0.,nm,state,temp,pressure); 250 243 251 for (G4int i=0; i<nm; i++) { 244 252 G4int Z = G4int((elmBuilder->FindOrBuildElement(elm[i]))->GetZ()); … … 418 426 G4double temp, G4double pres) 419 427 { 428 // add parameters of material into internal vectors 429 // density in g/cm3, mean ionisation potential in eV 430 420 431 if (nCurrent != 0) { 421 432 G4cout << "WARNING: G4NistMaterialBuilder::AddMaterial problem: previous " -
trunk/source/materials/src/G4NistMessenger.cc
r822 r850 26 26 // 27 27 // $Id: G4NistMessenger.cc,v 1.4 2007/05/02 10:48:52 vnivanch Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: HEAD $ 29 29 // 30 30 // -
trunk/source/materials/src/G4OpticalSurface.cc
r822 r850 25 25 // 26 26 // 27 // $Id: G4OpticalSurface.cc,v 1.1 0 2006/06/29 19:13:08 gunterExp $28 // GEANT4 tag $Name: $27 // $Id: G4OpticalSurface.cc,v 1.11 2008/07/21 20:55:51 gum Exp $ 28 // GEANT4 tag $Name: HEAD $ 29 29 // 30 30 // … … 104 104 } 105 105 106 G4OpticalSurface::~G4OpticalSurface(){} 106 G4OpticalSurface::~G4OpticalSurface() 107 { 108 Overwrite(); 109 } 107 110 108 111 G4int G4OpticalSurface::operator==(const G4OpticalSurface &right) const -
trunk/source/materials/src/G4SandiaTable.cc
r822 r850 26 26 // 27 27 // $Id: G4SandiaTable.cc,v 1.34 2007/10/02 10:13:33 vnivanch Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: HEAD $ 29 29 // 30 30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo.... -
trunk/source/materials/src/G4SurfaceProperty.cc
r822 r850 25 25 // 26 26 // 27 // $Id: G4SurfaceProperty.cc,v 1. 1 2007/04/25 16:19:26gum Exp $28 // GEANT4 tag $Name: $27 // $Id: G4SurfaceProperty.cc,v 1.4 2008/07/21 20:55:34 gum Exp $ 28 // GEANT4 tag $Name: HEAD $ 29 29 // 30 30 // … … 52 52 53 53 // 54 // Constructor and destructor 55 // 56 G4SurfaceProperty::G4SurfaceProperty( const G4String& name, 57 G4SurfaceType type ) 58 : theName(name), theType(type) 59 { 60 theSurfacePropertyTable.push_back(this); 61 } 62 63 G4SurfaceProperty::~G4SurfaceProperty() 64 { 65 Overwrite(); 66 } 67 68 // 54 69 // Methods 55 70 // … … 67 82 // Dump info for known surface properties 68 83 // 69 void G4SurfaceProperty::Dump Info()84 void G4SurfaceProperty::DumpTableInfo() 70 85 { 71 86 G4cout << "***** Surface Property Table : Nb of Surface Properties = " … … 85 100 void G4SurfaceProperty::CleanSurfacePropertyTable() 86 101 { 87 Dump Info();102 DumpTableInfo(); 88 103 G4SurfacePropertyTable::iterator pos; 89 104 for(pos=theSurfacePropertyTable.begin(); … … 93 108 } 94 109 theSurfacePropertyTable.clear(); 95 Dump Info();110 DumpTableInfo(); 96 111 }
Note:
See TracChangeset
for help on using the changeset viewer.
