[822] | 1 | // |
---|
| 2 | // ******************************************************************** |
---|
| 3 | // * License and Disclaimer * |
---|
| 4 | // * * |
---|
| 5 | // * The Geant4 software is copyright of the Copyright Holders of * |
---|
| 6 | // * the Geant4 Collaboration. It is provided under the terms and * |
---|
| 7 | // * conditions of the Geant4 Software License, included in the file * |
---|
| 8 | // * LICENSE and available at http://cern.ch/geant4/license . These * |
---|
| 9 | // * include a list of copyright holders. * |
---|
| 10 | // * * |
---|
| 11 | // * Neither the authors of this software system, nor their employing * |
---|
| 12 | // * institutes,nor the agencies providing financial support for this * |
---|
| 13 | // * work make any representation or warranty, express or implied, * |
---|
| 14 | // * regarding this software system or assume any liability for its * |
---|
| 15 | // * use. Please see the license in the file LICENSE and URL above * |
---|
| 16 | // * for the full disclaimer and the limitation of liability. * |
---|
| 17 | // * * |
---|
| 18 | // * This code implementation is the result of the scientific and * |
---|
| 19 | // * technical work of the GEANT4 collaboration. * |
---|
| 20 | // * By using, copying, modifying or distributing the software (or * |
---|
| 21 | // * any work based on the software) you agree to acknowledge its * |
---|
| 22 | // * use in resulting scientific publications, and indicate your * |
---|
| 23 | // * acceptance of all terms of the Geant4 Software license. * |
---|
| 24 | // ******************************************************************** |
---|
| 25 | // |
---|
| 26 | // |
---|
[850] | 27 | // $Id: G4OpticalSurface.hh,v 1.10 2008/07/21 20:54:57 gum Exp $ |
---|
| 28 | // GEANT4 tag $Name: HEAD $ |
---|
[822] | 29 | // |
---|
| 30 | // |
---|
| 31 | //////////////////////////////////////////////////////////////////////// |
---|
| 32 | // G4OpticalSurface Definition |
---|
| 33 | //////////////////////////////////////////////////////////////////////// |
---|
| 34 | // |
---|
| 35 | // File: G4OpticalSurface.hh |
---|
| 36 | // Description: A optical surface class for use in G4OpBoundaryProcess |
---|
| 37 | // Version: 2.0 |
---|
| 38 | // Created: 1997-06-26 |
---|
| 39 | // Author: Peter Gumplinger |
---|
| 40 | // Updated: 1999-10-29 add method and class descriptors |
---|
| 41 | // mail: gum@triumf.ca |
---|
| 42 | // |
---|
| 43 | //////////////////////////////////////////////////////////////////////// |
---|
| 44 | |
---|
| 45 | #ifndef G4OpticalSurface_h |
---|
| 46 | #define G4OpticalSurface_h 1 |
---|
| 47 | |
---|
| 48 | ///////////// |
---|
| 49 | // Includes |
---|
| 50 | ///////////// |
---|
| 51 | |
---|
| 52 | #include "G4Types.hh" |
---|
| 53 | #include "G4SurfaceProperty.hh" |
---|
| 54 | |
---|
| 55 | // Class Description: |
---|
| 56 | // A optical surface class for use in the G4OpBoundaryProcess class. |
---|
| 57 | // Contains the enumerations: G4OpticalSurfaceFinish, G4OpticalSurfaceType, |
---|
| 58 | // and G4OpticalSurfaceModel. |
---|
| 59 | // Class Description - End: |
---|
| 60 | |
---|
| 61 | enum G4OpticalSurfaceFinish |
---|
| 62 | { |
---|
| 63 | polished, // smooth perfectly polished surface |
---|
| 64 | polishedfrontpainted, // smooth top-layer (front) paint |
---|
| 65 | polishedbackpainted, // same is 'polished' but with a back-paint |
---|
| 66 | ground, // rough surface |
---|
| 67 | groundfrontpainted, // rough top-layer (front) paint |
---|
| 68 | groundbackpainted // same as 'ground' but with a back-paint |
---|
| 69 | }; |
---|
| 70 | |
---|
| 71 | enum G4OpticalSurfaceModel |
---|
| 72 | { |
---|
| 73 | glisur, // original GEANT3 model |
---|
| 74 | unified // UNIFIED model |
---|
| 75 | }; |
---|
| 76 | |
---|
| 77 | class G4MaterialPropertiesTable; |
---|
| 78 | |
---|
| 79 | ///////////////////// |
---|
| 80 | // Class Definition |
---|
| 81 | ///////////////////// |
---|
| 82 | |
---|
| 83 | class G4OpticalSurface : public G4SurfaceProperty |
---|
| 84 | { |
---|
| 85 | |
---|
| 86 | public: // Without description |
---|
| 87 | |
---|
| 88 | ////////////// |
---|
| 89 | // Operators |
---|
| 90 | ////////////// |
---|
| 91 | |
---|
| 92 | G4OpticalSurface(const G4OpticalSurface &right); |
---|
| 93 | const G4OpticalSurface & operator=(const G4OpticalSurface &right); |
---|
| 94 | |
---|
| 95 | G4int operator==(const G4OpticalSurface &right) const; |
---|
| 96 | G4int operator!=(const G4OpticalSurface &right) const; |
---|
| 97 | |
---|
| 98 | public: // With description |
---|
| 99 | |
---|
| 100 | //////////////////////////////// |
---|
| 101 | // Constructors and Destructor |
---|
| 102 | //////////////////////////////// |
---|
| 103 | |
---|
| 104 | G4OpticalSurface(const G4String& name, |
---|
| 105 | G4OpticalSurfaceModel model = glisur, |
---|
| 106 | G4OpticalSurfaceFinish finish = polished, |
---|
| 107 | G4SurfaceType type = dielectric_dielectric, |
---|
| 108 | G4double value = 1.0); |
---|
| 109 | // Constructor of an optical surface object. |
---|
| 110 | |
---|
| 111 | public: // Without description |
---|
| 112 | |
---|
[850] | 113 | virtual ~G4OpticalSurface(); |
---|
[822] | 114 | |
---|
| 115 | //////////// |
---|
| 116 | // Methods |
---|
| 117 | //////////// |
---|
| 118 | |
---|
| 119 | // public methods |
---|
| 120 | |
---|
| 121 | public: // With description |
---|
| 122 | |
---|
[850] | 123 | virtual void Overwrite() {G4cout << "G4OpticalSurface" << G4endl;}; |
---|
| 124 | |
---|
[822] | 125 | G4OpticalSurfaceFinish GetFinish() const {return theFinish;}; |
---|
| 126 | // Returns the optical surface finish. |
---|
| 127 | void SetFinish(const G4OpticalSurfaceFinish finish) |
---|
| 128 | {theFinish = finish;}; |
---|
| 129 | // Sets the optical surface finish. |
---|
| 130 | |
---|
| 131 | G4OpticalSurfaceModel GetModel() const {return theModel;}; |
---|
| 132 | // Returns the optical surface model used. |
---|
| 133 | void SetModel(const G4OpticalSurfaceModel model) |
---|
| 134 | {theModel = model;}; |
---|
| 135 | // Sets the optical surface model to be followed. |
---|
| 136 | |
---|
| 137 | G4double GetSigmaAlpha() const {return sigma_alpha;}; |
---|
| 138 | // Returns an unified model surface parameter. |
---|
| 139 | void SetSigmaAlpha(const G4double s_a) |
---|
| 140 | {sigma_alpha = s_a;}; |
---|
| 141 | // Sets an unified model surface parameter. |
---|
| 142 | |
---|
| 143 | G4double GetPolish() const {return polish;}; |
---|
| 144 | // Returns the optical surface polish type. |
---|
| 145 | void SetPolish(const G4double plsh) {polish=plsh;}; |
---|
| 146 | // Sets the optical surface polish type. |
---|
| 147 | |
---|
| 148 | G4MaterialPropertiesTable* GetMaterialPropertiesTable() const |
---|
| 149 | { return theMaterialPropertiesTable;}; |
---|
| 150 | // Retrieves the pointer of the G4MaterialPropertiesTable |
---|
| 151 | // attached to optical surface. |
---|
| 152 | |
---|
| 153 | void SetMaterialPropertiesTable(G4MaterialPropertiesTable *anMPT) |
---|
| 154 | { theMaterialPropertiesTable = anMPT;}; |
---|
| 155 | // Attaches a G4MaterialPropertiesTable to the optical surface. |
---|
| 156 | |
---|
| 157 | void DumpInfo() const; |
---|
| 158 | // Prints information about the optical surface. |
---|
| 159 | |
---|
| 160 | private: |
---|
| 161 | |
---|
| 162 | // ------------------ |
---|
| 163 | // Basic data members ( To define an optical surface) |
---|
| 164 | // ------------------ |
---|
| 165 | |
---|
| 166 | G4OpticalSurfaceModel theModel; // Surface model |
---|
| 167 | G4OpticalSurfaceFinish theFinish; // Surface finish |
---|
| 168 | |
---|
| 169 | G4double sigma_alpha; // The sigma of micro-facet polar angle |
---|
| 170 | G4double polish; // Polish parameter in glisur model |
---|
| 171 | |
---|
| 172 | G4MaterialPropertiesTable* theMaterialPropertiesTable; |
---|
| 173 | |
---|
| 174 | }; |
---|
| 175 | |
---|
| 176 | //////////////////// |
---|
| 177 | // Inline methods |
---|
| 178 | //////////////////// |
---|
| 179 | |
---|
| 180 | #endif /* G4OpticalSurface_h */ |
---|