Geant4  10.03
G4OpticalSurface.hh
Go to the documentation of this file.
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 //
27 // $Id: G4OpticalSurface.hh 80747 2014-05-09 12:53:43Z gcosmo $
28 //
29 //
31 // G4OpticalSurface Definition
33 //
34 // File: G4OpticalSurface.hh
35 // Description: A optical surface class for use in G4OpBoundaryProcess
36 // Version: 2.0
37 // Created: 1997-06-26
38 // Author: Peter Gumplinger
39 // Updated: 1999-10-29 add method and class descriptors
40 // mail: gum@triumf.ca
41 //
43 
44 #ifndef G4OpticalSurface_h
45 #define G4OpticalSurface_h 1
46 
48 // Includes
50 
51 #include "G4Types.hh"
52 #include "G4Physics2DVector.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 
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 
67  ground, // rough surface
68  groundfrontpainted, // rough top-layer (front) paint
69  groundbackpainted, // same as 'ground' but with a back-paint
70 
71  polishedlumirrorair, // mechanically polished surface, with lumirror
72  polishedlumirrorglue, // mechanically polished surface, with lumirror & meltmount
73  polishedair, // mechanically polished surface
74  polishedteflonair, // mechanically polished surface, with teflon
75  polishedtioair, // mechanically polished surface, with tio paint
76  polishedtyvekair, // mechanically polished surface, with tyvek
77  polishedvm2000air, // mechanically polished surface, with esr film
78  polishedvm2000glue, // mechanically polished surface, with esr film & meltmount
79 
80  etchedlumirrorair, // chemically etched surface, with lumirror
81  etchedlumirrorglue, // chemically etched surface, with lumirror & meltmount
82  etchedair, // chemically etched surface
83  etchedteflonair, // chemically etched surface, with teflon
84  etchedtioair, // chemically etched surface, with tio paint
85  etchedtyvekair, // chemically etched surface, with tyvek
86  etchedvm2000air, // chemically etched surface, with esr film
87  etchedvm2000glue, // chemically etched surface, with esr film & meltmount
88 
89  groundlumirrorair, // rough-cut surface, with lumirror
90  groundlumirrorglue, // rough-cut surface, with lumirror & meltmount
91  groundair, // rough-cut surface
92  groundteflonair, // rough-cut surface, with teflon
93  groundtioair, // rough-cut surface, with tio paint
94  groundtyvekair, // rough-cut surface, with tyvek
95  groundvm2000air, // rough-cut surface, with esr film
96  groundvm2000glue // rough-cut surface, with esr film & meltmount
97 };
98 
100 {
101  glisur, // original GEANT3 model
102  unified, // UNIFIED model
103  LUT, // Look-Up-Table model
104  dichroic // dichroic filter
105 };
106 
108 
110 // Class Definition
112 
114 {
115 
116 public: // Without description
117 
119  // Operators
121 
124 
125  G4int operator==(const G4OpticalSurface &right) const;
126  G4int operator!=(const G4OpticalSurface &right) const;
127 
128 public: // With description
129 
131  // Constructors and Destructor
133 
138  G4double value = 1.0);
139  // Constructor of an optical surface object.
140 
141 public: // Without description
142 
143  virtual ~G4OpticalSurface();
144 
146  // Methods
148 
149  // public methods
150 
151 public: // With description
152 
153  void SetType(const G4SurfaceType& type);
154 
155  inline G4OpticalSurfaceFinish GetFinish() const { return theFinish; }
156  // Returns the optical surface finish.
157  void SetFinish(const G4OpticalSurfaceFinish );
158  // Sets the optical surface finish.
159 
160  inline G4OpticalSurfaceModel GetModel() const { return theModel; }
161  // Returns the optical surface model used.
162  inline void SetModel(const G4OpticalSurfaceModel model)
163  { theModel = model; }
164  // Sets the optical surface model to be followed.
165 
166  inline G4double GetSigmaAlpha() const { return sigma_alpha; }
167  // Returns an unified model surface parameter.
168  inline void SetSigmaAlpha(const G4double s_a) { sigma_alpha = s_a; }
169  // Sets an unified model surface parameter.
170 
171  G4double GetPolish() const { return polish; }
172  // Returns the optical surface polish type.
173  inline void SetPolish(const G4double plsh) { polish=plsh; }
174  // Sets the optical surface polish type.
175 
177  { return theMaterialPropertiesTable; }
178  // Retrieves the pointer of the G4MaterialPropertiesTable
179  // attached to optical surface.
180 
182  { theMaterialPropertiesTable = anMPT; }
183  // Attaches a G4MaterialPropertiesTable to the optical surface.
184 
185  void DumpInfo() const;
186  // Prints information about the optical surface.
187 
188  void ReadLUTFile(void);
189  // Method to read the Look-Up-Table into array AngularDistribution
190 
192 
193  inline G4int GetThetaIndexMax(void) const { return thetaIndexMax; }
194  inline G4int GetPhiIndexMax(void) const { return phiIndexMax; }
195 
196  void ReadDichroicFile(void);
197  // Method to read the dichroic surface data file into Dichroic
198 
200 
201 private:
202 
203 // ------------------
204 // Basic data members ( To define an optical surface)
205 // ------------------
206 
207  G4OpticalSurfaceModel theModel; // Surface model
209 
210  G4double sigma_alpha; // The sigma of micro-facet polar angle
211  G4double polish; // Polish parameter in glisur model
212 
214 
215  static const G4int incidentIndexMax = 91;
216  static const G4int thetaIndexMax = 45;
217  static const G4int phiIndexMax = 37;
218 
220 
222 
223 };
224 
226 // Inline methods
228 
229 inline
231  G4int thetaIndex,
232  G4int phiIndex)
233 {
234  return AngularDistribution[angleIncident+
235  thetaIndex*incidentIndexMax+
237 }
238 
239 inline
241 {
242  return DichroicVector;
243 }
244 
245 #endif /* G4OpticalSurface_h */
void SetFinish(const G4OpticalSurfaceFinish)
G4double GetAngularDistributionValue(G4int, G4int, G4int)
void SetSigmaAlpha(const G4double s_a)
G4OpticalSurfaceModel GetModel() const
G4OpticalSurfaceModel theModel
G4int operator==(const G4OpticalSurface &right) const
float G4float
Definition: G4Types.hh:77
void DumpInfo() const
G4Physics2DVector * DichroicVector
G4OpticalSurface(const G4OpticalSurface &right)
static const G4int incidentIndexMax
G4MaterialPropertiesTable * theMaterialPropertiesTable
const char * name(G4int ptype)
G4SurfaceType
int G4int
Definition: G4Types.hh:78
virtual ~G4OpticalSurface()
G4float * AngularDistribution
G4double GetPolish() const
G4int GetPhiIndexMax(void) const
G4OpticalSurface & operator=(const G4OpticalSurface &right)
G4int operator!=(const G4OpticalSurface &right) const
G4OpticalSurfaceFinish GetFinish() const
G4Physics2DVector * GetDichroicVector()
G4OpticalSurfaceFinish
G4OpticalSurfaceModel
static const G4int phiIndexMax
double G4double
Definition: G4Types.hh:76
G4double GetSigmaAlpha() const
void SetModel(const G4OpticalSurfaceModel model)
void ReadDichroicFile(void)
void SetMaterialPropertiesTable(G4MaterialPropertiesTable *anMPT)
G4int GetThetaIndexMax(void) const
void SetType(const G4SurfaceType &type)
void SetPolish(const G4double plsh)
G4OpticalSurfaceFinish theFinish
static const G4int thetaIndexMax
G4MaterialPropertiesTable * GetMaterialPropertiesTable() const