Geant4-11
Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes | Private Attributes | Static Private Attributes
G4OpticalSurface Class Reference

#include <G4OpticalSurface.hh>

Inheritance diagram for G4OpticalSurface:
G4SurfaceProperty

Public Member Functions

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

Static Public Member Functions

static void CleanSurfacePropertyTable ()
 
static void DumpTableInfo ()
 
static size_t GetNumberOfSurfaceProperties ()
 
static const G4SurfacePropertyTableGetSurfacePropertyTable ()
 

Protected Attributes

G4String theName
 
G4SurfaceType theType
 

Static Protected Attributes

static G4SurfacePropertyTable theSurfacePropertyTable
 

Private Attributes

G4floatAngularDistribution
 
G4floatAngularDistributionLUT
 
G4Physics2DVectorDichroicVector
 
G4double polish
 
G4floatReflectivity
 
G4double sigma_alpha
 
G4OpticalSurfaceFinish theFinish
 
G4MaterialPropertiesTabletheMaterialPropertiesTable
 
G4OpticalSurfaceModel theModel
 

Static Private Attributes

static const G4int incidentIndexMax = 91
 
static const G4int indexmax = 7280001
 
static const G4int LUTbins = 20000
 
static const G4int phiIndexMax = 37
 
static const G4int RefMax = 90
 
static const G4int thetaIndexMax = 45
 

Detailed Description

Definition at line 121 of file G4OpticalSurface.hh.

Constructor & Destructor Documentation

◆ G4OpticalSurface() [1/2]

G4OpticalSurface::G4OpticalSurface ( const G4OpticalSurface right)

Definition at line 134 of file G4OpticalSurface.cc.

135 : G4SurfaceProperty(right.theName, right.theType)
136{
137 *this = right;
138 this->theName = right.theName;
139 this->theType = right.theType;
140 this->theModel = right.theModel;
141 this->theFinish = right.theFinish;
142 this->sigma_alpha = right.sigma_alpha;
143 this->polish = right.polish;
145
146 if(this->AngularDistribution)
147 delete[] AngularDistribution;
148 this->AngularDistribution =
150 *(this->AngularDistribution) = *(right.AngularDistribution);
151
152 if(this->AngularDistributionLUT)
153 delete[] AngularDistributionLUT;
156 if(this->Reflectivity)
157 delete[] Reflectivity;
158 this->Reflectivity = new G4float[RefMax];
159 *(this->Reflectivity) = *(right.Reflectivity);
160
161 if(this->DichroicVector)
162 delete DichroicVector;
163 this->DichroicVector = new G4Physics2DVector();
164 *(this->DichroicVector) = *(right.DichroicVector);
165}
float G4float
Definition: G4Types.hh:84
G4OpticalSurfaceFinish theFinish
static const G4int phiIndexMax
G4float * AngularDistribution
G4float * AngularDistributionLUT
static const G4int incidentIndexMax
static const G4int indexmax
static const G4int thetaIndexMax
G4OpticalSurfaceModel theModel
static const G4int RefMax
G4Physics2DVector * DichroicVector
G4MaterialPropertiesTable * theMaterialPropertiesTable
G4SurfaceType theType

References AngularDistribution, AngularDistributionLUT, DichroicVector, incidentIndexMax, indexmax, phiIndexMax, polish, Reflectivity, RefMax, sigma_alpha, theFinish, theMaterialPropertiesTable, theModel, G4SurfaceProperty::theName, thetaIndexMax, and G4SurfaceProperty::theType.

◆ G4OpticalSurface() [2/2]

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

Definition at line 83 of file G4OpticalSurface.cc.

87 : G4SurfaceProperty(name, type)
88 , theModel(model)
89 , theFinish(finish)
91{
92 AngularDistribution = nullptr;
93
94 AngularDistributionLUT = nullptr;
95 Reflectivity = nullptr;
96
97 DichroicVector = nullptr;
98
99 switch(theModel)
100 {
101 case glisur:
102 polish = value;
103 sigma_alpha = 0.0;
104 break;
105 case LUT:
106 case dichroic:
107 case DAVIS:
108 ReadDataFile();
109 // fall through
110 case unified:
111 sigma_alpha = value;
112 polish = 0.0;
113 break;
114 default:
115 G4Exception("G4OpticalSurface::G4OpticalSurface()", "mat309",
116 FatalException, "Constructor called with INVALID model.");
117 }
118}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
@ unified
@ DAVIS
@ dichroic
@ glisur
const char * name(G4int ptype)

