ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4OpticalSurface.hh
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4OpticalSurface.hh
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 //
28 //
30 // G4OpticalSurface Definition
32 //
33 // File: G4OpticalSurface.hh
34 // Description: A optical surface class for use in G4OpBoundaryProcess
35 // Version: 2.0
36 // Created: 1997-06-26
37 // Author: Peter Gumplinger
38 // Updated: 1999-10-29 add method and class descriptors
39 // 2017-02-24 Mariele Stockhoff add DAVIS model
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  // for DAVIS model
99  Rough_LUT, //rough surface
100  RoughTeflon_LUT, //rough surface wrapped in Teflon tape
101  RoughESR_LUT, //rough surface wrapped with ESR
102  RoughESRGrease_LUT, //rough surface wrapped with ESR
103  //and coupled with opical grease
104  Polished_LUT, //polished surface
105  PolishedTeflon_LUT, //polished surface wrapped in Teflon tape
106  PolishedESR_LUT, //polished surface wrapped with ESR
107  PolishedESRGrease_LUT, //polished surface wrapped with ESR
108  //and coupled with opical grease
109  Detector_LUT //polished surface with optical grease
110 };
111 
113 {
114  glisur, // original GEANT3 model
115  unified, // UNIFIED model
116  LUT, // Look-Up-Table model
117  DAVIS, // DAVIS model
118  dichroic // dichroic filter
119 };
120 
122 
124 // Class Definition
126 
128 {
129 
130 public: // Without description
131 
133  // Operators
135 
138 
139  G4bool operator==(const G4OpticalSurface &right) const;
140  G4bool operator!=(const G4OpticalSurface &right) const;
141 
142 public: // With description
143 
145  // Constructors and Destructor
147 
152  G4double value = 1.0);
153  // Constructor of an optical surface object.
154 
155 public: // Without description
156 
157  virtual ~G4OpticalSurface();
158 
160  // Methods
162 
163  // public methods
164 
165 public: // With description
166 
167  void SetType(const G4SurfaceType& type);
168 
169  inline G4OpticalSurfaceFinish GetFinish() const { return theFinish; }
170  // Returns the optical surface finish.
171  void SetFinish(const G4OpticalSurfaceFinish );
172  // Sets the optical surface finish.
173 
174  inline G4OpticalSurfaceModel GetModel() const { return theModel; }
175  // Returns the optical surface model used.
177  { theModel = model; }
178  // Sets the optical surface model to be followed.
179 
180  inline G4double GetSigmaAlpha() const { return sigma_alpha; }
181  // Returns an unified model surface parameter.
182  inline void SetSigmaAlpha(const G4double s_a) { sigma_alpha = s_a; }
183  // Sets an unified model surface parameter.
184 
185  G4double GetPolish() const { return polish; }
186  // Returns the optical surface polish type.
187  inline void SetPolish(const G4double plsh) { polish=plsh; }
188  // Sets the optical surface polish type.
189 
191  { return theMaterialPropertiesTable; }
192  // Retrieves the pointer of the G4MaterialPropertiesTable
193  // attached to optical surface.
194 
196  { theMaterialPropertiesTable = anMPT; }
197  // Attaches a G4MaterialPropertiesTable to the optical surface.
198 
199  void DumpInfo() const;
200  // Prints information about the optical surface.
201 
202  void ReadLUTFile(void);
203  // Method to read the Look-Up-Table into array AngularDistribution
204 
206 
207  // for DAVIS model
208 
210  // Returns the AngularDistributionValue
211 
212  void ReadLUTDAVISFile(void);
213  // Method to read the Davis Look-Up-Table into array AngularDistribution
214 
215  void ReadReflectivityLUTFile(void);
216  // Method to read the Look-Up-Table for reflectivity
217 
219  // Returns the reflectivity value from the Davis Look-Up-Table
220 
221  G4int GetInmax(void) const;
222  // Returns the number of lines in the Davis Look-Up-Table
223 
224  G4int GetLUTbins(void) const;
225  // Returns the number of probability values per incidentangle
226 
227  G4int GetRefMax(void) const;
228  // Returns the number of reflectivity values per angle
229 
230  G4int GetThetaIndexMax(void) const;
231  G4int GetPhiIndexMax(void) const;
232 
233  void ReadDichroicFile(void);
234  // Method to read the dichroic surface data file into Dichroic
235 
237 
238 private:
239 
240 // ------------------
241 // Basic data members ( To define an optical surface)
242 // ------------------
243 
244  G4OpticalSurfaceModel theModel; // Surface model
246 
247  G4double sigma_alpha; // The sigma of micro-facet polar angle
248  G4double polish; // Polish parameter in glisur model
249 
251 
252  static const G4int incidentIndexMax = 91;
253  static const G4int thetaIndexMax = 45;
254  static const G4int phiIndexMax = 37;
255 
258 
259  // for DAVIS model
260  static const G4int indexmax = 7280001; // 3640001;
261  static const G4int RefMax = 90;
262  static const G4int LUTbins =20000;
265 };
266 
268 // Inline methods
270 
271 inline
273  G4int thetaIndex,
274  G4int phiIndex)
275 {
276  return AngularDistribution[angleIncident+
277  thetaIndex*incidentIndexMax+
279 }
280 
281 inline
283 {
284  return AngularDistributionLUT[i];
285 }
286 
287 inline
289 {
290  return Reflectivity[i];
291 }
292 
293 inline
295 {
296  return DichroicVector;
297 }
298 
299 #endif /* G4OpticalSurface_h */