Changeset 1058 for trunk/source/materials/include
- Timestamp:
- May 29, 2009, 3:55:14 PM (15 years ago)
- Location:
- trunk/source/materials/include
- Files:
-
- 2 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/materials/include/G4IronStoppingICRU73.hh
r986 r1058 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4IronStoppingICRU73.hh,v 1. 3 2008/11/02 12:22:19 vnivanchExp $27 // GEANT4 tag $Name: geant4-09-0 2-ref-02$26 // $Id: G4IronStoppingICRU73.hh,v 1.4 2009/03/18 10:14:48 alechner Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 29 29 #ifndef G4IronStoppingICRU73_h … … 51 51 52 52 #include "globals.hh" 53 #include "G4VIonDEDXTable.hh" 53 54 #include "G4LPhysicsFreeVector.hh" 54 55 #include <vector> 55 56 56 class G4IronStoppingICRU73 57 58 class G4IronStoppingICRU73 : public G4VIonDEDXTable 57 59 { 58 60 public: … … 62 64 ~G4IronStoppingICRU73(); 63 65 64 G4double GetDEDX(G4int idxMaterial, G4double kinEnergy); 66 G4bool IsApplicable(G4int ionZ, 67 G4int matZ); 65 68 66 inline G4double GetDEDX(const G4String& NameMaterial, G4double kinEnergy); 69 G4bool IsApplicable(G4int ionZ, 70 const G4String& matName); 67 71 68 inline G4int GetMaterialIndex(const G4String& NameMaterial); 72 G4PhysicsVector* GetPhysicsVector(G4int ionZ, 73 G4int matZ); 69 74 70 // Function returns an unique index (>=0) for each ion-material couple (the 71 // return value is -1 if the couple is not found): 72 inline G4int GetIonMaterialCoupleIndex( 73 G4int atomicNumber, // Atomic number of ion 74 const G4String& materialName); // Material name 75 G4PhysicsVector* GetPhysicsVector(G4int ionZ, 76 const G4String& matName); 75 77 76 inline G4double GetDensity(G4int idx); 78 G4double GetDEDX(G4double kinEnergyPerNucleon, 79 G4int ionZ, 80 const G4String& matName); 77 81 78 inline G4String GetMaterialName(G4int idx); 79 80 inline G4PhysicsVector* GetPhysicsVector(G4int idx); 81 82 inline G4PhysicsVector* GetPhysicsVector(const G4String& NameMaterial); 83 84 inline G4double GetLowerEnergyBoundary(); 85 86 inline G4double GetUpperEnergyBoundary(); 82 G4double GetDEDX(G4double kinEnergyPerNucleon, 83 G4int ionZ, 84 G4int matZ); 87 85 88 86 private: 87 // Function for creating a physics vector 88 G4PhysicsVector* CreatePhysicsVector(G4double* energy, 89 G4double* stoppower, 90 G4double factor); 89 91 90 void AddData(G4double* energy, G4double* stoppower, G4double factor); 92 // Assignment operator and copy constructor 93 G4IronStoppingICRU73 & operator=(const G4IronStoppingICRU73 &right); 94 G4IronStoppingICRU73(const G4IronStoppingICRU73&); 91 95 92 void Initialise(); 96 // Flag indicating the use of spline interpolation for dE/dx vectors 97 G4bool spline; 93 98 94 // hide assignment operator95 G4IronStoppingICRU73 & operator=(const G4IronStoppingICRU73 &right);96 G4IronStoppingICRU73(const G4IronStoppingICRU73&);99 // Vectors containing the atomic numbers and names of the materials 100 std::vector<G4int> atomicNumbersMat; 101 std::vector<G4String> namesMat; 97 102 98 G4bool spline; 99 G4String MatName[16]; 100 G4double Density[16]; 103 // Keys (material names) corresponding to created dE/dx vectors 104 std::vector<G4String> dedxKeys; 101 105 102 // Lower and upper energy boundaries for dE/dx vectors:103 G4double lowerEnergyBoundary;104 G4double upperEnergyBoundary;106 // Vector of dE/dx vectors 107 std::vector<G4PhysicsVector*> dedx; 108 }; 105 109 106 std::vector<G4LPhysicsFreeVector*> dedx; 107 }; 110 108 111 109 112 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 110 113 111 inline G4double G4IronStoppingICRU73::GetDEDX(const G4String& NameMaterial,112 G4double kinEnergy)113 {114 return GetDEDX(GetMaterialIndex(NameMaterial), kinEnergy);115 }116 117 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......118 119 inline G4int120 G4IronStoppingICRU73::GetMaterialIndex(const G4String& NameMaterial)121 {122 G4int idx = -1;123 for (G4int idxMaterial=0; idxMaterial<16; idxMaterial++){124 if(MatName[idxMaterial] == NameMaterial) {125 idx = idxMaterial;126 break;127 }128 }129 return idx;130 }131 132 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......133 134 inline G4int135 G4IronStoppingICRU73::GetIonMaterialCoupleIndex(G4int atomicNumber,136 const G4String& materialName)137 {138 G4int idx = -1;139 if(atomicNumber == 26) idx = GetMaterialIndex(materialName);140 return idx;141 }142 143 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......144 145 inline G4double G4IronStoppingICRU73::GetDensity(G4int idxMaterial)146 {147 G4double d = 0.0;148 if( idxMaterial >= 0 && idxMaterial <= 15) d = Density[idxMaterial];149 return d;150 }151 152 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......153 154 inline G4String G4IronStoppingICRU73::GetMaterialName(G4int idxMaterial)155 {156 G4String s = "";157 if( idxMaterial >= 0 && idxMaterial <= 15) s = MatName[idxMaterial];158 return s;159 }160 161 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......162 163 inline164 G4PhysicsVector* G4IronStoppingICRU73::GetPhysicsVector(G4int idxMaterial)165 {166 G4PhysicsVector* v = 0;167 if(idxMaterial >= 0 && idxMaterial <= 15) v = dedx[idxMaterial];168 return v;169 }170 171 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......172 173 inline G4PhysicsVector*174 G4IronStoppingICRU73::GetPhysicsVector(const G4String& NameMaterial)175 {176 return GetPhysicsVector(GetMaterialIndex(NameMaterial));177 }178 179 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......180 181 inline G4double182 G4IronStoppingICRU73::GetLowerEnergyBoundary() {183 184 return lowerEnergyBoundary;185 }186 187 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......188 189 inline G4double190 G4IronStoppingICRU73::GetUpperEnergyBoundary() {191 192 return upperEnergyBoundary;193 }194 195 196 114 #endif 197 115 -
trunk/source/materials/include/G4MPVEntry.hh
r986 r1058 25 25 // 26 26 // 27 // $Id: G4MPVEntry.hh,v 1. 7 2008/06/05 23:36:56 gumExp $28 // GEANT4 tag $Name: geant4-09-0 2-ref-02$27 // $Id: G4MPVEntry.hh,v 1.8 2009/04/21 15:35:45 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // 31 31 //////////////////////////////////////////////////////////////////////// 32 // G4MPVEntry Class Definition33 ////////////////////////////////////////////////////////////////////////34 32 // 35 // File: G4MPVEntry.hh 36 // Description: A G4MPVEntry is an MaterialPropertyVector Entry. 37 // One Material Property Vector contains many MPVEntries 38 // Version: 1.0 39 // Created: 1996-02-08 40 // Author: Juliet Armstrong 33 // Class G4MPVEntry 34 // 35 // Class description: 36 // 37 // A G4MPVEntry is a MaterialPropertyVector Entry. 38 // One Material Property Vector contains many MPVEntries. 39 40 // File: G4MPVEntry.hh 41 // Version: 1.0 42 // Created: 1996-02-08 43 // Author: Juliet Armstrong 41 44 // Updated: 1999-10-29 add method and class descriptors 42 45 // 1997-03-25 by Peter Gumplinger 43 // 46 // > cosmetics (only) 44 47 // mail: gum@triumf.ca 45 48 // … … 56 59 #include "globals.hh" 57 60 58 // Class Description:59 // A G4MPVEntry is an MaterialPropertyVector Entry.60 // One Material Property Vector contains many MPVEntries.61 // Class Description - End:62 63 61 ///////////////////// 64 62 // Class Definition 65 63 ///////////////////// 66 64 67 class G4MPVEntry { 65 class G4MPVEntry 66 { 67 public: // Without description 68 68 69 public: // Without description 69 ////////////// 70 // Operators 71 ////////////// 70 72 71 ////////////// 72 // Operators 73 //////////////G4MPVEntry.hh 74 75 // Well defined semantics for these operators 76 // required by G4RWTPtrSortedVector 73 // Well defined semantics for these operators 74 // required by G4RWTPtrSortedVector 75 // 76 G4bool operator <(const G4MPVEntry &right) const; 77 G4bool operator ==(const G4MPVEntry &right) const; 78 G4MPVEntry& operator =(const G4MPVEntry &right); 77 79 78 G4bool operator <(const G4MPVEntry &right) const; 79 G4bool operator ==(const G4MPVEntry &right) const; 80 G4MPVEntry& operator =(const G4MPVEntry &right); 80 /////////////////////////////// 81 // Constructors and Destructor 82 /////////////////////////////// 81 83 82 /////////////////////////////// 83 // Constructor and Destructor 84 /////////////////////////////// 84 G4MPVEntry(G4double aPhotonEnergy, G4double aPropertyValue); 85 G4MPVEntry(const G4MPVEntry &right); 86 ~G4MPVEntry(); 85 87 86 G4MPVEntry(G4double aPhotonEnergy, G4double aPropertyValue); 88 //////////// 89 // Methods 90 //////////// 87 91 88 G4MPVEntry(const G4MPVEntry &right); 92 G4double GetPhotonEnergy(); 93 G4double GetProperty(); 94 95 ////////// 96 // Tests 97 ////////// 89 98 90 ~G4MPVEntry();99 void DumpEntry(); 91 100 92 //////////// 93 // Methods 94 //////////// 101 private: 95 102 96 G4double GetPhotonEnergy(); 103 ///////////////////////// 104 // Private Data members 105 ///////////////////////// 97 106 98 G4double GetProperty(); 99 100 ////////// 101 // Tests 102 ////////// 103 104 void DumpEntry(); 105 106 private: 107 108 ///////////////////////// 109 // Private Data members 110 ///////////////////////// 111 112 G4double thePhotonEnergy; 113 G4double theProperty; 107 G4double thePhotonEnergy; 108 G4double theProperty; 114 109 }; 115 110 … … 125 120 G4double G4MPVEntry::GetPhotonEnergy() 126 121 { 127 122 return thePhotonEnergy; 128 123 } 129 124 … … 135 130 G4double G4MPVEntry::GetProperty() 136 131 { 137 132 return theProperty; 138 133 } 139 134 -
trunk/source/materials/include/G4MaterialPropertiesTable.hh
r986 r1058 25 25 // 26 26 // 27 // $Id: G4MaterialPropertiesTable.hh,v 1. 19 2008/06/05 23:38:03 gumExp $28 // GEANT4 tag $Name: geant4-09-0 2-ref-02$27 // $Id: G4MaterialPropertiesTable.hh,v 1.20 2009/04/21 15:35:45 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 //31 ////////////////////////////////////////////////////////////////////////32 // G4MaterialPropertiesTable Definition33 30 //////////////////////////////////////////////////////////////////////// 34 31 // 32 // class G4MaterialPropertiesTable 33 // 34 // Class description: 35 // 36 // A Material properties table is a hash table, with 37 // key = property name, and value either G4double or 38 // G4MaterialPropertyVector 39 35 40 // File: G4MaterialPropertiesTable.hh 36 // Description: An Material properties table is a hash table, with37 // key = property name, and value either G4double or38 // G4MaterialPropertyVector39 41 // Version: 1.0 40 42 // Created: 1996-02-08 … … 63 65 #include "G4MaterialPropertyVector.hh" 64 66 65 // Class Description:66 // An Material properties table is a hash table, with key = property67 // name, and value either G4double or G4MaterialPropertyVector.68 // Class Description - End:69 70 67 ///////////////////// 71 68 // Class Definition 72 69 ///////////////////// 73 70 74 class G4MaterialPropertiesTable { 71 class G4MaterialPropertiesTable 72 { 73 public: // Without description 75 74 76 //////////////// 77 // Constructor 78 //////////////// 75 G4MaterialPropertiesTable(); 76 ~G4MaterialPropertiesTable(); 79 77 80 public: // Withoutdescription78 public: // With description 81 79 82 G4MaterialPropertiesTable(); 83 84 /////////////// 85 // Destructor 86 /////////////// 80 inline void AddConstProperty(const char *key, 81 G4double PropertyValue); 82 // Add a new property to the table by giving a key-name and value 87 83 88 public: // Without description 84 inline void AddProperty(const char *key, 85 G4double *PhotonEnergies, 86 G4double *PropertyValues, 87 G4int NumEntries); 88 // Add a new property to the table by giving a key-name and the 89 // arrays x and y of size NumEntries. 89 90 90 ~G4MaterialPropertiesTable(); 91 inline void AddProperty(const char *key, G4MaterialPropertyVector *opv); 92 // Add a new property to the table by giving a key-name and an 93 // already constructed G4MaterialPropertyVector. 91 94 92 //////////// 93 // Methods 94 //////////// 95 inline void RemoveConstProperty(const char *key); 96 // Remove a constant property from the table. 95 97 96 public: // With description 98 inline void RemoveProperty(const char *key); 99 // Remove a property from the table. 97 100 98 void AddConstProperty(const char *key, 99 G4double PropertyValue); 100 // Add a new property to the table by giving a key-name and value 101 inline G4double GetConstProperty(const char *key); 102 // Get the constant property from the table corresponding to the key-name 101 103 102 void AddProperty(const char *key, 103 G4double *PhotonEnergies, 104 G4double *PropertyValues, 105 G4int NumEntries); 106 // Add a new property to the table by giving a key-name and the 107 // arrays x and y of size NumEntries. 104 inline G4bool ConstPropertyExists(const char *key); 105 // Return true if a const property 'key' exists. 108 106 109 void AddProperty(const char *key, G4MaterialPropertyVector *opv); 110 // Add a new property to the table by giving a key-name and an 111 // already constructed G4MaterialPropertyVector. 107 inline G4MaterialPropertyVector* GetProperty(const char *key); 108 // Get the property from the table corresponding to the key-name. 112 109 113 void RemoveConstProperty(const char *key); 114 // Remove a constant property from the table. 110 inline void AddEntry(const char *key, G4double aPhotonEnergy, 111 G4double aPropertyValue); 112 // Add a new entry (pair of numbers) to the table for a given key. 115 113 116 void RemoveProperty(const char *key);117 // Remove a property from the table.114 inline void RemoveEntry(const char *key, G4double aPhotonEnergy); 115 // Remove an entry from the table for a given key and x-value. 118 116 119 G4double GetConstProperty(const char *key); 120 // Get the constant property from the table corresponding to the key-name 117 void DumpTable(); 121 118 122 G4bool ConstPropertyExists(const char *key); 123 // Return true if a const property 'key' exists. 119 public: // without description 124 120 125 G4MaterialPropertyVector* GetProperty(const char *key); 126 // Get the property from the table corresponding to the key-name. 121 const std::map< G4String, G4MaterialPropertyVector*, std::less<G4String> >* 122 GetPropertiesMap() const { return &MPT; } 123 const std::map< G4String, G4double, std::less<G4String> >* 124 GetPropertiesCMap() const { return &MPTC; } 125 // Accessors required for persistency purposes 127 126 128 void AddEntry(const char *key, G4double aPhotonEnergy, 129 G4double aPropertyValue); 130 // Add a new entry (pair of numbers) to the table for a given key. 127 private: 131 128 132 void RemoveEntry(const char *key, G4double aPhotonEnergy); 133 // Remove an entry from the table for a given key and x-value. 129 G4MaterialPropertyVector* SetGROUPVEL(); 134 130 135 void DumpTable(); 131 private: 136 132 137 private: 133 std::map<G4String, G4MaterialPropertyVector*, std::less<G4String> > MPT; 134 typedef std::map< G4String, G4MaterialPropertyVector*, 135 std::less<G4String> >::iterator MPTiterator; 138 136 139 ///////////////////////// 140 // Private Data members 141 ///////////////////////// 142 143 std::map<G4String, G4MaterialPropertyVector*, std::less<G4String> > MPT; 144 typedef std::map<G4String, G4MaterialPropertyVector*, 145 std::less<G4String> >::iterator MPTiterator; 146 147 std::map< G4String, G4double, std::less<G4String> > MPTC; 148 typedef std::map< G4String, G4double, 149 std::less<G4String> >::iterator MPTCiterator; 150 151 G4MaterialPropertyVector* SetGROUPVEL(); 152 137 std::map< G4String, G4double, std::less<G4String> > MPTC; 138 typedef std::map< G4String, G4double, 139 std::less<G4String> >::iterator MPTCiterator; 153 140 }; 154 141 142 ///////////////////// 143 // Inline definitions 144 ///////////////////// 145 146 #include "G4MaterialPropertiesTable.icc" 147 155 148 #endif /* G4MaterialPropertiesTable_h */ -
trunk/source/materials/include/G4MaterialPropertyVector.hh
r986 r1058 25 25 // 26 26 // 27 // $Id: G4MaterialPropertyVector.hh,v 1.1 1 2008/06/05 23:37:37 gumExp $28 // GEANT4 tag $Name: geant4-09-0 2-ref-02$27 // $Id: G4MaterialPropertyVector.hh,v 1.14 2009/04/24 09:35:14 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // 31 31 //////////////////////////////////////////////////////////////////////// 32 // G4MaterialPropertyVector Class Definition33 ////////////////////////////////////////////////////////////////////////34 32 // 33 // class G4MaterialPropertyVector 34 // 35 // Class description: 36 // 37 // A one-to-one mapping from Photon Energy to some optical property 38 35 39 // File: G4MaterialPropertyVector.hh 36 40 // 37 // Description: A one-to-one mapping from Photon Energy to some38 // optical property39 41 // Version: 1.0 40 42 // Created: 1996-02-08 … … 58 60 #include <functional> 59 61 60 // Class Description:61 // A one-to-one mapping from Photon Energy to some optical property.62 // Class Description - End:63 64 62 ///////////////////// 65 63 // Class Definition 66 64 ///////////////////// 67 65 68 class G4MaterialPropertyVector { 66 class G4MaterialPropertyVector 67 { 68 struct MPVEntry_less 69 : public std::binary_function<G4MPVEntry*, G4MPVEntry*, G4bool> 70 { 71 G4bool operator()(G4MPVEntry* x, G4MPVEntry* y) { return *x < *y; } 72 }; 69 73 70 struct MPVEntry_less 71 : public std::binary_function<G4MPVEntry*, G4MPVEntry*, G4bool> 72 { 73 G4bool operator()(G4MPVEntry* x, G4MPVEntry* y) { return *x < *y; } 74 }; 74 public: // Without description 75 75 76 public: // Without description 76 ////////////// 77 // Operators 78 ////////////// 77 79 78 ////////////// 79 // Operators 80 ////////////// 80 inline G4bool operator ++(); 81 G4MaterialPropertyVector& operator =(const G4MaterialPropertyVector &right); 81 82 82 G4bool operator ++(); 83 G4MaterialPropertyVector&84 operator =(const G4MaterialPropertyVector &right);83 ///////////////// 84 // Constructors 85 ///////////////// 85 86 86 ///////////////// 87 // Constructors 88 ///////////////// 87 G4MaterialPropertyVector() : MPV(0) 88 { 89 CurrentEntry = -1; 90 NumEntries = 0; 91 }; 89 92 90 G4MaterialPropertyVector() : MPV(0) 91 { 92 CurrentEntry = -1; 93 NumEntries = 0; 94 }; 93 public: // With description 94 95 G4MaterialPropertyVector(G4double *PhotonEnergies, 96 G4double *PropertyValues, 97 G4int NumElements); 98 // Constructor of G4MaterialPropertyVector object. 95 99 96 public: // With description 97 98 G4MaterialPropertyVector(G4double *PhotonEnergies, 99 G4double *PropertyValues, 100 G4int NumElements); 101 // Constructor of G4MaterialPropertyVector object. 100 inline void ResetIterator(); 101 inline G4int Entries() const; 102 102 103 public: // Without description 103 inline void AddElement(G4double aPhotonEnergy, G4double aPropertyValue); 104 // Add a new element (pair of numbers) to the G4MaterialPropertyVector. 105 void RemoveElement(G4double aPhotonEnergy); 106 // Remove the element with given x-value. 104 107 105 G4MaterialPropertyVector(const G4MaterialPropertyVector &right); 108 G4double GetProperty(G4double aPhotonEnergy) const; 109 // Returns the y-value for given x-value (with interpolation). 110 G4double GetPhotonEnergy(G4double aProperty) const; 111 // Returns the x-value for given y-value (with interpolation). 112 // NOTE: Assumes that the y-value is an increasing function of 113 // the x-value. Returns the x-value corresponding to the 114 // y-value passed in. If several x-values correspond to 115 // the y-value passed in, the method returns the first 116 // x-value in the vector that corresponds to that value. 117 // For use with G4MaterialPropertyVector iterator: return 118 // property (or Photon Energy) at current point of iterator. 106 119 107 /////////////// 108 // Destructor 109 /////////////// 120 inline G4double GetProperty() const; 121 inline G4double GetPhotonEnergy() const; 122 inline G4double GetMaxProperty() const; 123 inline G4double GetMinProperty() const; 124 inline G4double GetMaxPhotonEnergy() const; 125 inline G4double GetMinPhotonEnergy() const; 126 127 public: // Without description 110 128 111 ~G4MaterialPropertyVector(); 129 G4MaterialPropertyVector(const G4MaterialPropertyVector &right); 130 ~G4MaterialPropertyVector(); 112 131 113 ////////////114 // Methods115 ////////////132 ////////// 133 // Tests 134 ////////// 116 135 117 public: // With description 136 void DumpVector(); 118 137 119 void ResetIterator(); 138 ///////////////////// 139 // Helper Functions 140 ///////////////////// 120 141 121 void AddElement(G4double aPhotonEnergy, 122 G4double aPropertyValue); 123 // Add a new element (pair of numbers) to the G4MaterialPropertyVector. 124 void RemoveElement(G4double aPhotonEnergy); 125 // Remove the element with given x-value. 142 inline G4MPVEntry GetEntry(G4int i) const; 126 143 127 G4double GetProperty(G4double aPhotonEnergy) const; 128 // Returns the y-value for given x-value (with interpolation). 129 G4double GetPhotonEnergy(G4double aProperty) const; 130 // Returns the x-value for given y-value (with interpolation). 131 // NOTE: Assumes that the y-value is an increasing function of 132 // the x-value. Returns the x-value corresponding to the 133 // y-value passed in. If several x-values correspond to 134 // the y-value passed in, the method returns the first 135 // x-value in the vector that corresponds to that value. 136 // For use with G4MaterialPropertyVector iterator: return 137 // property (or Photon Energy) at current point of iterator. 144 private: 138 145 139 G4double GetProperty() const; 140 G4double GetPhotonEnergy() const;146 void GetAdjacentBins(G4double aPhotonEnergy, 147 G4int *left, G4int *right) const; 141 148 142 G4double GetMaxProperty() const; 143 G4double GetMinProperty() const; 144 G4double GetMaxPhotonEnergy() const; 145 G4double GetMinPhotonEnergy() const; 146 147 ////////// 148 // Tests 149 ////////// 149 private: 150 150 151 void DumpVector(); 151 ///////////////////////// 152 // Private Data Members 153 ///////////////////////// 152 154 153 private: 154 155 ///////////////////// 156 // Helper Functions 157 ///////////////////// 158 159 G4MPVEntry GetEntry(G4int i) const; 160 161 void GetAdjacentBins(G4double aPhotonEnergy, 162 G4int *left,G4int *right) const; 163 164 ///////////////////////// 165 // Private Data Members 166 ///////////////////////// 167 168 std::vector<G4MPVEntry*> MPV; 169 G4int NumEntries; 170 G4int CurrentEntry; 155 std::vector<G4MPVEntry*> MPV; 156 G4int NumEntries; 157 G4int CurrentEntry; 171 158 }; 172 159 … … 175 162 /////////////////// 176 163 177 inline 178 G4double G4MaterialPropertyVector::GetMaxProperty() const 179 { 180 return MPV.back()->GetProperty(); 181 } 182 183 inline 184 G4double G4MaterialPropertyVector::GetMinProperty() const 185 { 186 return MPV.front()->GetProperty(); 187 } 188 189 inline 190 G4double G4MaterialPropertyVector::GetMaxPhotonEnergy() const 191 { 192 return MPV.back()->GetPhotonEnergy(); 193 } 194 195 inline 196 G4double G4MaterialPropertyVector::GetMinPhotonEnergy() const 197 { 198 return MPV.front()->GetPhotonEnergy(); 199 } 164 #include "G4MaterialPropertyVector.icc" 200 165 201 166 #endif /* G4MaterialPropertyVector_h */ -
trunk/source/materials/include/G4MaterialStoppingICRU73.hh
r986 r1058 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4MaterialStoppingICRU73.hh,v 1. 4 2009/02/19 11:09:22 antoniExp $27 // GEANT4 tag $Name: geant4-09-0 2-ref-02$26 // $Id: G4MaterialStoppingICRU73.hh,v 1.5 2009/03/18 10:14:49 alechner Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 29 29 #ifndef G4MaterialStoppingICRU73_h … … 51 51 52 52 #include "globals.hh" 53 #include "G4VIonDEDXTable.hh" 53 54 #include "G4LPhysicsFreeVector.hh" 54 55 #include <vector> 55 56 56 class G4MaterialStoppingICRU73 57 58 class G4MaterialStoppingICRU73 : public G4VIonDEDXTable 57 59 { 58 60 public: … … 62 64 ~G4MaterialStoppingICRU73(); 63 65 64 G4double GetDEDX(G4int ionZ, G4int idxMaterial, G4double kinEnergy); 66 G4bool IsApplicable(G4int ionZ, 67 const G4String& matName); 65 68 66 inline G4double GetDEDX(G4int ionZ, const G4String& NameMaterial,67 G4double kinEnergy);69 G4bool IsApplicable(G4int ionZ, 70 G4int matZ); 68 71 69 inline G4int GetMaterialIndex(const G4String& NameMaterial); 72 G4PhysicsVector* GetPhysicsVector(G4int ionZ, 73 const G4String& matName); 70 74 71 // Function returns an unique index (>=0) for each ion-material couple (the 72 // return value is -1 if the couple is not found): 73 inline G4int GetIonMaterialCoupleIndex( 74 G4int atomicNumber, // Atomic number of ion 75 const G4String& materialName); // Material name 75 G4PhysicsVector* GetPhysicsVector(G4int ionZ, 76 G4int matZ); 76 77 77 inline G4double GetDensity(G4int idxMaterial); 78 G4double GetDEDX(G4double kinEnergyPerNucleon, 79 G4int ionZ, 80 const G4String& matName); 78 81 79 inline G4String GetMaterialName(G4int idxMaterial); 80 81 inline G4PhysicsVector* GetPhysicsVector(G4int ionZ, G4int idxMaterial); 82 83 inline G4PhysicsVector* GetPhysicsVector(G4int ionZ, 84 const G4String& NameMaterial); 85 86 inline G4double GetLowerEnergyBoundary(); 87 88 inline G4double GetUpperEnergyBoundary(); 82 G4double GetDEDX(G4double kinEnergyPerNucleon, 83 G4int ionZ, 84 G4int matZ); 89 85 90 86 private: 87 // Function for creating a physics vector 88 G4PhysicsVector* CreatePhysicsVector(G4double* energy, 89 G4double* stoppower, 90 G4double factor); 91 91 92 void Initialise(); 93 94 void AddData(G4double* energy, G4double* stoppower, G4double factor); 95 96 // hide assignment operator 97 G4MaterialStoppingICRU73 & operator=(const G4MaterialStoppingICRU73 &right); 92 // Assignment operator and copy constructor 93 G4MaterialStoppingICRU73 & 94 operator=(const G4MaterialStoppingICRU73 &right); 98 95 G4MaterialStoppingICRU73(const G4MaterialStoppingICRU73&); 99 96 100 G4bool spline; 101 G4int Z[16]; 102 G4double A[16]; 103 G4String MatName[31]; 104 G4double Density[31]; 97 // Flag indicating the use of spline interpolation for dE/dx vectors 98 G4bool spline; 105 99 106 // Lower and upper energy boundaries for dE/dx vectors:107 G4 double lowerEnergyBoundary;108 G4 double upperEnergyBoundary;100 // Minimum and maximum atomic number 101 G4int minIonAtomicNmb; 102 G4int maxIonAtomicNmb; 109 103 110 std::vector<G4LPhysicsFreeVector*> dedx; 104 // Vector containing the names of the materials 105 std::vector<G4String> namesMat; 106 107 // Keys (ion atomic number and material names) corresponding to created 108 // dE/dx vectors 109 typedef std::pair<G4int, G4String> DEDXKey; 110 std::vector<DEDXKey> dedxKeys; 111 112 // Vector of dE/dx vectors 113 std::vector<G4PhysicsVector*> dedx; 111 114 }; 115 112 116 113 117 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 114 118 115 inline G4double116 G4MaterialStoppingICRU73::GetDEDX(G4int ionZ, const G4String& NameMaterial,117 G4double kinEnergy)118 {119 return GetDEDX(ionZ, GetMaterialIndex(NameMaterial), kinEnergy);120 }121 122 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......123 124 inline G4int125 G4MaterialStoppingICRU73::GetMaterialIndex(const G4String& NameMaterial)126 {127 G4int idx = -1;128 for (G4int i=0; i<31; i++){129 if(MatName[i] == NameMaterial) {130 idx = i;131 break;132 }133 }134 return idx;135 }136 137 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......138 139 inline G4int140 G4MaterialStoppingICRU73::GetIonMaterialCoupleIndex(141 G4int atomicNumber,142 const G4String& materialName)143 {144 G4int idx = -1;145 if(atomicNumber >= 3 && atomicNumber <= 18) {146 147 G4int materialIndex = GetMaterialIndex(materialName);148 if(materialIndex >= 0) idx = materialIndex * 16 + atomicNumber - 3;149 }150 151 return idx;152 }153 154 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......155 156 inline G4double157 G4MaterialStoppingICRU73::GetDensity(G4int idxMaterial)158 {159 G4double d = 0.0;160 if( idxMaterial >= 0 && idxMaterial <= 30) d = Density[idxMaterial];161 return d;162 }163 164 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......165 166 inline167 G4String G4MaterialStoppingICRU73::GetMaterialName(G4int idxMaterial)168 {169 G4String s = "";170 if( idxMaterial >= 0 && idxMaterial <= 30) s = MatName[idxMaterial];171 return s;172 }173 174 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......175 176 inline G4PhysicsVector*177 G4MaterialStoppingICRU73::GetPhysicsVector(G4int ionZ, G4int idxMaterial)178 {179 G4PhysicsVector* v = 0;180 if(ionZ >= 3 && ionZ <= 18 && idxMaterial >= 0 && idxMaterial <= 30) {181 v = dedx[idxMaterial*16 + ionZ - 3];182 }183 return v;184 }185 186 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......187 188 inline G4PhysicsVector*189 G4MaterialStoppingICRU73::GetPhysicsVector(G4int ionZ,190 const G4String& NameMaterial)191 {192 return GetPhysicsVector(ionZ, GetMaterialIndex(NameMaterial));193 }194 195 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......196 197 inline G4double198 G4MaterialStoppingICRU73::GetLowerEnergyBoundary() {199 200 return lowerEnergyBoundary;201 }202 203 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......204 205 inline G4double206 G4MaterialStoppingICRU73::GetUpperEnergyBoundary() {207 208 return upperEnergyBoundary;209 }210 211 119 #endif -
trunk/source/materials/include/G4OpticalSurface.hh
r986 r1058 25 25 // 26 26 // 27 // $Id: G4OpticalSurface.hh,v 1.1 1 2008/12/11 10:23:54gcosmo Exp $28 // GEANT4 tag $Name: geant4-09-0 2-ref-02$27 // $Id: G4OpticalSurface.hh,v 1.12 2009/04/21 15:35:45 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // … … 83 83 class G4OpticalSurface : public G4SurfaceProperty 84 84 { 85 public: // With description 85 86 86 public: // With description 87 //////////////////////////////// 88 // Constructor 89 //////////////////////////////// 87 90 88 //////////////////////////////// 89 // Constructor 90 //////////////////////////////// 91 G4OpticalSurface(const G4String& name, 92 G4OpticalSurfaceModel model = glisur, 93 G4OpticalSurfaceFinish finish = polished, 94 G4SurfaceType type = dielectric_dielectric, 95 G4double value = 1.0); 96 // Constructor of an optical surface object. 91 97 92 G4OpticalSurface(const G4String& name, 93 G4OpticalSurfaceModel model = glisur, 94 G4OpticalSurfaceFinish finish = polished, 95 G4SurfaceType type = dielectric_dielectric, 96 G4double value = 1.0); 97 // Constructor of an optical surface object. 98 public: // Without description 98 99 99 public: // Without description 100 ////////////// 101 // Constructors and destructor 102 ////////////// 100 103 101 ////////////// 102 // Constructors and destructor 103 ////////////// 104 G4OpticalSurface(); 105 virtual ~G4OpticalSurface(); 106 G4OpticalSurface(const G4OpticalSurface &right); 107 108 ////////////// 109 // Operators 110 ////////////// 111 112 const G4OpticalSurface & operator=(const G4OpticalSurface &right); 113 114 G4int operator==(const G4OpticalSurface &right) const; 115 G4int operator!=(const G4OpticalSurface &right) const; 104 116 105 G4OpticalSurface(); 106 virtual ~G4OpticalSurface(); 107 G4OpticalSurface(const G4OpticalSurface &right); 108 109 ////////////// 110 // Operators 111 ////////////// 112 113 const G4OpticalSurface & operator=(const G4OpticalSurface &right); 114 115 G4int operator==(const G4OpticalSurface &right) const; 116 G4int operator!=(const G4OpticalSurface &right) const; 117 //////////// 118 // Methods 119 //////////// 117 120 118 //////////// 119 // Methods 120 //////////// 121 public: // With description 121 122 122 public: // With description 123 const G4OpticalSurfaceFinish& GetFinish() const { return theFinish; } 124 // Returns the optical surface finish. 125 void SetFinish(const G4OpticalSurfaceFinish& finish) { theFinish = finish; } 126 // Sets the optical surface finish. 123 127 124 G4OpticalSurfaceFinish GetFinish() const {return theFinish;}; 125 // Returns the optical surface finish. 126 void SetFinish(const G4OpticalSurfaceFinish finish) 127 {theFinish = finish;}; 128 // Sets the optical surface finish. 128 const G4OpticalSurfaceModel& GetModel() const { return theModel; } 129 // Returns the optical surface model used. 130 void SetModel(const G4OpticalSurfaceModel& model) { theModel = model; } 131 // Sets the optical surface model to be followed. 129 132 130 G4OpticalSurfaceModel GetModel() const {return theModel;}; 131 // Returns the optical surface model used. 132 void SetModel(const G4OpticalSurfaceModel model) 133 {theModel = model;}; 134 // Sets the optical surface model to be followed. 133 G4double GetSigmaAlpha() const { return sigma_alpha; } 134 // Returns an unified model surface parameter. 135 void SetSigmaAlpha(const G4double s_a) { sigma_alpha = s_a; } 136 // Sets an unified model surface parameter. 135 137 136 G4double GetSigmaAlpha() const {return sigma_alpha;}; 137 // Returns an unified model surface parameter. 138 void SetSigmaAlpha(const G4double s_a) 139 {sigma_alpha = s_a;}; 140 // Sets an unified model surface parameter. 138 G4double GetPolish() const { return polish; } 139 // Returns the optical surface polish type. 140 void SetPolish(const G4double plsh) { polish=plsh; } 141 // Sets the optical surface polish type. 141 142 142 G4double GetPolish() const {return polish;}; 143 // Returns the optical surface polish type.144 void SetPolish(const G4double plsh) {polish=plsh;}; 145 // Sets the optical surface polish type.143 G4MaterialPropertiesTable* GetMaterialPropertiesTable() const 144 { return theMaterialPropertiesTable; } 145 // Retrieves the pointer of the G4MaterialPropertiesTable 146 // attached to optical surface. 146 147 147 G4MaterialPropertiesTable* GetMaterialPropertiesTable() const 148 { return theMaterialPropertiesTable;}; 149 // Retrieves the pointer of the G4MaterialPropertiesTable 150 // attached to optical surface. 148 void SetMaterialPropertiesTable(G4MaterialPropertiesTable *anMPT) 149 { theMaterialPropertiesTable = anMPT; } 150 // Attaches a G4MaterialPropertiesTable to the optical surface. 151 151 152 void SetMaterialPropertiesTable(G4MaterialPropertiesTable *anMPT) 153 { theMaterialPropertiesTable = anMPT;}; 154 // Attaches a G4MaterialPropertiesTable to the optical surface. 152 void DumpInfo() const; 153 // Prints information about the optical surface. 155 154 156 void DumpInfo() const; 157 // Prints information about the optical surface. 155 private: 158 156 159 private: 157 // ------------------ 158 // Basic data members ( To define an optical surface) 159 // ------------------ 160 160 161 // ------------------ 162 // Basic data members ( To define an optical surface) 163 // ------------------ 161 G4OpticalSurfaceModel theModel; // Surface model 162 G4OpticalSurfaceFinish theFinish; // Surface finish 164 163 165 G4OpticalSurfaceModel theModel; // Surface model166 G4OpticalSurfaceFinish theFinish; // Surface finish164 G4double sigma_alpha; // The sigma of micro-facet polar angle 165 G4double polish; // Polish parameter in glisur model 167 166 168 G4double sigma_alpha; // The sigma of micro-facet polar angle 169 G4double polish; // Polish parameter in glisur model 170 171 G4MaterialPropertiesTable* theMaterialPropertiesTable; 172 167 G4MaterialPropertiesTable* theMaterialPropertiesTable; 173 168 }; 174 169 175 ////////////////////176 // Inline methods177 ////////////////////178 179 170 #endif /* G4OpticalSurface_h */ -
trunk/source/materials/include/G4SimpleMaterialStoppingICRU73.hh
r986 r1058 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4SimpleMaterialStoppingICRU73.hh,v 1. 5 2009/02/19 12:19:53 vnivanchExp $27 // GEANT4 tag $Name: geant4-09-0 2-ref-02$26 // $Id: G4SimpleMaterialStoppingICRU73.hh,v 1.6 2009/03/18 10:14:49 alechner Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 28 29 29 #ifndef G4SimpleMaterialStoppingICRU73_h … … 51 51 52 52 #include "globals.hh" 53 #include "G4VIonDEDXTable.hh" 53 54 #include "G4LPhysicsFreeVector.hh" 54 55 #include <vector> 56 #include <utility> 57 #include <map> 55 58 56 class G4SimpleMaterialStoppingICRU73 59 60 class G4SimpleMaterialStoppingICRU73 : public G4VIonDEDXTable 57 61 { 58 62 public: … … 62 66 ~G4SimpleMaterialStoppingICRU73(); 63 67 64 G4double GetDEDX(G4int ionZ, G4int idxMaterial, G4double kinEnergy); 68 G4bool IsApplicable(G4int ionZ, 69 G4int matZ); 65 70 66 inline G4double GetDEDX(G4int ionZ, const G4String& NameMaterial,67 G4double kinEnergy);71 G4bool IsApplicable(G4int ionZ, 72 const G4String& matName); 68 73 69 inline G4int GetMaterialIndex(const G4String& NameMaterial); 74 G4PhysicsVector* GetPhysicsVector(G4int ionZ, 75 G4int matZ); 70 76 71 // Function returns an unique index (>=0) for each ion-material couple (the 72 // return value is -1 if the couple is not found): 73 inline G4int GetIonMaterialCoupleIndex( 74 G4int atomicNumber, // Atomic number of ion 75 const G4String& materialName); // Material name 77 G4PhysicsVector* GetPhysicsVector(G4int ionZ, 78 const G4String& matName); 76 79 77 inline G4double GetDensity(G4int idxMaterial); 80 G4double GetDEDX(G4double kinEnergyPerNucleon, 81 G4int ionZ, 82 const G4String& matName); 78 83 79 inline G4String GetMaterialName(G4int idxMaterial); 80 81 inline G4PhysicsVector* GetPhysicsVector(G4int ionZ, G4int idxMaterial); 82 83 inline G4PhysicsVector* GetPhysicsVector(G4int ionZ, 84 const G4String& NameMaterial); 85 86 inline G4double GetLowerEnergyBoundary(); 87 88 inline G4double GetUpperEnergyBoundary(); 84 G4double GetDEDX(G4double kinEnergyPerNucleon, 85 G4int ionZ, 86 G4int matZ); 89 87 90 88 private: 89 // Function for creating a physics vector 90 G4PhysicsVector* CreatePhysicsVector(G4double* energy, 91 G4double* stoppower, 92 G4double factor); 91 93 92 void Initialise(); 93 94 void AddData(G4double* energy, G4double* stoppower, G4double factor); 95 96 // hide assignment operator 97 G4SimpleMaterialStoppingICRU73 & operator=(const G4SimpleMaterialStoppingICRU73 &right); 94 // Assignment operator and copy constructor 95 G4SimpleMaterialStoppingICRU73 & 96 operator=(const G4SimpleMaterialStoppingICRU73 &right); 98 97 G4SimpleMaterialStoppingICRU73(const G4SimpleMaterialStoppingICRU73&); 99 98 100 G4bool spline; 101 G4int Z[16]; 102 G4double A[16]; 103 G4String MatName[25]; 104 G4double Density[25]; 99 // Flag indicating the use of spline interpolation for dE/dx vectors 100 G4bool spline; 105 101 106 // Lower and upper energy boundaries for dE/dx vectors:107 G4 double lowerEnergyBoundary;108 G4 double upperEnergyBoundary;102 // Minimum and maximum atomic number 103 G4int minIonAtomicNmb; 104 G4int maxIonAtomicNmb; 109 105 110 std::vector<G4LPhysicsFreeVector*> dedx; 106 // Vectors containing the atomic numbers and names of the materials 107 std::vector<G4int> atomicNumbersMat; 108 std::vector<G4String> namesMat; 109 110 // Keys (ion atomic number and material names) corresponding to created 111 // dE/dx vectors 112 typedef std::pair<G4int, G4String> DEDXKey; 113 std::vector<DEDXKey> dedxKeys; 114 115 // Vector of dE/dx vectors 116 std::vector<G4PhysicsVector*> dedx; 111 117 }; 118 112 119 113 120 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 114 121 115 inline G4double116 G4SimpleMaterialStoppingICRU73::GetDEDX(G4int ionZ, const G4String& NameMaterial,117 G4double kinEnergy)118 {119 return GetDEDX(ionZ, GetMaterialIndex(NameMaterial), kinEnergy);120 }121 122 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......123 124 inline G4int125 G4SimpleMaterialStoppingICRU73::GetMaterialIndex(const G4String& NameMaterial)126 {127 G4int idx = -1;128 for (G4int i=0; i<25; i++){129 if(MatName[i] == NameMaterial) {130 idx = i;131 break;132 }133 }134 return idx;135 }136 137 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......138 139 inline G4int140 G4SimpleMaterialStoppingICRU73::GetIonMaterialCoupleIndex(141 G4int atomicNumber,142 const G4String& materialName)143 {144 G4int idx = -1;145 if(atomicNumber >= 3 && atomicNumber <= 18) {146 147 G4int materialIndex = GetMaterialIndex(materialName);148 if(materialIndex >= 0) idx = materialIndex * 16 + atomicNumber - 3;149 }150 151 return idx;152 }153 154 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......155 156 inline G4double157 G4SimpleMaterialStoppingICRU73::GetDensity(G4int idxMaterial)158 {159 G4double d = 0.0;160 if( idxMaterial >= 0 && idxMaterial <= 24) d = Density[idxMaterial];161 return d;162 }163 164 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......165 166 inline167 G4String G4SimpleMaterialStoppingICRU73::GetMaterialName(G4int idxMaterial)168 {169 G4String s = "";170 if( idxMaterial >= 0 && idxMaterial <= 24) s = MatName[idxMaterial];171 return s;172 }173 174 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......175 176 inline G4PhysicsVector*177 G4SimpleMaterialStoppingICRU73::GetPhysicsVector(G4int ionZ, G4int idxMaterial)178 {179 G4PhysicsVector* v = 0;180 if(ionZ >= 3 && ionZ <= 18 && idxMaterial >= 0 && idxMaterial <= 24) {181 v = dedx[idxMaterial*16 + ionZ - 3];182 }183 return v;184 }185 186 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......187 188 inline G4PhysicsVector*189 G4SimpleMaterialStoppingICRU73::GetPhysicsVector(G4int ionZ,190 const G4String& NameMaterial)191 {192 return GetPhysicsVector(ionZ, GetMaterialIndex(NameMaterial));193 }194 195 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......196 197 inline G4double198 G4SimpleMaterialStoppingICRU73::GetLowerEnergyBoundary() {199 200 return lowerEnergyBoundary;201 }202 203 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......204 205 inline G4double206 G4SimpleMaterialStoppingICRU73::GetUpperEnergyBoundary() {207 208 return upperEnergyBoundary;209 }210 211 212 122 #endif -
trunk/source/materials/include/G4SurfaceProperty.hh
r986 r1058 25 25 // 26 26 // 27 // $Id: G4SurfaceProperty.hh,v 1. 8 2008/12/11 10:23:54gcosmo Exp $28 // GEANT4 tag $Name: geant4-09-0 2-ref-02$27 // $Id: G4SurfaceProperty.hh,v 1.9 2009/04/21 15:35:45 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 29 29 // 30 30 // … … 78 78 class G4SurfaceProperty 79 79 { 80 public: // Without description 80 81 81 public: // Without description 82 ////////////// 83 // Operators 84 ////////////// 82 85 83 ////////////// 84 // Operators 85 ////////////// 86 // G4SurfaceProperty(const G4SurfaceProperty &right); 87 // const G4SurfaceProperty & operator=(const G4SurfaceProperty &right); 86 88 87 // G4SurfaceProperty(const G4SurfaceProperty &right);88 // const G4SurfaceProperty & operator=(const G4SurfaceProperty &right);89 // G4int operator==(const G4SurfaceProperty &right) const; 90 // G4int operator!=(const G4SurfaceProperty &right) const; 89 91 90 // G4int operator==(const G4SurfaceProperty &right) const; 91 // G4int operator!=(const G4SurfaceProperty &right) const; 92 public: // With description 92 93 93 public: // With description 94 //////////////////////////////// 95 // Constructors and Destructor 96 //////////////////////////////// 94 97 95 //////////////////////////////// 96 // Constructors and Destructor 97 //////////////////////////////// 98 G4SurfaceProperty(const G4String& name, G4SurfaceType type = x_ray); 99 // Constructor of a X-ray optical surface object. 98 100 99 G4SurfaceProperty(const G4String& name, G4SurfaceType type = x_ray); 100 // Constructor of a X-ray optical surface object. 101 public: // Without description 101 102 102 public: // Without description 103 G4SurfaceProperty(); 104 virtual ~G4SurfaceProperty(); 103 105 104 G4SurfaceProperty(); 105 virtual ~G4SurfaceProperty(); 106 //////////// 107 // Methods 108 //////////// 106 109 107 //////////// 108 // Methods 109 //////////// 110 public: // With description 110 111 111 // public methods 112 const G4String& GetName() const { return theName; } 113 // Returns the surface name. 114 void SetName(const G4String& name) { theName = name; } 115 // Sets the surface name. 112 116 113 public: // With description 117 const G4SurfaceType& GetType() const { return theType; } 118 // Returns the surface type. 119 void SetType(const G4SurfaceType& type) { theType = type; } 120 // Sets the surface type. 114 121 115 G4String GetName() const { return theName; }; 116 // Returns the surface name. 117 void SetName(const G4String& name){theName = name;}; 118 // Sets the surface name. 122 static void CleanSurfacePropertyTable(); 123 static const G4SurfacePropertyTable* GetSurfacePropertyTable(); 124 static size_t GetNumberOfSurfaceProperties(); 125 static void DumpTableInfo(); 126 // To handle the table of surface properties. 119 127 120 G4SurfaceType GetType() const {return theType;}; 121 // Returns the surface type. 122 void SetType(const G4SurfaceType type){theType = type;}; 123 // Sets the surface type. 128 protected: 124 129 125 static void CleanSurfacePropertyTable(); 126 static const G4SurfacePropertyTable* GetSurfacePropertyTable(); 127 static size_t GetNumberOfSurfaceProperties(); 128 static void DumpTableInfo(); 129 // To handle the table of surface properties. 130 // ------------------ 131 // Basic data members ( To define surface property) 132 // ------------------ 130 133 131 protected: 134 G4String theName; // Surface name 132 135 133 // ------------------ 134 // Basic data members ( To define surface property) 135 // ------------------ 136 G4SurfaceType theType; // Surface type 136 137 137 G4String theName; // Surface name 138 139 G4SurfaceType theType; // Surface type 140 141 static G4SurfacePropertyTable theSurfacePropertyTable; 142 // The static Table of SurfaceProperties. 138 static G4SurfacePropertyTable theSurfacePropertyTable; 139 // The static Table of SurfaceProperties. 143 140 }; 144 141 145 ////////////////////146 // Inline methods147 ////////////////////148 149 142 #endif /* G4SurfaceProperty_h */
Note: See TracChangeset
for help on using the changeset viewer.