References AngularDistribution, AngularDistributionLUT, DAVIS, dichroic, DichroicVector, FatalException, G4Exception(), glisur, LUT, polish, ReadDataFile(), Reflectivity, sigma_alpha, theModel, and unified.

◆ ~G4OpticalSurface()

G4OpticalSurface::~G4OpticalSurface ( )
virtual

Definition at line 120 of file G4OpticalSurface.cc.

121{
123 delete[] AngularDistribution;
124
126 delete[] AngularDistributionLUT;
127 if(Reflectivity)
128 delete[] Reflectivity;
129
131 delete DichroicVector;
132}

References AngularDistribution, AngularDistributionLUT, DichroicVector, and Reflectivity.

Member Function Documentation

◆ CleanSurfacePropertyTable()

void G4SurfaceProperty::CleanSurfacePropertyTable ( )
staticinherited

Definition at line 93 of file G4SurfaceProperty.cc.

94{
96 G4SurfacePropertyTable::iterator pos;
97 for(pos = theSurfacePropertyTable.begin();
99 {
100 if(*pos)
101 delete *pos;
102 }
105}
static const G4double pos
static G4SurfacePropertyTable theSurfacePropertyTable
static void DumpTableInfo()

References G4SurfaceProperty::DumpTableInfo(), pos, and G4SurfaceProperty::theSurfacePropertyTable.

◆ DumpInfo()

void G4OpticalSurface::DumpInfo ( ) const

Definition at line 187 of file G4OpticalSurface.cc.

188{
189 // Dump info for surface
190
191 G4cout << " Surface type = " << G4int(theType) << G4endl
192 << " Surface finish = " << G4int(theFinish) << G4endl
193 << " Surface model = " << G4int(theModel) << G4endl << G4endl
194 << " Surface parameter " << G4endl << " ----------------- "
195 << G4endl;
196
197 if(theModel == glisur)
198 {
199 G4cout << " polish: " << polish << G4endl;
200 }
201 else
202 {
203 G4cout << " sigma_alpha: " << sigma_alpha << G4endl;
204 }
205 G4cout << G4endl;
206}
int G4int
Definition: G4Types.hh:85
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout

References G4cout, G4endl, glisur, polish, sigma_alpha, theFinish, theModel, and G4SurfaceProperty::theType.

◆ DumpTableInfo()

void G4SurfaceProperty::DumpTableInfo ( )
staticinherited

Definition at line 78 of file G4SurfaceProperty.cc.

79{
80 G4cout << "***** Surface Property Table : Nb of Surface Properties = "
81 << GetNumberOfSurfaceProperties() << " *****" << G4endl;
82
83 for(size_t i = 0; i < theSurfacePropertyTable.size(); i++)
84 {
85 G4SurfaceProperty* pSurfaceProperty = theSurfacePropertyTable[i];
86 G4cout << pSurfaceProperty->GetName() << " : " << G4endl
87 << " Surface Property type = " << pSurfaceProperty->GetType()
88 << G4endl;
89 }
90 G4cout << G4endl;
91}
const G4String & GetName() const
static size_t GetNumberOfSurfaceProperties()
const G4SurfaceType & GetType() const

References G4cout, G4endl, G4SurfaceProperty::GetName(), G4SurfaceProperty::GetNumberOfSurfaceProperties(), G4SurfaceProperty::GetType(), and G4SurfaceProperty::theSurfacePropertyTable.

Referenced by G4SurfaceProperty::CleanSurfacePropertyTable().

◆ 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)
251 {
253 ed << "Index angleIncident: " << angleIncident
254 << " thetaIndex: " << thetaIndex << " phiIndex: " << phiIndex
255 << " out of range!";
256 G4Exception("G4OpticalSurface::GetAngularDistributionValue", "mat317",
257 FatalException, ed);
258 return 0.;
259 }
260 return (G4double)
261 AngularDistribution[angleIncident + thetaIndex * incidentIndexMax +
262 phiIndex * thetaIndexMax * incidentIndexMax];
263}
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:40
double G4double
Definition: G4Types.hh:83

