Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4OpticalSurface Class Reference

#include <G4OpticalSurface.hh>

+ Inheritance diagram for G4OpticalSurface:

Public Member Functions

 G4OpticalSurface (const G4String &name, G4OpticalSurfaceModel model=glisur, G4OpticalSurfaceFinish finish=polished, G4SurfaceType type=dielectric_dielectric, G4double value=1.0)
 
 ~G4OpticalSurface () override
 
 G4OpticalSurface (const G4OpticalSurface &right)
 
G4OpticalSurfaceoperator= (const G4OpticalSurface &right)
 
G4bool operator== (const G4OpticalSurface &right) const
 
G4bool operator!= (const G4OpticalSurface &right) const
 
void SetType (const G4SurfaceType &type) override
 
G4OpticalSurfaceFinish GetFinish () const
 
void SetFinish (const G4OpticalSurfaceFinish)
 
G4OpticalSurfaceModel GetModel () const
 
void SetModel (const G4OpticalSurfaceModel model)
 
G4double GetSigmaAlpha () const
 
void SetSigmaAlpha (const G4double s_a)
 
G4double GetPolish () const
 
void SetPolish (const G4double plsh)
 
G4MaterialPropertiesTableGetMaterialPropertiesTable () const
 
void SetMaterialPropertiesTable (G4MaterialPropertiesTable *anMPT)
 
void DumpInfo () const
 
void ReadDataFile ()
 
void ReadCompressedFile (const G4String &, std::istringstream &)
 
void ReadLUTFile ()
 
G4double GetAngularDistributionValue (G4int, G4int, G4int)
 
G4double GetAngularDistributionValueLUT (G4int)
 
void ReadLUTDAVISFile ()
 
void ReadReflectivityLUTFile ()
 
G4double GetReflectivityLUTValue (G4int)
 
G4int GetInmax () const
 
G4int GetLUTbins () const
 
G4int GetRefMax () const
 
G4int GetThetaIndexMax () const
 
G4int GetPhiIndexMax () const
 
void ReadDichroicFile ()
 
G4Physics2DVectorGetDichroicVector ()
 
- Public Member Functions inherited from G4SurfaceProperty
 G4SurfaceProperty ()
 
 G4SurfaceProperty (const G4String &name, G4SurfaceType type=x_ray)
 
virtual ~G4SurfaceProperty ()=default
 
const G4StringGetName () const
 
void SetName (const G4String &name)
 
const G4SurfaceTypeGetType () const
 

Additional Inherited Members

- Static Public Member Functions inherited from G4SurfaceProperty
static void CleanSurfacePropertyTable ()
 
static const G4SurfacePropertyTableGetSurfacePropertyTable ()
 
static size_t GetNumberOfSurfaceProperties ()
 
static void DumpTableInfo ()
 
- Protected Attributes inherited from G4SurfaceProperty
G4String theName
 
G4SurfaceType theType
 
- Static Protected Attributes inherited from G4SurfaceProperty
static G4SurfacePropertyTable theSurfacePropertyTable
 

Detailed Description

Definition at line 119 of file G4OpticalSurface.hh.

Constructor & Destructor Documentation

◆ G4OpticalSurface() [1/2]

G4OpticalSurface::G4OpticalSurface ( const G4String & name,
G4OpticalSurfaceModel model = glisur,
G4OpticalSurfaceFinish finish = polished,
G4SurfaceType type = dielectric_dielectric,
G4double value = 1.0 )

Definition at line 77 of file G4OpticalSurface.cc.

79 : G4SurfaceProperty(name, type), theModel(model), theFinish(finish)
80{
81 AngularDistribution = nullptr;
82
83 AngularDistributionLUT = nullptr;
84 Reflectivity = nullptr;
85
86 DichroicVector = nullptr;
87
88 switch (theModel) {
89 case glisur:
90 polish = value;
91 sigma_alpha = 0.0;
92 break;
93 case LUT:
94 case dichroic:
95 case DAVIS:
97 // fall through
98 case unified:
99 sigma_alpha = value;
100 polish = 0.0;
101 break;
102 default:
103 G4Exception("G4OpticalSurface::G4OpticalSurface()", "mat309", FatalException,
104 "Constructor called with INVALID model.");
105 }
106}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
@ unified
@ dichroic

