#include <G4OpticalSurface.hh>
Inheritance diagram for G4OpticalSurface:
Definition at line 111 of file G4OpticalSurface.hh.
G4OpticalSurface::G4OpticalSurface | ( | const G4OpticalSurface & | right | ) |
Definition at line 117 of file G4OpticalSurface.cc.
References AngularDistribution, readFileHandle, and theMaterialPropertiesTable.
00118 : G4SurfaceProperty(right.theName,right.theType) 00119 { 00120 *this = right; 00121 this->theMaterialPropertiesTable = right.theMaterialPropertiesTable; 00122 this->AngularDistribution = right.AngularDistribution; 00123 this->readFileHandle = right.readFileHandle; 00124 }
G4OpticalSurface::G4OpticalSurface | ( | const G4String & | name, | |
G4OpticalSurfaceModel | model = glisur , |
|||
G4OpticalSurfaceFinish | finish = polished , |
|||
G4SurfaceType | type = dielectric_dielectric , |
|||
G4double | value = 1.0 | |||
) |
Definition at line 75 of file G4OpticalSurface.cc.
References dielectric_LUT, FatalException, G4Exception(), glisur, LUT, ReadFile(), and unified.
00080 : G4SurfaceProperty(name,type), 00081 theModel(model), 00082 theFinish(finish), 00083 theMaterialPropertiesTable(0) 00084 { 00085 if (model == glisur ){ 00086 polish = value; 00087 sigma_alpha = 0.0; 00088 } 00089 else if ( model == unified ) { 00090 sigma_alpha = value; 00091 polish = 0.0; 00092 } 00093 else if ( model == LUT ) { 00094 sigma_alpha = value; 00095 polish = 0.0; 00096 } 00097 else { 00098 G4Exception("G4OpticalSurface::G4OpticalSurface()", "mat309", 00099 FatalException, 00100 "Constructor called with INVALID model."); 00101 } 00102 00103 AngularDistribution = NULL; 00104 00105 if (type == dielectric_LUT) { 00106 AngularDistribution = 00107 new G4float[incidentIndexMax*thetaIndexMax*phiIndexMax]; 00108 ReadFile(); 00109 } 00110 }
G4OpticalSurface::~G4OpticalSurface | ( | ) | [virtual] |
void G4OpticalSurface::DumpInfo | ( | ) | const |
Definition at line 139 of file G4OpticalSurface.cc.
References G4cout, G4endl, glisur, LUT, and G4SurfaceProperty::theType.
00140 { 00141 00142 // Dump info for surface 00143 00144 G4cout << 00145 " Surface type = " << G4int(theType) << G4endl << 00146 " Surface finish = " << G4int(theFinish) << G4endl << 00147 " Surface model = " << G4int(theModel) << G4endl; 00148 00149 G4cout << G4endl; 00150 00151 G4cout << " Surface parameter " << G4endl; 00152 G4cout << " ----------------- " << G4endl; 00153 if (theModel == glisur ){ 00154 G4cout << polish << G4endl; 00155 } 00156 else if (theModel == LUT ){ 00157 G4cout << sigma_alpha << G4endl; 00158 } 00159 else { 00160 G4cout << sigma_alpha << G4endl; 00161 } 00162 G4cout << G4endl; 00163 }
Definition at line 224 of file G4OpticalSurface.hh.
00227 { 00228 return AngularDistribution[angleIncident+ 00229 thetaIndex*incidentIndexMax+ 00230 phiIndex*thetaIndexMax*incidentIndexMax]; 00231 }
G4OpticalSurfaceFinish G4OpticalSurface::GetFinish | ( | ) | const [inline] |
Definition at line 153 of file G4OpticalSurface.hh.
Referenced by G4GDMLWriteSolids::OpticalSurfaceWrite(), and G4OpBoundaryProcess::PostStepDoIt().
G4MaterialPropertiesTable* G4OpticalSurface::GetMaterialPropertiesTable | ( | ) | const [inline] |
G4OpticalSurfaceModel G4OpticalSurface::GetModel | ( | ) | const [inline] |
Definition at line 158 of file G4OpticalSurface.hh.
Referenced by G4GDMLWriteSolids::OpticalSurfaceWrite(), and G4OpBoundaryProcess::PostStepDoIt().
G4int G4OpticalSurface::GetPhiIndexMax | ( | void | ) | const [inline] |
G4double G4OpticalSurface::GetPolish | ( | ) | const [inline] |
Definition at line 169 of file G4OpticalSurface.hh.
Referenced by G4GDMLWriteSolids::OpticalSurfaceWrite().
G4double G4OpticalSurface::GetSigmaAlpha | ( | ) | const [inline] |
Definition at line 164 of file G4OpticalSurface.hh.
Referenced by G4GDMLWriteSolids::OpticalSurfaceWrite().
G4int G4OpticalSurface::GetThetaIndexMax | ( | void | ) | const [inline] |
G4int G4OpticalSurface::operator!= | ( | const G4OpticalSurface & | right | ) | const |
Definition at line 131 of file G4OpticalSurface.cc.
00132 { 00133 return (this != (G4OpticalSurface *) &right); 00134 }
G4OpticalSurface & G4OpticalSurface::operator= | ( | const G4OpticalSurface & | right | ) |
Definition at line 54 of file G4OpticalSurface.cc.
References AngularDistribution, polish, readFileHandle, sigma_alpha, theFinish, theMaterialPropertiesTable, theModel, G4SurfaceProperty::theName, and G4SurfaceProperty::theType.
00055 { 00056 if (this != &right) 00057 { 00058 theName = right.theName; 00059 theType = right.theType; 00060 theModel = right.theModel; 00061 theFinish = right.theFinish; 00062 sigma_alpha = right.sigma_alpha; 00063 polish = right.polish; 00064 theMaterialPropertiesTable = right.theMaterialPropertiesTable; 00065 AngularDistribution = right.AngularDistribution; 00066 readFileHandle = right.readFileHandle; 00067 } 00068 return *this; 00069 }
G4int G4OpticalSurface::operator== | ( | const G4OpticalSurface & | right | ) | const |
Definition at line 126 of file G4OpticalSurface.cc.
00127 { 00128 return (this == (G4OpticalSurface *) &right); 00129 }
void G4OpticalSurface::ReadFile | ( | void | ) |
Definition at line 185 of file G4OpticalSurface.cc.
References etchedlumirrorair, etchedlumirrorglue, etchedteflonair, etchedtioair, etchedtyvekair, etchedvm2000air, etchedvm2000glue, FatalException, G4cout, G4endl, G4Exception(), groundlumirrorair, groundlumirrorglue, groundteflonair, groundtioair, groundtyvekair, groundvm2000air, groundvm2000glue, polishedlumirrorair, polishedlumirrorglue, polishedteflonair, polishedtioair, polishedtyvekair, polishedvm2000air, and polishedvm2000glue.
Referenced by G4OpticalSurface(), SetFinish(), and SetType().
00186 { 00187 G4String readFileName = " "; 00188 00189 if (theFinish == polishedlumirrorglue) { 00190 readFileName = "PolishedLumirrorGlue.dat"; 00191 } 00192 else if (theFinish == polishedlumirrorair) { 00193 readFileName = "PolishedLumirror.dat"; 00194 } 00195 else if (theFinish == polishedteflonair) { 00196 readFileName = "PolishedTeflon.dat"; 00197 } 00198 else if (theFinish == polishedtioair) { 00199 readFileName = "PolishedTiO.dat"; 00200 } 00201 else if (theFinish == polishedtyvekair) { 00202 readFileName = "PolishedTyvek.dat"; 00203 } 00204 else if (theFinish == polishedvm2000glue) { 00205 readFileName = "PolishedVM2000Glue.dat"; 00206 } 00207 else if (theFinish == polishedvm2000air) { 00208 readFileName = "PolishedVM2000.dat"; 00209 } 00210 else if (theFinish == etchedlumirrorglue) { 00211 readFileName = "EtchedLumirrorGlue.dat"; 00212 } 00213 else if (theFinish == etchedlumirrorair) { 00214 readFileName = "EtchedLumirror.dat"; 00215 } 00216 else if (theFinish == etchedteflonair) { 00217 readFileName = "EtchedTeflon.dat"; 00218 } 00219 else if (theFinish == etchedtioair) { 00220 readFileName = "EtchedTiO.dat"; 00221 } 00222 else if (theFinish == etchedtyvekair) { 00223 readFileName = "EtchedTyvek.dat"; 00224 } 00225 else if (theFinish == etchedvm2000glue) { 00226 readFileName = "EtchedVM2000Glue.dat"; 00227 } 00228 else if (theFinish == etchedvm2000air) { 00229 readFileName = "EtchedVM2000.dat"; 00230 } 00231 else if (theFinish == groundlumirrorglue) { 00232 readFileName = "GroundLumirrorGlue.dat"; 00233 } 00234 else if (theFinish == groundlumirrorair) { 00235 readFileName = "GroundLumirror.dat"; 00236 } 00237 else if (theFinish == groundteflonair) { 00238 readFileName = "GroundTeflon.dat"; 00239 } 00240 else if (theFinish == groundtioair) { 00241 readFileName = "GroundTiO.dat"; 00242 } 00243 else if (theFinish == groundtyvekair) { 00244 readFileName = "GroundTyvek.dat"; 00245 } 00246 else if (theFinish == groundvm2000glue) { 00247 readFileName = "GroundVM2000Glue.dat"; 00248 } 00249 else if (theFinish == groundvm2000air) { 00250 readFileName = "GroundVM2000.dat"; 00251 } 00252 00253 if (readFileName == " ") return; 00254 00255 char* path = getenv("G4REALSURFACEDATA"); 00256 if (!path) { 00257 G4String excep = 00258 "G4OpBoundaryProcess - G4REALSURFACEDATA environment variable not set"; 00259 G4Exception("G4OpticalSurface::ReadFile()", "mat310", 00260 FatalException, excep); 00261 return; 00262 } 00263 G4String pathString(path); 00264 00265 readFileName = pathString + "/" + readFileName; 00266 00267 readFileHandle = fopen(readFileName,"r"); 00268 00269 if (readFileHandle) { 00270 G4int ncols; 00271 G4int idxmax = incidentIndexMax*thetaIndexMax*phiIndexMax; 00272 for (G4int i = 0; i<idxmax; i++) { 00273 ncols = fscanf(readFileHandle,"%6f", &AngularDistribution[i]); 00274 if (ncols < 0) break; 00275 } 00276 if (ncols >= 0) { 00277 G4cout << "LUT - data file: " << readFileName << " read in! " << G4endl; 00278 } 00279 else { 00280 G4String excep = "LUT - data file: "+ readFileName +" not read propery"; 00281 G4Exception("G4OpticalSurface::ReadFile()", "mat312", 00282 FatalException, excep); 00283 return; 00284 } 00285 } 00286 else { 00287 G4String excep = "LUT - data file: " + readFileName + " not found"; 00288 G4Exception("G4OpticalSurface::ReadFile()", "mat311", 00289 FatalException, excep); 00290 return; 00291 } 00292 fclose(readFileHandle); 00293 }
void G4OpticalSurface::SetFinish | ( | const | G4OpticalSurfaceFinish | ) |
Definition at line 175 of file G4OpticalSurface.cc.
References dielectric_LUT, ReadFile(), and G4SurfaceProperty::theType.
00176 { 00177 theFinish = finish; 00178 if (theType == dielectric_LUT) { 00179 if (!AngularDistribution) AngularDistribution = 00180 new G4float[incidentIndexMax*thetaIndexMax*phiIndexMax]; 00181 ReadFile(); 00182 } 00183 }
void G4OpticalSurface::SetMaterialPropertiesTable | ( | G4MaterialPropertiesTable * | anMPT | ) | [inline] |
void G4OpticalSurface::SetModel | ( | const G4OpticalSurfaceModel | model | ) | [inline] |
void G4OpticalSurface::SetPolish | ( | const G4double | plsh | ) | [inline] |
void G4OpticalSurface::SetSigmaAlpha | ( | const G4double | s_a | ) | [inline] |
void G4OpticalSurface::SetType | ( | const G4SurfaceType & | type | ) |
Reimplemented from G4SurfaceProperty.
Definition at line 165 of file G4OpticalSurface.cc.
References dielectric_LUT, ReadFile(), and G4SurfaceProperty::theType.
00166 { 00167 theType = type; 00168 if (type == dielectric_LUT) { 00169 if (!AngularDistribution) AngularDistribution = 00170 new G4float[incidentIndexMax*thetaIndexMax*phiIndexMax]; 00171 ReadFile(); 00172 } 00173 }