References AngularDistribution, FatalException, G4Exception(), incidentIndexMax, phiIndexMax, and thetaIndexMax.

Referenced by G4OpBoundaryProcess::DielectricLUT().

◆ GetAngularDistributionValueLUT()

G4double G4OpticalSurface::GetAngularDistributionValueLUT ( G4int  i)
inline

Definition at line 265 of file G4OpticalSurface.hh.

266{
267 if(i < 0 || i >= indexmax)
268 {
270 ed << "Index " << i << " out of range!";
271 G4Exception("G4OpticalSurface::GetAngularDistributionValueLUT", "mat318",
272 FatalException, ed);
273 return 0.;
274 }
276}

References AngularDistributionLUT, FatalException, G4Exception(), and indexmax.

Referenced by G4OpBoundaryProcess::DielectricLUTDAVIS().

◆ GetDichroicVector()

G4Physics2DVector * G4OpticalSurface::GetDichroicVector ( )
inline

Definition at line 291 of file G4OpticalSurface.hh.

292{
293 return DichroicVector;
294}

References DichroicVector.

Referenced by G4OpBoundaryProcess::DielectricDichroic().

◆ GetFinish()

G4OpticalSurfaceFinish G4OpticalSurface::GetFinish ( ) const
inline

Definition at line 140 of file G4OpticalSurface.hh.

140{ return theFinish; }

References theFinish.

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

◆ GetInmax()

G4int G4OpticalSurface::GetInmax ( void  ) const

Definition at line 177 of file G4OpticalSurface.cc.

177{ return indexmax; }

References indexmax.

◆ GetLUTbins()

G4int G4OpticalSurface::GetLUTbins ( void  ) const

Definition at line 179 of file G4OpticalSurface.cc.

179{ return LUTbins; }
static const G4int LUTbins

References LUTbins.

Referenced by G4OpBoundaryProcess::DielectricLUTDAVIS().

◆ GetMaterialPropertiesTable()

G4MaterialPropertiesTable * G4OpticalSurface::GetMaterialPropertiesTable ( ) const
inline

◆ GetModel()

G4OpticalSurfaceModel G4OpticalSurface::GetModel ( ) const
inline

Definition at line 145 of file G4OpticalSurface.hh.

145{ return theModel; }

References theModel.

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

◆ GetName()

const G4String & G4SurfaceProperty::GetName ( ) const
inlineinherited

◆ GetNumberOfSurfaceProperties()

size_t G4SurfaceProperty::GetNumberOfSurfaceProperties ( )
staticinherited

Definition at line 72 of file G4SurfaceProperty.cc.

73{
74 return theSurfacePropertyTable.size();
75}

References G4SurfaceProperty::theSurfacePropertyTable.

Referenced by G4SurfaceProperty::DumpTableInfo().

◆ GetPhiIndexMax()

G4int G4OpticalSurface::GetPhiIndexMax ( void  ) const

Definition at line 185 of file G4OpticalSurface.cc.

185{ return phiIndexMax; }

References phiIndexMax.

Referenced by G4OpBoundaryProcess::DielectricLUT().

◆ GetPolish()

G4double G4OpticalSurface::GetPolish ( ) const
inline

Definition at line 155 of file G4OpticalSurface.hh.

155{ return polish; }

References polish.

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

◆ GetReflectivityLUTValue()

G4double G4OpticalSurface::GetReflectivityLUTValue ( G4int  i)
inline

Definition at line 278 of file G4OpticalSurface.hh.

279{
280 if(i < 0 || i >= RefMax)
281 {
283 ed << "Index " << i << " out of range!";
284 G4Exception("G4OpticalSurface::GetReflectivityLUTValue", "mat319",
285 FatalException, ed);
286 return 0.;
287 }
288 return (G4double) Reflectivity[i];
289}

