source: trunk/source/materials/include/G4OpticalSurface.hh@ 1354

Last change on this file since 1354 was 1337, checked in by garnier, 15 years ago

tag geant4.9.4 beta 1 + modifs locales

File size: 9.0 KB
RevLine 
[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//
[1315]27// $Id: G4OpticalSurface.hh,v 1.17 2010/04/22 21:19:14 gum Exp $
[1337]28// GEANT4 tag $Name: geant4-09-04-beta-01 $
[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
61enum 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
[1196]66
[822]67 ground, // rough surface
68 groundfrontpainted, // rough top-layer (front) paint
[1196]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
[822]97};
98
99enum G4OpticalSurfaceModel
100{
101 glisur, // original GEANT3 model
[1196]102 unified, // UNIFIED model
103 LUT // Look-Up-Table model
[822]104};
105
106class G4MaterialPropertiesTable;
107
108/////////////////////
109// Class Definition
110/////////////////////
111
112class G4OpticalSurface : public G4SurfaceProperty
113{
114
[1196]115public: // Without description
116
117 //////////////
118 // Operators
119 //////////////
120
121 G4OpticalSurface(const G4OpticalSurface &right);
122 const G4OpticalSurface & operator=(const G4OpticalSurface &right);
123
124 G4int operator==(const G4OpticalSurface &right) const;
125 G4int operator!=(const G4OpticalSurface &right) const;
[822]126
[1196]127public: // With description
[822]128
[1196]129 ////////////////////////////////
130 // Constructors and Destructor
131 ////////////////////////////////
[822]132
[1196]133 G4OpticalSurface(const G4String& name,
134 G4OpticalSurfaceModel model = glisur,
135 G4OpticalSurfaceFinish finish = polished,
136 G4SurfaceType type = dielectric_dielectric,
137 G4double value = 1.0);
138 // Constructor of an optical surface object.
[822]139
[1196]140public: // Without description
[822]141
[1196]142 virtual ~G4OpticalSurface();
[822]143
[1196]144 ////////////
145 // Methods
146 ////////////
[822]147
[1196]148 // public methods
[822]149
[1196]150public: // With description
[822]151
[1315]152 void SetType(const G4SurfaceType& type);
[822]153
[1315]154 inline G4OpticalSurfaceFinish GetFinish() const { return theFinish; }
[1196]155 // Returns the optical surface finish.
[1315]156 void SetFinish(const G4OpticalSurfaceFinish );
[1196]157 // Sets the optical surface finish.
[822]158
[1315]159 inline G4OpticalSurfaceModel GetModel() const { return theModel; }
[1196]160 // Returns the optical surface model used.
[1315]161 inline void SetModel(const G4OpticalSurfaceModel model)
162 { theModel = model; }
[1196]163 // Sets the optical surface model to be followed.
[822]164
[1315]165 inline G4double GetSigmaAlpha() const { return sigma_alpha; }
[1196]166 // Returns an unified model surface parameter.
[1315]167 inline void SetSigmaAlpha(const G4double s_a) { sigma_alpha = s_a; }
[1196]168 // Sets an unified model surface parameter.
[822]169
[1315]170 G4double GetPolish() const { return polish; }
[1196]171 // Returns the optical surface polish type.
[1315]172 inline void SetPolish(const G4double plsh) { polish=plsh; }
[1196]173 // Sets the optical surface polish type.
[822]174
[1315]175 inline G4MaterialPropertiesTable* GetMaterialPropertiesTable() const
176 { return theMaterialPropertiesTable; }
[1196]177 // Retrieves the pointer of the G4MaterialPropertiesTable
178 // attached to optical surface.
[822]179
[1315]180 inline void SetMaterialPropertiesTable(G4MaterialPropertiesTable *anMPT)
181 { theMaterialPropertiesTable = anMPT; }
[1196]182 // Attaches a G4MaterialPropertiesTable to the optical surface.
[822]183
[1196]184 void DumpInfo() const;
185 // Prints information about the optical surface.
[822]186
[1196]187 void ReadFile(void);
188 // Method to read the Look-Up-Table into array AngularDistribution
189
[1315]190 inline G4double GetAngularDistributionValue(G4int, G4int, G4int);
[1196]191
192 inline G4int GetThetaIndexMax(void) const { return thetaIndexMax; }
193 inline G4int GetPhiIndexMax(void) const { return phiIndexMax; }
194
195private:
196
197// ------------------
198// Basic data members ( To define an optical surface)
199// ------------------
200
201 G4OpticalSurfaceModel theModel; // Surface model
202 G4OpticalSurfaceFinish theFinish; // Surface finish
203
204 G4double sigma_alpha; // The sigma of micro-facet polar angle
205 G4double polish; // Polish parameter in glisur model
206
207 G4MaterialPropertiesTable* theMaterialPropertiesTable;
208
209 static const G4int incidentIndexMax = 91;
210 static const G4int thetaIndexMax = 45;
211 static const G4int phiIndexMax = 37;
212
213 G4float* AngularDistribution;
214
[822]215};
216
[1196]217////////////////////
218// Inline methods
219////////////////////
220
221inline
222 G4double G4OpticalSurface::GetAngularDistributionValue(G4int angleIncident,
223 G4int thetaIndex,
224 G4int phiIndex)
225{
[1315]226 return AngularDistribution[angleIncident+
227 thetaIndex*incidentIndexMax+
228 phiIndex*thetaIndexMax*incidentIndexMax];
[1196]229}
230
[822]231#endif /* G4OpticalSurface_h */
Note: See TracBrowser for help on using the repository browser.