◆ ~G4OpticalSurface()

G4OpticalSurface::~G4OpticalSurface ( )
override

Definition at line 108 of file G4OpticalSurface.cc.

109{
110 delete[] AngularDistribution;
111
112 delete[] AngularDistributionLUT;
113
114 delete[] Reflectivity;
115
116 delete DichroicVector;
117}

◆ G4OpticalSurface() [2/2]

G4OpticalSurface::G4OpticalSurface ( const G4OpticalSurface & right)

Definition at line 119 of file G4OpticalSurface.cc.

120 : G4SurfaceProperty(right.theName, right.theType)
121{
122 *this = right;
123 this->theName = right.theName;
124 this->theType = right.theType;
125 this->theModel = right.theModel;
126 this->theFinish = right.theFinish;
127 this->sigma_alpha = right.sigma_alpha;
128 this->polish = right.polish;
129 this->theMaterialPropertiesTable = right.theMaterialPropertiesTable;
130
131 delete[] AngularDistribution;
132 this->AngularDistribution = new G4float[incidentIndexMax * thetaIndexMax * phiIndexMax];
133 *(this->AngularDistribution) = *(right.AngularDistribution);
134
135 delete[] AngularDistributionLUT;
136 this->AngularDistributionLUT = new G4float[indexmax];
137 *(this->AngularDistributionLUT) = *(right.AngularDistributionLUT);
138
139 delete[] Reflectivity;
140 this->Reflectivity = new G4float[RefMax];
141 *(this->Reflectivity) = *(right.Reflectivity);
142
143 delete DichroicVector;
144 this->DichroicVector = new G4Physics2DVector();
145 *(this->DichroicVector) = *(right.DichroicVector);
146}
float G4float
Definition G4Types.hh:84

Member Function Documentation

◆ DumpInfo()

void G4OpticalSurface::DumpInfo ( ) const

Definition at line 168 of file G4OpticalSurface.cc.

169{
170 // Dump info for surface
171
172 G4cout << " Surface type = " << G4int(theType) << G4endl
173 << " Surface finish = " << G4int(theFinish) << G4endl
174 << " Surface model = " << G4int(theModel) << G4endl << G4endl << " Surface parameter "
175 << G4endl << " ----------------- " << G4endl;
176
177 if (theModel == glisur) {
178 G4cout << " polish: " << polish << G4endl;
179 }
180 else {
181 G4cout << " sigma_alpha: " << sigma_alpha << G4endl;
182 }
183 G4cout << G4endl;
184}
int G4int
Definition G4Types.hh:85
#define G4endl
Definition G4ios.hh:67
G4GLOB_DLL std::ostream G4cout

◆ GetAngularDistributionValue()

G4double G4OpticalSurface::GetAngularDistributionValue ( G4int angleIncident,
G4int thetaIndex,
G4int phiIndex )
inline

Definition at line 246 of file G4OpticalSurface.hh.

248{
249 G4int product = angleIncident * thetaIndex * phiIndex;
250 if (product < 0 || product >= incidentIndexMax * thetaIndexMax * phiIndexMax) {
252 ed << "Index angleIncident: " << angleIncident << " thetaIndex: " << thetaIndex
253 << " phiIndex: " << phiIndex << " out of range!";
254 G4Exception("G4OpticalSurface::GetAngularDistributionValue", "mat317", FatalException, ed);
255 return 0.;
256 }
257 return (G4double)AngularDistribution[angleIncident + thetaIndex * incidentIndexMax +
258 phiIndex * thetaIndexMax * incidentIndexMax];
259}
std::ostringstream G4ExceptionDescription
double G4double
Definition G4Types.hh:83

◆ GetAngularDistributionValueLUT()

G4double G4OpticalSurface::GetAngularDistributionValueLUT ( G4int i)
inline

Definition at line 261 of file G4OpticalSurface.hh.