References FatalException, G4Exception(), Reflectivity, and RefMax.

Referenced by G4OpBoundaryProcess::DielectricLUTDAVIS().

◆ GetRefMax()

G4int G4OpticalSurface::GetRefMax ( void  ) const

Definition at line 181 of file G4OpticalSurface.cc.

181{ return RefMax; }

References RefMax.

◆ GetSigmaAlpha()

G4double G4OpticalSurface::GetSigmaAlpha ( ) const
inline

Definition at line 150 of file G4OpticalSurface.hh.

150{ return sigma_alpha; }

References sigma_alpha.

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

◆ GetSurfacePropertyTable()

const G4SurfacePropertyTable * G4SurfaceProperty::GetSurfacePropertyTable ( )
staticinherited

◆ GetThetaIndexMax()

G4int G4OpticalSurface::GetThetaIndexMax ( void  ) const

Definition at line 183 of file G4OpticalSurface.cc.

183{ return thetaIndexMax; }

References thetaIndexMax.

Referenced by G4OpBoundaryProcess::DielectricLUT().

◆ GetType()

const G4SurfaceType & G4SurfaceProperty::GetType ( ) const
inlineinherited

◆ operator!=()

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

Definition at line 172 of file G4OpticalSurface.cc.

173{
174 return (this != (G4OpticalSurface*) &right);
175}

◆ operator=()

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

◆ operator==()

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

Definition at line 167 of file G4OpticalSurface.cc.

168{
169 return (this == (G4OpticalSurface*) &right);
170}

◆ ReadCompressedFile()

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

Definition at line 432 of file G4OpticalSurface.cc.

434{
435 G4String* dataString = nullptr;
436 G4String path = std::getenv("G4REALSURFACEDATA");
437 G4String compfilename = path + "/" + filename;
438 // create input stream with binary mode operation and position at end of file
439 std::ifstream in(compfilename, std::ios::binary | std::ios::ate);
440 if(in.good())
441 {
442 // get current position in the stream (was set to the end)
443 int fileSize = in.tellg();
444 // set current position being the beginning of the stream
445 in.seekg(0, std::ios::beg);
446 // create (zlib) byte buffer for the data
447 Bytef* compdata = new Bytef[fileSize];
448 while(in)
449 {
450 in.read((char*) compdata, fileSize);
451 }
452 // create (zlib) byte buffer for the uncompressed data
453 uLongf complen = (uLongf)(fileSize * 4);
454 Bytef* uncompdata = new Bytef[complen];
455 while(Z_OK != uncompress(uncompdata, &complen, compdata, fileSize))
456 {
457 // increase uncompressed byte buffer
458 delete[] uncompdata;
459 complen *= 2;
460 uncompdata = new Bytef[complen];
461 }
462 // delete the compressed data buffer
463 delete[] compdata;
464 // create a string from uncompressed data (will be deallocated by caller)
465 dataString = new G4String((char*) uncompdata, (long) complen);
466 // delete the uncompressed data buffer
467 delete[] uncompdata;
468 }
469 else
470 {
472 ed << "Problem while trying to read " + compfilename + " data file.\n";
473 G4Exception("G4OpticalSurface::ReadCompressedFile", "mat316",
474 FatalException, ed);
475 return;
476 }
477 // create the input string stream from the data string
478 if(dataString)
479 {
480 iss.str(*dataString);
481 in.close();
482 delete dataString;
483 G4cout << "G4OpticalSurface: data file " << compfilename
484 << " successfully read in." << G4endl;
485 }
486}
int ZEXPORT uncompress(Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen)
Definition: uncompr.c:85
#define Z_OK
Definition: zlib.h:177

References FatalException, G4cout, G4endl, G4Exception(), uncompress(), and Z_OK.

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

◆ ReadDataFile()

void G4OpticalSurface::ReadDataFile ( void  )

Definition at line 220 of file G4OpticalSurface.cc.

