60 theModel = right.theModel;
61 theFinish = right.theFinish;
62 sigma_alpha = right.sigma_alpha;
63 polish = right.polish;
64 theMaterialPropertiesTable = right.theMaterialPropertiesTable;
65 AngularDistribution = right.AngularDistribution;
66 readFileHandle = right.readFileHandle;
83 theMaterialPropertiesTable(0)
93 else if ( model ==
LUT ) {
98 G4Exception(
"G4OpticalSurface::G4OpticalSurface()",
"mat309",
100 "Constructor called with INVALID model.");
103 AngularDistribution = NULL;
106 AngularDistribution =
107 new G4float[incidentIndexMax*thetaIndexMax*phiIndexMax];
114 if (AngularDistribution)
delete AngularDistribution;
121 this->theMaterialPropertiesTable = right.theMaterialPropertiesTable;
122 this->AngularDistribution = right.AngularDistribution;
123 this->readFileHandle = right.readFileHandle;
146 " Surface finish = " <<
G4int(theFinish) <<
G4endl <<
156 else if (theModel ==
LUT ){
169 if (!AngularDistribution) AngularDistribution =
170 new G4float[incidentIndexMax*thetaIndexMax*phiIndexMax];
179 if (!AngularDistribution) AngularDistribution =
180 new G4float[incidentIndexMax*thetaIndexMax*phiIndexMax];
190 readFileName =
"PolishedLumirrorGlue.dat";
193 readFileName =
"PolishedLumirror.dat";
196 readFileName =
"PolishedTeflon.dat";
199 readFileName =
"PolishedTiO.dat";
202 readFileName =
"PolishedTyvek.dat";
205 readFileName =
"PolishedVM2000Glue.dat";
208 readFileName =
"PolishedVM2000.dat";
211 readFileName =
"EtchedLumirrorGlue.dat";
214 readFileName =
"EtchedLumirror.dat";
217 readFileName =
"EtchedTeflon.dat";
220 readFileName =
"EtchedTiO.dat";
223 readFileName =
"EtchedTyvek.dat";
226 readFileName =
"EtchedVM2000Glue.dat";
229 readFileName =
"EtchedVM2000.dat";
232 readFileName =
"GroundLumirrorGlue.dat";
235 readFileName =
"GroundLumirror.dat";
238 readFileName =
"GroundTeflon.dat";
241 readFileName =
"GroundTiO.dat";
244 readFileName =
"GroundTyvek.dat";
247 readFileName =
"GroundVM2000Glue.dat";
250 readFileName =
"GroundVM2000.dat";
253 if (readFileName ==
" ")
return;
255 char* path = getenv(
"G4REALSURFACEDATA");
258 "G4OpBoundaryProcess - G4REALSURFACEDATA environment variable not set";
259 G4Exception(
"G4OpticalSurface::ReadFile()",
"mat310",
265 readFileName = pathString +
"/" + readFileName;
267 readFileHandle = fopen(readFileName,
"r");
269 if (readFileHandle) {
271 G4int idxmax = incidentIndexMax*thetaIndexMax*phiIndexMax;
272 for (
G4int i = 0; i<idxmax; i++) {
273 ncols = fscanf(readFileHandle,
"%6f", &AngularDistribution[i]);
274 if (ncols < 0)
break;
277 G4cout <<
"LUT - data file: " << readFileName <<
" read in! " <<
G4endl;
280 G4String excep =
"LUT - data file: "+ readFileName +
" not read propery";
281 G4Exception(
"G4OpticalSurface::ReadFile()",
"mat312",
287 G4String excep =
"LUT - data file: " + readFileName +
" not found";
288 G4Exception(
"G4OpticalSurface::ReadFile()",
"mat311",
292 fclose(readFileHandle);
G4DLLIMPORT std::ostream G4cout
virtual ~G4OpticalSurface()
void SetType(const G4SurfaceType &type)
G4int operator!=(const G4OpticalSurface &right) const
G4OpticalSurface & operator=(const G4OpticalSurface &right)
G4OpticalSurface(const G4OpticalSurface &right)
void SetFinish(const G4OpticalSurfaceFinish)
G4int operator==(const G4OpticalSurface &right) const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)