262{
263 if (i < 0 || i >= indexmax) {
265 ed << "Index " << i << " out of range!";
266 G4Exception("G4OpticalSurface::GetAngularDistributionValueLUT", "mat318", FatalException, ed);
267 return 0.;
268 }
269 return (G4double)AngularDistributionLUT[i];
270}

◆ GetDichroicVector()

G4Physics2DVector * G4OpticalSurface::GetDichroicVector ( )
inline

Definition at line 283 of file G4OpticalSurface.hh.

283{ return DichroicVector; }

◆ GetFinish()

G4OpticalSurfaceFinish G4OpticalSurface::GetFinish ( ) const
inline

Definition at line 138 of file G4OpticalSurface.hh.

138{ return theFinish; }

Referenced by G4GDMLWriteSolids::OpticalSurfaceWrite(), and G4OpBoundaryProcess::PostStepDoIt().

◆ GetInmax()

G4int G4OpticalSurface::GetInmax ( ) const

Definition at line 158 of file G4OpticalSurface.cc.

158{ return indexmax; }

◆ GetLUTbins()

G4int G4OpticalSurface::GetLUTbins ( ) const

Definition at line 160 of file G4OpticalSurface.cc.

160{ return LUTbins; }

◆ GetMaterialPropertiesTable()

G4MaterialPropertiesTable * G4OpticalSurface::GetMaterialPropertiesTable ( ) const
inline

◆ GetModel()

G4OpticalSurfaceModel G4OpticalSurface::GetModel ( ) const
inline

Definition at line 144 of file G4OpticalSurface.hh.

144{ return theModel; }

Referenced by G4GDMLWriteSolids::OpticalSurfaceWrite(), and G4OpBoundaryProcess::PostStepDoIt().

◆ GetPhiIndexMax()

G4int G4OpticalSurface::GetPhiIndexMax ( ) const

Definition at line 166 of file G4OpticalSurface.cc.

166{ return phiIndexMax; }

◆ GetPolish()

G4double G4OpticalSurface::GetPolish ( ) const
inline

Definition at line 156 of file G4OpticalSurface.hh.

156{ return polish; }

Referenced by G4GDMLWriteSolids::OpticalSurfaceWrite().

◆ GetReflectivityLUTValue()

G4double G4OpticalSurface::GetReflectivityLUTValue ( G4int i)
inline

Definition at line 272 of file G4OpticalSurface.hh.

273{
274 if (i < 0 || i >= RefMax) {
276 ed << "Index " << i << " out of range!";
277 G4Exception("G4OpticalSurface::GetReflectivityLUTValue", "mat319", FatalException, ed);
278 return 0.;
279 }
280 return (G4double)Reflectivity[i];
281}

◆ GetRefMax()

G4int G4OpticalSurface::GetRefMax ( ) const

Definition at line 162 of file G4OpticalSurface.cc.

162{ return RefMax; }

◆ GetSigmaAlpha()

G4double G4OpticalSurface::GetSigmaAlpha ( ) const
inline

Definition at line 150 of file G4OpticalSurface.hh.

150{ return sigma_alpha; }

Referenced by G4GDMLWriteSolids::OpticalSurfaceWrite().

◆ GetThetaIndexMax()

G4int G4OpticalSurface::GetThetaIndexMax ( ) const

Definition at line 164 of file G4OpticalSurface.cc.

164{ return thetaIndexMax; }

◆ operator!=()

G4bool G4OpticalSurface::operator!= ( const G4OpticalSurface & right) const

Definition at line 153 of file G4OpticalSurface.cc.

154{
155 return (this != (G4OpticalSurface*)&right);
156}

◆ operator=()

G4OpticalSurface & G4OpticalSurface::operator= ( const G4OpticalSurface & right)

Definition at line 47 of file G4OpticalSurface.cc.