221{
222 // type and finish can be set in either order. Thus, we can't check
223 // for consistency. Need to read file on setting either type or finish.
224 switch(theType)
225 {
226 case dielectric_LUT:
230 ReadLUTFile();
231 break;
236
237 if(!Reflectivity)
240 break;
242 if(!DichroicVector)
245 break;
246 default:
247 break;
248 }
249}
@ dielectric_LUT
@ dielectric_LUTDAVIS
@ dielectric_dichroic
void ReadDichroicFile(void)
void ReadLUTDAVISFile(void)
void ReadReflectivityLUTFile(void)

References AngularDistribution, AngularDistributionLUT, DichroicVector, dielectric_dichroic, dielectric_LUT, dielectric_LUTDAVIS, incidentIndexMax, indexmax, phiIndexMax, ReadDichroicFile(), ReadLUTDAVISFile(), ReadLUTFile(), ReadReflectivityLUTFile(), Reflectivity, RefMax, thetaIndexMax, and G4SurfaceProperty::theType.

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

◆ ReadDichroicFile()

void G4OpticalSurface::ReadDichroicFile ( void  )

Definition at line 488 of file G4OpticalSurface.cc.

489{
490 const char* datadir = std::getenv("G4DICHROICDATA");
491
492 if(!datadir)
493 {
494 G4Exception("G4OpticalSurface::ReadDichroicFile()", "mat313",
496 "Environment variable G4DICHROICDATA not defined");
497 return;
498 }
499
500 std::ostringstream ost;
501 ost << datadir;
502 std::ifstream fin(ost.str().c_str());
503 if(!fin.is_open())
504 {
506 ed << "Dichroic surface data file <" << ost.str().c_str()
507 << "> is not opened!" << G4endl;
508 G4Exception("G4OpticalSurface::ReadDichroicFile()", "mat314",
509 FatalException, ed, " ");
510 return;
511 }
512
513 if(!(DichroicVector->Retrieve(fin)))
514 {
516 ed << "Dichroic surface data file <" << ost.str().c_str()
517 << "> is not opened!" << G4endl;
518 G4Exception("G4OpticalSurface::ReadDichroicFile()", "mat315",
519 FatalException, ed, " ");
520 return;
521 }
522
523 // DichroicVector->SetBicubicInterpolation(true);
524
525 G4cout << " *** Dichroic surface data file *** " << G4endl;
526
527 G4int numberOfXNodes = DichroicVector->GetLengthX();
528 G4int numberOfYNodes = DichroicVector->GetLengthY();
529
530 G4cout << "numberOfXNodes: " << numberOfXNodes << G4endl;
531 G4cout << "numberOfYNodes: " << numberOfYNodes << G4endl;
532
533 if(0 > numberOfXNodes || numberOfXNodes >= INT_MAX)
534 numberOfXNodes = 0;
535 if(0 > numberOfYNodes || numberOfYNodes >= INT_MAX)
536 numberOfYNodes = 0;
537
538 G4PV2DDataVector xVector;
539 G4PV2DDataVector yVector;
540
541 xVector.resize(numberOfXNodes, 0.);
542 yVector.resize(numberOfYNodes, 0.);
543
544 for(G4int i = 0; i < numberOfXNodes; ++i)
545 {
546 G4cout << "i: " << DichroicVector->GetX(i) << G4endl;
547 xVector[i] = DichroicVector->GetX(i);
548 }
549 for(G4int j = 0; j < numberOfYNodes; ++j)
550 {
551 G4cout << "j: " << DichroicVector->GetY(j) << G4endl;
552 yVector[j] = DichroicVector->GetY(j);
553 }
554
555 for(G4int j = 0; j < numberOfYNodes; ++j)
556 {
557 for(G4int i = 0; i < numberOfXNodes; ++i)
558 {
559 G4cout << " i: " << i << " j: " << j << " "
560 << DichroicVector->GetValue(i, j) << G4endl;
561 }
562 }
563}
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

References DichroicVector, FatalException, G4cout, G4endl, G4Exception(), G4Physics2DVector::GetLengthX(), G4Physics2DVector::GetLengthY(), G4Physics2DVector::GetValue(), G4Physics2DVector::GetX(), G4Physics2DVector::GetY(), INT_MAX, and G4Physics2DVector::Retrieve().

Referenced by ReadDataFile().

◆ ReadLUTDAVISFile()

