91 theMaterialPropertiesTable(0)
101 else if ( model ==
LUT ) {
110 G4Exception(
"G4OpticalSurface::G4OpticalSurface()",
"mat309",
112 "Constructor called with INVALID model.");
228 readLUTFileName =
"PolishedLumirrorGlue.dat";
231 readLUTFileName =
"PolishedLumirror.dat";
234 readLUTFileName =
"PolishedTeflon.dat";
237 readLUTFileName =
"PolishedTiO.dat";
240 readLUTFileName =
"PolishedTyvek.dat";
243 readLUTFileName =
"PolishedVM2000Glue.dat";
246 readLUTFileName =
"PolishedVM2000.dat";
249 readLUTFileName =
"EtchedLumirrorGlue.dat";
252 readLUTFileName =
"EtchedLumirror.dat";
255 readLUTFileName =
"EtchedTeflon.dat";
258 readLUTFileName =
"EtchedTiO.dat";
261 readLUTFileName =
"EtchedTyvek.dat";
264 readLUTFileName =
"EtchedVM2000Glue.dat";
267 readLUTFileName =
"EtchedVM2000.dat";
270 readLUTFileName =
"GroundLumirrorGlue.dat";
273 readLUTFileName =
"GroundLumirror.dat";
276 readLUTFileName =
"GroundTeflon.dat";
279 readLUTFileName =
"GroundTiO.dat";
282 readLUTFileName =
"GroundTyvek.dat";
285 readLUTFileName =
"GroundVM2000Glue.dat";
288 readLUTFileName =
"GroundVM2000.dat";
291 if (readLUTFileName ==
" ")
return;
293 char* path = getenv(
"G4REALSURFACEDATA");
296 "G4OpBoundaryProcess - G4REALSURFACEDATA environment variable not set";
297 G4Exception(
"G4OpticalSurface::ReadLUTFile()",
"mat310",
303 readLUTFileName = pathString +
"/" + readLUTFileName;
305 std::ifstream readLUTFileHandle(readLUTFileName, std::ios::in);
307 if (readLUTFileHandle) {
309 for (
G4int i = 0; i<idxmax; i++) {
310 if (readLUTFileHandle.eof())
break;
313 if (!readLUTFileHandle.bad()) {
314 G4cout <<
"LUT - data file: "<< readLUTFileName <<
" read in! "<<
G4endl;
317 G4String excep=
"LUT - data file: "+readLUTFileName+
" not read propery";
318 G4Exception(
"G4OpticalSurface::ReadLUTFile()",
"mat312",
324 G4String excep =
"LUT - data file: "+readLUTFileName+
" not found";
325 G4Exception(
"G4OpticalSurface::ReadLUTFile()",
"mat311",
329 readLUTFileHandle.close();
334 const char* datadir = getenv(
"G4DICHROICDATA");
337 G4Exception(
"G4OpticalSurface::ReadDichroicFile()",
"mat313",
338 FatalException,
"Environment variable G4DICHROICDATA not defined");
342 std::ostringstream ost;
344 std::ifstream fin(ost.str().c_str());
345 if( !fin.is_open()) {
347 ed <<
"Dichroic surface data file <" << ost.str().c_str()
348 <<
"> is not opened!" <<
G4endl;
349 G4Exception(
"G4OpticalSurface::ReadDichroicFile()",
"mat314",
356 ed <<
"Dichroic surface data file <" << ost.str().c_str()
357 <<
"> is not opened!" <<
G4endl;
358 G4Exception(
"G4OpticalSurface::ReadDichroicFile()",
"mat315",
365 G4cout <<
" *** Dichroic surface data file *** " <<
G4endl;
370 G4cout <<
"numberOfXNodes: " << numberOfXNodes <<
G4endl;
371 G4cout <<
"numberOfYNodes: " << numberOfYNodes <<
G4endl;
373 if (0 > numberOfXNodes || numberOfXNodes >=
INT_MAX) numberOfXNodes = 0;
374 if (0 > numberOfYNodes || numberOfYNodes >=
INT_MAX) numberOfYNodes = 0;
379 xVector.resize(numberOfXNodes,0.);
380 yVector.resize(numberOfYNodes,0.);
382 for(
G4int i = 0; i<numberOfXNodes; ++i) {
386 for(
G4int j = 0; j<numberOfYNodes; ++j) {
391 for(
G4int j = 0; j<numberOfYNodes; ++j) {
392 for(
G4int i = 0; i<numberOfXNodes; ++i) {
393 G4cout <<
" i: " << i <<
" j: " << j <<
" "
void SetFinish(const G4OpticalSurfaceFinish)
std::vector< G4double > G4PV2DDataVector
G4double GetValue(size_t idx, size_t idy) const
std::ostringstream G4ExceptionDescription
G4OpticalSurfaceModel theModel
G4int operator==(const G4OpticalSurface &right) const
size_t GetLengthY() const
G4Physics2DVector * DichroicVector
G4OpticalSurface(const G4OpticalSurface &right)
static const G4int incidentIndexMax
G4MaterialPropertiesTable * theMaterialPropertiesTable
virtual ~G4OpticalSurface()
G4float * AngularDistribution
G4GLOB_DLL std::ostream G4cout
G4OpticalSurface & operator=(const G4OpticalSurface &right)
G4int operator!=(const G4OpticalSurface &right) const
size_t GetLengthX() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4bool Retrieve(std::ifstream &fIn)
G4double GetY(size_t index) const
static const G4int phiIndexMax
void ReadDichroicFile(void)
G4double GetX(size_t index) const
void SetType(const G4SurfaceType &type)
G4OpticalSurfaceFinish theFinish
static const G4int thetaIndexMax