48{
49 if (this != &right) {
50 theName = right.theName;
51 theType = right.theType;
52 theModel = right.theModel;
53 theFinish = right.theFinish;
54 sigma_alpha = right.sigma_alpha;
55 polish = right.polish;
56 theMaterialPropertiesTable = right.theMaterialPropertiesTable;
57
58 delete[] AngularDistribution;
59 AngularDistribution = new G4float[incidentIndexMax * thetaIndexMax * phiIndexMax];
60 *(AngularDistribution) = *(right.AngularDistribution);
61
62 delete[] AngularDistributionLUT;
63 AngularDistributionLUT = new G4float[indexmax];
64 *(AngularDistributionLUT) = *(right.AngularDistributionLUT);
65
66 delete[] Reflectivity;
67 Reflectivity = new G4float[RefMax];
68 *(Reflectivity) = *(right.Reflectivity);
69
70 delete DichroicVector;
71 DichroicVector = new G4Physics2DVector();
72 *DichroicVector = *(right.DichroicVector);
73 }
74 return *this;
75}

◆ operator==()

G4bool G4OpticalSurface::operator== ( const G4OpticalSurface & right) const

Definition at line 148 of file G4OpticalSurface.cc.

149{
150 return (this == (G4OpticalSurface*)&right);
151}

◆ ReadCompressedFile()

void G4OpticalSurface::ReadCompressedFile ( const G4String & filename,
std::istringstream & iss )

Definition at line 405 of file G4OpticalSurface.cc.

406{
407 G4String* dataString = nullptr;
408 G4String path = G4FindDataDir("G4REALSURFACEDATA");
409 G4String compfilename = path + "/" + filename;
410 // create input stream with binary mode operation and position at end of file
411 std::ifstream in(compfilename, std::ios::binary | std::ios::ate);
412 if (in.good()) {
413 // get current position in the stream (was set to the end)
414 G4int fileSize = (G4int)in.tellg();
415 // set current position being the beginning of the stream
416 in.seekg(0, std::ios::beg);
417 // create (zlib) byte buffer for the data
418 auto compdata = new Bytef[fileSize];
419 while (in) {
420 in.read((char*)compdata, fileSize);
421 }
422 // create (zlib) byte buffer for the uncompressed data
423 auto complen = (uLongf)(fileSize * 4);
424 auto uncompdata = new Bytef[complen];
425 while (Z_OK != uncompress(uncompdata, &complen, compdata, fileSize)) {
426 // increase uncompressed byte buffer
427 delete[] uncompdata;
428 complen *= 2;
429 uncompdata = new Bytef[complen];
430 }
431 // delete the compressed data buffer
432 delete[] compdata;
433 // create a string from uncompressed data (will be deallocated by caller)
434 dataString = new G4String((char*)uncompdata, (long)complen);
435 // delete the uncompressed data buffer
436 delete[] uncompdata;
437 }
438 else {
440 ed << "Problem while trying to read " + compfilename + " data file.\n";
441 G4Exception("G4OpticalSurface::ReadCompressedFile", "mat316", FatalException, ed);
442 return;
443 }
444 // create the input string stream from the data string
445 if (dataString != nullptr) {
446 iss.str(*dataString);
447 in.close();
448 delete dataString;
449 G4cout << "G4OpticalSurface: data file " << compfilename << " successfully read in." << G4endl;
450 }
451}
const char * G4FindDataDir(const char *)
int ZEXPORT uncompress(Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen)
Definition uncompr.c:86
#define Z_OK
Definition zlib.h:177

Referenced by ReadLUTDAVISFile(), ReadLUTFile(), and ReadReflectivityLUTFile().

◆ ReadDataFile()

void G4OpticalSurface::ReadDataFile ( )

Definition at line 198 of file G4OpticalSurface.cc.

199{
200 // type and finish can be set in either order. Thus, we can't check
201 // for consistency. Need to read file on setting either type or finish.
202 switch (theType) {
203 case dielectric_LUT:
204 if (AngularDistribution == nullptr) {
205 AngularDistribution = new G4float[incidentIndexMax * thetaIndexMax * phiIndexMax];
206 }
207 ReadLUTFile();
208 break;
210 if (AngularDistributionLUT == nullptr) {
211 AngularDistributionLUT = new G4float[indexmax];
212 }
214
215 if (Reflectivity == nullptr) {
216 Reflectivity = new G4float[RefMax];
217 }
219 break;
221 if (DichroicVector == nullptr) {
222 DichroicVector = new G4Physics2DVector();
223 }
225 break;
226 default:
227 break;
228 }
229}
@ dielectric_LUT
@ dielectric_LUTDAVIS
@ dielectric_dichroic