void G4OpticalSurface::ReadLUTDAVISFile ( void  )

Definition at line 335 of file G4OpticalSurface.cc.

336{
337 G4String readLUTDAVISFileName;
338
339 switch(theFinish)
340 {
341 case Rough_LUT:
342 readLUTDAVISFileName = "Rough_LUT.z";
343 break;
344 case RoughTeflon_LUT:
345 readLUTDAVISFileName = "RoughTeflon_LUT.z";
346 break;
347 case RoughESR_LUT:
348 readLUTDAVISFileName = "RoughESR_LUT.z";
349 break;
351 readLUTDAVISFileName = "RoughESRGrease_LUT.z";
352 break;
353 case Polished_LUT:
354 readLUTDAVISFileName = "Polished_LUT.z";
355 break;
357 readLUTDAVISFileName = "PolishedTeflon_LUT.z";
358 break;
359 case PolishedESR_LUT:
360 readLUTDAVISFileName = "PolishedESR_LUT.z";
361 break;
363 readLUTDAVISFileName = "PolishedESRGrease_LUT.z";
364 break;
365 case Detector_LUT:
366 readLUTDAVISFileName = "Detector_LUT.z";
367 break;
368 default:
369 return;
370 }
371
372 std::istringstream iss;
373 ReadCompressedFile(readLUTDAVISFileName, iss);
374
375 for(size_t i = 0; i < indexmax; ++i)
376 {
377 iss >> AngularDistributionLUT[i];
378 }
379 G4cout << "LUT DAVIS - data file: " << readLUTDAVISFileName << " read in! "
380 << G4endl;
381}
@ PolishedESR_LUT
@ RoughESR_LUT
@ Polished_LUT
@ Detector_LUT
@ PolishedESRGrease_LUT
@ RoughESRGrease_LUT
@ Rough_LUT
@ RoughTeflon_LUT
@ PolishedTeflon_LUT
void ReadCompressedFile(G4String, std::istringstream &)

References AngularDistributionLUT, Detector_LUT, G4cout, G4endl, indexmax, Polished_LUT, PolishedESR_LUT, PolishedESRGrease_LUT, PolishedTeflon_LUT, ReadCompressedFile(), Rough_LUT, RoughESR_LUT, RoughESRGrease_LUT, RoughTeflon_LUT, and theFinish.

Referenced by ReadDataFile().

◆ ReadLUTFile()

void G4OpticalSurface::ReadLUTFile ( void  )

Definition at line 251 of file G4OpticalSurface.cc.

252{
253 G4String readLUTFileName;
254
255 switch(theFinish)
256 {
258 readLUTFileName = "PolishedLumirrorGlue.z";
259 break;
261 readLUTFileName = "PolishedLumirror.z";
262 break;
264 readLUTFileName = "PolishedTeflon.z";
265 break;
266 case polishedtioair:
267 readLUTFileName = "PolishedTiO.z";
268 break;
269 case polishedtyvekair:
270 readLUTFileName = "PolishedTyvek.z";
271 break;
273 readLUTFileName = "PolishedVM2000Glue.z";
274 break;
276 readLUTFileName = "PolishedVM2000.z";
277 break;
279 readLUTFileName = "EtchedLumirrorGlue.z";
280 break;
282 readLUTFileName = "EtchedLumirror.z";
283 break;
284 case etchedteflonair:
285 readLUTFileName = "EtchedTeflon.z";
286 break;
287 case etchedtioair:
288 readLUTFileName = "EtchedTiO.z";
289 break;
290 case etchedtyvekair:
291 readLUTFileName = "EtchedTyvek.z";
292 break;
293 case etchedvm2000glue:
294 readLUTFileName = "EtchedVM2000Glue.z";
295 break;
296 case etchedvm2000air:
297 readLUTFileName = "EtchedVM2000.z";
298 break;
300 readLUTFileName = "GroundLumirrorGlue.z";
301 break;
303 readLUTFileName = "GroundLumirror.z";
304 break;
305 case groundteflonair:
306 readLUTFileName = "GroundTeflon.z";
307 break;
308 case groundtioair:
309 readLUTFileName = "GroundTiO.z";
310 break;
311 case groundtyvekair:
312 readLUTFileName = "GroundTyvek.z";
313 break;
314 case groundvm2000glue:
315 readLUTFileName = "GroundVM2000Glue.z";
316 break;
317 case groundvm2000air:
318 readLUTFileName = "GroundVM2000.z";
319 break;
320 default:
321 return;
322 }
323
324 std::istringstream iss;
325 ReadCompressedFile(readLUTFileName, iss);
326
327 size_t idxmax = incidentIndexMax * thetaIndexMax * phiIndexMax;
328 for(size_t i = 0; i < idxmax; ++i)
329 {
330 iss >> AngularDistribution[i];
331 }
332 G4cout << "LUT - data file: " << readLUTFileName << " read in! " << G4endl;
333}
@ polishedlumirrorair
@ groundtyvekair
@ groundtioair
@ groundvm2000glue
@ etchedteflonair
@ etchedtyvekair
@ etchedvm2000glue
@ etchedtioair
@ groundvm2000air
@ polishedlumirrorglue
@ polishedtyvekair
@ polishedteflonair
@ polishedvm2000air
@ etchedlumirrorglue
@ polishedvm2000glue
@ polishedtioair
@ groundlumirrorglue
@ etchedvm2000air
@ etchedlumirrorair
@ groundlumirrorair
@ groundteflonair

