ATLAS Offline Software
Loading...
Searching...
No Matches
Geo2G4OpticalSurfaceFactory Class Reference

#include <Geo2G4OpticalSurfaceFactory.h>

Collaboration diagram for Geo2G4OpticalSurfaceFactory:

Public Member Functions

 Geo2G4OpticalSurfaceFactory ()
G4OpticalSurface * Build (const GeoOpticalSurface *)

Private Attributes

Geo2G4OptSurfaceMap m_definedOptSurfaces

Detailed Description

Definition at line 15 of file Geo2G4OpticalSurfaceFactory.h.

Constructor & Destructor Documentation

◆ Geo2G4OpticalSurfaceFactory()

Geo2G4OpticalSurfaceFactory::Geo2G4OpticalSurfaceFactory ( )

Definition at line 12 of file Geo2G4OpticalSurfaceFactory.cxx.

13{
14}

Member Function Documentation

◆ Build()

G4OpticalSurface * Geo2G4OpticalSurfaceFactory::Build ( const GeoOpticalSurface * geoOpticalSurface)

Definition at line 16 of file Geo2G4OpticalSurfaceFactory.cxx.

17{
18 //
19 // Check if this surface has already been defined.
20 //
21 if(m_definedOptSurfaces.find(geoOpticalSurface) != m_definedOptSurfaces.end()) {
22 return m_definedOptSurfaces[geoOpticalSurface];
23 }
24
25 // map enums
26 G4OpticalSurfaceModel g4Model;
27 G4OpticalSurfaceFinish g4Finish;
28 G4SurfaceType g4Type;
29
30 switch(geoOpticalSurface->GetModel())
31 {
33 {
34 g4Model = glisur;
35 break;
36 }
38 {
39 g4Model = unified;
40 break;
41 }
42 default:
43 g4Model = glisur;
44 }
45
46 switch(geoOpticalSurface->GetFinish())
47 {
49 {
50 g4Finish = polished;
51 break;
52 }
54 {
55 g4Finish = polishedfrontpainted;
56 break;
57 }
59 {
60 g4Finish = polishedbackpainted;
61 break;
62 }
64 {
65 g4Finish = ground;
66 break;
67 }
69 {
70 g4Finish = groundfrontpainted;
71 break;
72 }
74 {
75 g4Finish = groundbackpainted;
76 break;
77 }
78 default:
79 g4Finish = polished;
80 }
81
82 switch(geoOpticalSurface->GetType())
83 {
85 {
86 g4Type = dielectric_metal;
87 break;
88 }
90 {
91 g4Type = dielectric_dielectric;
92 break;
93 }
95 {
96 g4Type = firsov;
97 break;
98 }
100 {
101 g4Type = x_ray;
102 break;
103 }
104 default:
105 g4Type = dielectric_dielectric;
106 }
107
108
109
110 G4OpticalSurface* newG4Surface = new G4OpticalSurface(geoOpticalSurface->GetName(),
111 g4Model,
112 g4Finish,
113 g4Type,
114 geoOpticalSurface->GetParameter());
115
116 // Create material properties table
117 const GeoMaterialPropertiesTable* geoPropTable = geoOpticalSurface->GetMaterialPropertiesTable();
118
119 if(geoPropTable){
120 Geo2G4MatPropTableFactory tFactory;
121 G4MaterialPropertiesTable* g4PropTable = tFactory.Build(geoPropTable);
122 if(g4PropTable)
123 newG4Surface->SetMaterialPropertiesTable(g4PropTable);
124 }
125
126 return newG4Surface;
127}
G4MaterialPropertiesTable * Build(const GeoMaterialPropertiesTable *)
GeoOpticalSurfaceFinish GetFinish() const
GeoSurfaceType GetType() const
const std::string & GetName() const
GeoMaterialPropertiesTable * GetMaterialPropertiesTable()
GeoOpticalSurfaceModel GetModel() const
double GetParameter() const

Member Data Documentation

◆ m_definedOptSurfaces

Geo2G4OptSurfaceMap Geo2G4OpticalSurfaceFactory::m_definedOptSurfaces
private

Definition at line 22 of file Geo2G4OpticalSurfaceFactory.h.


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