Referenced by G4OpticalSurface(), SetFinish(), and SetType().

◆ ReadDichroicFile()

void G4OpticalSurface::ReadDichroicFile ( )

Definition at line 453 of file G4OpticalSurface.cc.

454{
455 const char* datadir = G4FindDataDir("G4DICHROICDATA");
456
457 if (datadir == nullptr) {
458 G4Exception("G4OpticalSurface::ReadDichroicFile()", "mat313", FatalException,
459 "Environment variable G4DICHROICDATA not defined");
460 return;
461 }
462
463 std::ostringstream ost;
464 ost << datadir;
465 std::ifstream fin(ost.str().c_str());
466 if (! fin.is_open()) {
468 ed << "Dichroic surface data file <" << ost.str().c_str() << "> is not opened!" << G4endl;
469 G4Exception("G4OpticalSurface::ReadDichroicFile()", "mat314", FatalException, ed, " ");
470 return;
471 }
472
473 if (! (DichroicVector->Retrieve(fin))) {
475 ed << "Dichroic surface data file <" << ost.str().c_str() << "> is not opened!" << G4endl;
476 G4Exception("G4OpticalSurface::ReadDichroicFile()", "mat315", FatalException, ed, " ");
477 return;
478 }
479
480 // DichroicVector->SetBicubicInterpolation(true);
481
482 G4cout << " *** Dichroic surface data file *** " << G4endl;
483
484 auto numberOfXNodes = (G4int)DichroicVector->GetLengthX();
485 auto numberOfYNodes = (G4int)DichroicVector->GetLengthY();
486
487 G4cout << "numberOfXNodes: " << numberOfXNodes << G4endl;
488 G4cout << "numberOfYNodes: " << numberOfYNodes << G4endl;
489
490 if (0 > numberOfXNodes || numberOfXNodes >= INT_MAX) {
491 numberOfXNodes = 0;
492 }
493 if (0 > numberOfYNodes || numberOfYNodes >= INT_MAX) {
494 numberOfYNodes = 0;
495 }
496
497 G4PV2DDataVector xVector;
498 G4PV2DDataVector yVector;
499
500 xVector.resize(numberOfXNodes, 0.);
501 yVector.resize(numberOfYNodes, 0.);
502
503 for (G4int i = 0; i < numberOfXNodes; ++i) {
504 G4cout << "i: " << DichroicVector->GetX(i) << G4endl;
505 xVector[i] = DichroicVector->GetX(i);
506 }
507 for (G4int j = 0; j < numberOfYNodes; ++j) {
508 G4cout << "j: " << DichroicVector->GetY(j) << G4endl;
509 yVector[j] = DichroicVector->GetY(j);
510 }
511
512 for (G4int j = 0; j < numberOfYNodes; ++j) {
513 for (G4int i = 0; i < numberOfXNodes; ++i) {
514 G4cout << " i: " << i << " j: " << j << " " << DichroicVector->GetValue(i, j) << G4endl;
515 }
516 }
517}
std::vector< G4double > G4PV2DDataVector
G4bool Retrieve(std::ifstream &fIn)
std::size_t GetLengthX() const
std::size_t GetLengthY() const
G4double GetValue(std::size_t idx, std::size_t idy) const
G4double GetX(std::size_t index) const
G4double GetY(std::size_t index) const
#define INT_MAX
Definition templates.hh:90

Referenced by ReadDataFile().

◆ ReadLUTDAVISFile()

void G4OpticalSurface::ReadLUTDAVISFile ( )

Definition at line 313 of file G4OpticalSurface.cc.