References AngularDistribution, etchedlumirrorair, etchedlumirrorglue, etchedteflonair, etchedtioair, etchedtyvekair, etchedvm2000air, etchedvm2000glue, G4cout, G4endl, groundlumirrorair, groundlumirrorglue, groundteflonair, groundtioair, groundtyvekair, groundvm2000air, groundvm2000glue, incidentIndexMax, phiIndexMax, polishedlumirrorair, polishedlumirrorglue, polishedteflonair, polishedtioair, polishedtyvekair, polishedvm2000air, polishedvm2000glue, ReadCompressedFile(), theFinish, and thetaIndexMax.

Referenced by ReadDataFile().

◆ ReadReflectivityLUTFile()

void G4OpticalSurface::ReadReflectivityLUTFile ( void  )

Definition at line 383 of file G4OpticalSurface.cc.

384{
385 G4String readReflectivityLUTFileName;
386
387 switch(theFinish)
388 {
389 case Rough_LUT:
390 readReflectivityLUTFileName = "Rough_LUTR.z";
391 break;
392 case RoughTeflon_LUT:
393 readReflectivityLUTFileName = "RoughTeflon_LUTR.z";
394 break;
395 case RoughESR_LUT:
396 readReflectivityLUTFileName = "RoughESR_LUTR.z";
397 break;
399 readReflectivityLUTFileName = "RoughESRGrease_LUTR.z";
400 break;
401 case Polished_LUT:
402 readReflectivityLUTFileName = "Polished_LUTR.z";
403 break;
405 readReflectivityLUTFileName = "PolishedTeflon_LUTR.z";
406 break;
407 case PolishedESR_LUT:
408 readReflectivityLUTFileName = "PolishedESR_LUTR.z";
409 break;
411 readReflectivityLUTFileName = "PolishedESRGrease_LUTR.z";
412 break;
413 case Detector_LUT:
414 readReflectivityLUTFileName = "Detector_LUTR.z";
415 break;
416 default:
417 return;
418 }
419
420 std::istringstream iss;
421 ReadCompressedFile(readReflectivityLUTFileName, iss);
422
423 for(size_t i = 0; i < RefMax; ++i)
424 {
425 iss >> Reflectivity[i];
426 }
427 G4cout << "LUT DAVIS - reflectivity data file: "
428 << readReflectivityLUTFileName << " read in! " << G4endl;
429}

References Detector_LUT, G4cout, G4endl, Polished_LUT, PolishedESR_LUT, PolishedESRGrease_LUT, PolishedTeflon_LUT, ReadCompressedFile(), Reflectivity, RefMax, Rough_LUT, RoughESR_LUT, RoughESRGrease_LUT, RoughTeflon_LUT, and theFinish.

Referenced by ReadDataFile().

◆ SetFinish()

void G4OpticalSurface::SetFinish ( const G4OpticalSurfaceFinish  finish)

Definition at line 214 of file G4OpticalSurface.cc.

215{
216 theFinish = finish;
217 ReadDataFile();
218}

References ReadDataFile(), and theFinish.

◆ SetMaterialPropertiesTable()

void G4OpticalSurface::SetMaterialPropertiesTable ( G4MaterialPropertiesTable anMPT)
inline

Definition at line 167 of file G4OpticalSurface.hh.

168 {
170 }

References theMaterialPropertiesTable.

Referenced by G4GDMLReadSolids::PropertyRead().

◆ SetModel()

void G4OpticalSurface::SetModel ( const G4OpticalSurfaceModel  model)
inline

Definition at line 147 of file G4OpticalSurface.hh.

147{ theModel = model; }

References theModel.

◆ SetName()

void G4SurfaceProperty::SetName ( const G4String name)
inlineinherited

Definition at line 82 of file G4SurfaceProperty.hh.

82{ theName = name; }

References G4InuclParticleNames::name(), and G4SurfaceProperty::theName.

◆ SetPolish()

void G4OpticalSurface::SetPolish ( const G4double  plsh)
inline

Definition at line 157 of file G4OpticalSurface.hh.

157{ polish = plsh; }

References polish.

◆ SetSigmaAlpha()

void G4OpticalSurface::SetSigmaAlpha ( const G4double  s_a)
inline

Definition at line 152 of file G4OpticalSurface.hh.

152{ sigma_alpha = s_a; }

References sigma_alpha.

◆ SetType()

void G4OpticalSurface::SetType ( const G4SurfaceType type)
overridevirtual

Reimplemented from G4SurfaceProperty.

Definition at line 208 of file G4OpticalSurface.cc.

209{
210 theType = type;
211 ReadDataFile();
212}

References ReadDataFile(), and G4SurfaceProperty::theType.

Field Documentation

◆ AngularDistribution

G4float* G4OpticalSurface::AngularDistribution
private

◆ AngularDistributionLUT

G4float* G4OpticalSurface::AngularDistributionLUT
private

◆ DichroicVector

G4Physics2DVector* G4OpticalSurface::DichroicVector
private

◆ incidentIndexMax

const G4int G4OpticalSurface::incidentIndexMax = 91
staticprivate

◆ indexmax

const G4int G4OpticalSurface::indexmax = 7280001
staticprivate

◆ LUTbins

const G4int G4OpticalSurface::LUTbins = 20000
staticprivate

Definition at line 237 of file G4OpticalSurface.hh.

Referenced by GetLUTbins().

◆ phiIndexMax

const G4int G4OpticalSurface::phiIndexMax = 37
staticprivate

◆ polish

G4double G4OpticalSurface::polish
private

Definition at line 223 of file G4OpticalSurface.hh.

Referenced by DumpInfo(), G4OpticalSurface(), GetPolish(), operator=(), and SetPolish().

◆ Reflectivity

G4float* G4OpticalSurface::Reflectivity
private

◆ RefMax

const G4int G4OpticalSurface::RefMax = 90
staticprivate

◆ sigma_alpha

G4double G4OpticalSurface::sigma_alpha
private

◆ theFinish

G4OpticalSurfaceFinish G4OpticalSurface::theFinish
private

◆ theMaterialPropertiesTable

G4MaterialPropertiesTable* G4OpticalSurface::theMaterialPropertiesTable
private

◆ theModel

G4OpticalSurfaceModel G4OpticalSurface::theModel
private

Definition at line 219 of file G4OpticalSurface.hh.

Referenced by DumpInfo(), G4OpticalSurface(), GetModel(), operator=(), and SetModel().

◆ theName

G4String G4SurfaceProperty::theName
protectedinherited

◆ theSurfacePropertyTable

G4SurfacePropertyTable G4SurfaceProperty::theSurfacePropertyTable
staticprotectedinherited

◆ thetaIndexMax

const G4int G4OpticalSurface::thetaIndexMax = 45
staticprivate

◆ theType

G4SurfaceType G4SurfaceProperty::theType
protectedinherited

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