314{
315 G4String readLUTDAVISFileName;
316
317 switch (theFinish) {
318 case Rough_LUT:
319 readLUTDAVISFileName = "Rough_LUT.z";
320 break;
321 case RoughTeflon_LUT:
322 readLUTDAVISFileName = "RoughTeflon_LUT.z";
323 break;
324 case RoughESR_LUT:
325 readLUTDAVISFileName = "RoughESR_LUT.z";
326 break;
328 readLUTDAVISFileName = "RoughESRGrease_LUT.z";
329 break;
330 case Polished_LUT:
331 readLUTDAVISFileName = "Polished_LUT.z";
332 break;
334 readLUTDAVISFileName = "PolishedTeflon_LUT.z";
335 break;
336 case PolishedESR_LUT:
337 readLUTDAVISFileName = "PolishedESR_LUT.z";
338 break;
340 readLUTDAVISFileName = "PolishedESRGrease_LUT.z";
341 break;
342 case Detector_LUT:
343 readLUTDAVISFileName = "Detector_LUT.z";
344 break;
345 default:
346 return;
347 }
348
349 std::istringstream iss;
350 ReadCompressedFile(readLUTDAVISFileName, iss);
351
352 for (size_t i = 0; i < indexmax; ++i) {
353 iss >> AngularDistributionLUT[i];
354 }
355 G4cout << "LUT DAVIS - data file: " << readLUTDAVISFileName << " read in! " << G4endl;
356}
@ PolishedESR_LUT
@ RoughESR_LUT
@ Polished_LUT
@ Detector_LUT
@ PolishedESRGrease_LUT
@ RoughESRGrease_LUT
@ Rough_LUT
@ RoughTeflon_LUT
@ PolishedTeflon_LUT
void ReadCompressedFile(const G4String &, std::istringstream &)

Referenced by ReadDataFile().

◆ ReadLUTFile()

void G4OpticalSurface::ReadLUTFile ( )

Definition at line 231 of file G4OpticalSurface.cc.

232{
233 G4String readLUTFileName;
234
235 switch (theFinish) {
237 readLUTFileName = "PolishedLumirrorGlue.z";
238 break;
240 readLUTFileName = "PolishedLumirror.z";
241 break;
243 readLUTFileName = "PolishedTeflon.z";
244 break;
245 case polishedtioair:
246 readLUTFileName = "PolishedTiO.z";
247 break;
248 case polishedtyvekair:
249 readLUTFileName = "PolishedTyvek.z";
250 break;
252 readLUTFileName = "PolishedVM2000Glue.z";
253 break;
255 readLUTFileName = "PolishedVM2000.z";
256 break;
258 readLUTFileName = "EtchedLumirrorGlue.z";
259 break;
261 readLUTFileName = "EtchedLumirror.z";
262 break;
263 case etchedteflonair:
264 readLUTFileName = "EtchedTeflon.z";
265 break;
266 case etchedtioair:
267 readLUTFileName = "EtchedTiO.z";
268 break;
269 case etchedtyvekair:
270 readLUTFileName = "EtchedTyvek.z";
271 break;
272 case etchedvm2000glue:
273 readLUTFileName = "EtchedVM2000Glue.z";
274 break;
275 case etchedvm2000air:
276 readLUTFileName = "EtchedVM2000.z";
277 break;
279 readLUTFileName = "GroundLumirrorGlue.z";
280 break;
282 readLUTFileName = "GroundLumirror.z";
283 break;
284 case groundteflonair:
285 readLUTFileName = "GroundTeflon.z";
286 break;
287 case groundtioair:
288 readLUTFileName = "GroundTiO.z";
289 break;
290 case groundtyvekair:
291 readLUTFileName = "GroundTyvek.z";
292 break;
293 case groundvm2000glue:
294 readLUTFileName = "GroundVM2000Glue.z";
295 break;
296 case groundvm2000air:
297 readLUTFileName = "GroundVM2000.z";
298 break;
299 default:
300 return;
301 }
302
303 std::istringstream iss;
304 ReadCompressedFile(readLUTFileName, iss);
305
306 size_t idxmax = incidentIndexMax * thetaIndexMax * phiIndexMax;
307 for (size_t i = 0; i < idxmax; ++i) {
308 iss >> AngularDistribution[i];
309 }
310 G4cout << "LUT - data file: " << readLUTFileName << " read in! " << G4endl;
311}
@ polishedlumirrorair
@ groundtyvekair
@ groundtioair
@ groundvm2000glue
@ etchedteflonair
@ etchedtyvekair
@ etchedvm2000glue
@ etchedtioair
@ groundvm2000air
@ polishedlumirrorglue
@ polishedtyvekair
@ polishedteflonair
@ polishedvm2000air
@ etchedlumirrorglue
@ polishedvm2000glue
@ polishedtioair
@ groundlumirrorglue
@ etchedvm2000air
@ etchedlumirrorair
@ groundlumirrorair
@ groundteflonair

Referenced by ReadDataFile().

◆ ReadReflectivityLUTFile()

void G4OpticalSurface::ReadReflectivityLUTFile ( )

Definition at line 358 of file G4OpticalSurface.cc.

359{
360 G4String readReflectivityLUTFileName;
361
362 switch (theFinish) {
363 case Rough_LUT:
364 readReflectivityLUTFileName = "Rough_LUTR.z";
365 break;
366 case RoughTeflon_LUT:
367 readReflectivityLUTFileName = "RoughTeflon_LUTR.z";
368 break;
369 case RoughESR_LUT:
370 readReflectivityLUTFileName = "RoughESR_LUTR.z";
371 break;
373 readReflectivityLUTFileName = "RoughESRGrease_LUTR.z";
374 break;
375 case Polished_LUT:
376 readReflectivityLUTFileName = "Polished_LUTR.z";
377 break;
379 readReflectivityLUTFileName = "PolishedTeflon_LUTR.z";
380 break;
381 case PolishedESR_LUT:
382 readReflectivityLUTFileName = "PolishedESR_LUTR.z";
383 break;
385 readReflectivityLUTFileName = "PolishedESRGrease_LUTR.z";
386 break;
387 case Detector_LUT:
388 readReflectivityLUTFileName = "Detector_LUTR.z";
389 break;
390 default:
391 return;
392 }
393
394 std::istringstream iss;
395 ReadCompressedFile(readReflectivityLUTFileName, iss);
396
397 for (size_t i = 0; i < RefMax; ++i) {
398 iss >> Reflectivity[i];
399 }
400 G4cout << "LUT DAVIS - reflectivity data file: " << readReflectivityLUTFileName << " read in! "
401 << G4endl;
402}

Referenced by ReadDataFile().

◆ SetFinish()

void G4OpticalSurface::SetFinish ( const G4OpticalSurfaceFinish finish)

Definition at line 192 of file G4OpticalSurface.cc.

193{
194 theFinish = finish;
195 ReadDataFile();
196}

◆ SetMaterialPropertiesTable()

void G4OpticalSurface::SetMaterialPropertiesTable ( G4MaterialPropertiesTable * anMPT)
inline

Definition at line 169 of file G4OpticalSurface.hh.

170 {
171 theMaterialPropertiesTable = anMPT;
172 }

Referenced by G4GDMLReadSolids::PropertyRead().

◆ SetModel()

void G4OpticalSurface::SetModel ( const G4OpticalSurfaceModel model)
inline

Definition at line 147 of file G4OpticalSurface.hh.

147{ theModel = model; }

◆ SetPolish()

void G4OpticalSurface::SetPolish ( const G4double plsh)
inline

Definition at line 159 of file G4OpticalSurface.hh.

159{ polish = plsh; }

◆ SetSigmaAlpha()

void G4OpticalSurface::SetSigmaAlpha ( const G4double s_a)
inline

Definition at line 153 of file G4OpticalSurface.hh.

153{ sigma_alpha = s_a; }

◆ SetType()

void G4OpticalSurface::SetType ( const G4SurfaceType & type)
overridevirtual

Reimplemented from G4SurfaceProperty.

Definition at line 186 of file G4OpticalSurface.cc.

187{
188 theType = type;
189 ReadDataFile();
190}

The documentation for this class was generated from the following files: