Links

Content Skeleton

This Page

Previous topic

G4LogicalBorderSurface

Next topic

Surfaces Roundtrip

G4OpticalSurface

G4DAE surface

__dd__Geometry__PoolDetails__NearPoolSurfaces__NearPoolCoverSurface         <OpticalSurface f3 m1 t0 v1 pRINDEX:2,REFLECTIVITY:2 >
__dd__Geometry__AdDetails__AdSurfacesAll__RSOilSurface                      <OpticalSurface f3 m1 t0 v1 pBACKSCATTERCONSTANT:4,SPECULARSPIKECONSTANT:4,REFLECTIVITY:12,SPECULARLOBECONSTANT:4 >
__dd__Geometry__AdDetails__AdSurfacesAll__ESRAirSurfaceTop                  <OpticalSurface f0 m1 t0 v0 pREFLECTIVITY:31 >
__dd__Geometry__AdDetails__AdSurfacesAll__ESRAirSurfaceBot                  <OpticalSurface f0 m1 t0 v0 pREFLECTIVITY:31 >
__dd__Geometry__AdDetails__AdSurfacesAll__SSTOilSurface                     <OpticalSurface f3 m1 t0 v1 pREFLECTIVITY:4 >
__dd__Geometry__AdDetails__AdSurfacesAll__AdCableTraySurface                <OpticalSurface f3 m1 t0 v1 pRINDEX:2,REFLECTIVITY:2 >
__dd__Geometry__AdDetails__AdSurfacesNear__SSTWaterSurfaceNear1             <OpticalSurface f3 m1 t0 v1 pREFLECTIVITY:4 >
__dd__Geometry__AdDetails__AdSurfacesNear__SSTWaterSurfaceNear2             <OpticalSurface f3 m1 t0 v1 pREFLECTIVITY:4 >
__dd__Geometry__PoolDetails__PoolSurfacesAll__PmtMtTopRingSurface           <OpticalSurface f3 m1 t0 v1 pRINDEX:2,REFLECTIVITY:2 >
__dd__Geometry__PoolDetails__PoolSurfacesAll__PmtMtBaseRingSurface          <OpticalSurface f3 m1 t0 v1 pRINDEX:2,REFLECTIVITY:2 >
__dd__Geometry__PoolDetails__PoolSurfacesAll__PmtMtRib1Surface              <OpticalSurface f3 m1 t0 v1 pRINDEX:2,REFLECTIVITY:2 >
__dd__Geometry__PoolDetails__PoolSurfacesAll__PmtMtRib2Surface              <OpticalSurface f3 m1 t0 v1 pRINDEX:2,REFLECTIVITY:2 >
__dd__Geometry__PoolDetails__PoolSurfacesAll__PmtMtRib3Surface              <OpticalSurface f3 m1 t0 v1 pRINDEX:2,REFLECTIVITY:2 >
__dd__Geometry__PoolDetails__PoolSurfacesAll__LegInIWSTubSurface            <OpticalSurface f3 m1 t0 v1 pRINDEX:2,REFLECTIVITY:2 >
__dd__Geometry__PoolDetails__PoolSurfacesAll__TablePanelSurface             <OpticalSurface f3 m1 t0 v1 pRINDEX:2,REFLECTIVITY:2 >
__dd__Geometry__PoolDetails__PoolSurfacesAll__SupportRib1Surface            <OpticalSurface f3 m1 t0 v1 pRINDEX:2,REFLECTIVITY:2 >
__dd__Geometry__PoolDetails__PoolSurfacesAll__SupportRib5Surface            <OpticalSurface f3 m1 t0 v1 pRINDEX:2,REFLECTIVITY:2 >
__dd__Geometry__PoolDetails__PoolSurfacesAll__SlopeRib1Surface              <OpticalSurface f3 m1 t0 v1 pRINDEX:2,REFLECTIVITY:2 >
__dd__Geometry__PoolDetails__PoolSurfacesAll__SlopeRib5Surface              <OpticalSurface f3 m1 t0 v1 pRINDEX:2,REFLECTIVITY:2 >
__dd__Geometry__PoolDetails__PoolSurfacesAll__ADVertiCableTraySurface       <OpticalSurface f3 m1 t0 v1 pRINDEX:2,REFLECTIVITY:2 >
__dd__Geometry__PoolDetails__PoolSurfacesAll__ShortParCableTraySurface      <OpticalSurface f3 m1 t0 v1 pRINDEX:2,REFLECTIVITY:2 >
__dd__Geometry__PoolDetails__NearPoolSurfaces__NearInnInPiperSurface        <OpticalSurface f3 m1 t0 v1 pRINDEX:2,REFLECTIVITY:2 >
__dd__Geometry__PoolDetails__NearPoolSurfaces__NearInnOutPiperSurface       <OpticalSurface f3 m1 t0 v1 pRINDEX:2,REFLECTIVITY:2 >
__dd__Geometry__PoolDetails__NearPoolSurfaces__NearIWSCurtainSurface        <OpticalSurface f3 m1 t0 v0.2 pBACKSCATTERCONSTANT:2,SPECULARSPIKECONSTANT:2,REFLECTIVITY:34,SPECULARLOBECONSTANT:2 >
__dd__Geometry__PoolDetails__PoolSurfacesAll__LegInOWSTubSurface            <OpticalSurface f3 m1 t0 v1 pRINDEX:2,REFLECTIVITY:2 >
__dd__Geometry__PoolDetails__NearPoolSurfaces__UnistrutRib6Surface          <OpticalSurface f3 m1 t0 v1 pRINDEX:2,REFLECTIVITY:2 >
__dd__Geometry__PoolDetails__NearPoolSurfaces__UnistrutRib7Surface          <OpticalSurface f3 m1 t0 v1 pRINDEX:2,REFLECTIVITY:2 >
__dd__Geometry__PoolDetails__PoolSurfacesAll__UnistrutRib3Surface           <OpticalSurface f3 m1 t0 v1 pRINDEX:2,REFLECTIVITY:2 >
__dd__Geometry__PoolDetails__PoolSurfacesAll__UnistrutRib5Surface           <OpticalSurface f3 m1 t0 v1 pRINDEX:2,REFLECTIVITY:2 >
__dd__Geometry__PoolDetails__PoolSurfacesAll__UnistrutRib4Surface           <OpticalSurface f3 m1 t0 v1 pRINDEX:2,REFLECTIVITY:2 >
__dd__Geometry__PoolDetails__PoolSurfacesAll__UnistrutRib1Surface           <OpticalSurface f3 m1 t0 v1 pRINDEX:2,REFLECTIVITY:2 >
__dd__Geometry__PoolDetails__PoolSurfacesAll__UnistrutRib2Surface           <OpticalSurface f3 m1 t0 v1 pRINDEX:2,REFLECTIVITY:2 >
__dd__Geometry__PoolDetails__PoolSurfacesAll__UnistrutRib8Surface           <OpticalSurface f3 m1 t0 v1 pRINDEX:2,REFLECTIVITY:2 >
__dd__Geometry__PoolDetails__PoolSurfacesAll__UnistrutRib9Surface           <OpticalSurface f3 m1 t0 v1 pRINDEX:2,REFLECTIVITY:2 >
__dd__Geometry__PoolDetails__NearPoolSurfaces__TopShortCableTraySurface     <OpticalSurface f3 m1 t0 v1 pRINDEX:2,REFLECTIVITY:2 >
__dd__Geometry__PoolDetails__PoolSurfacesAll__TopCornerCableTraySurface     <OpticalSurface f3 m1 t0 v1 pRINDEX:2,REFLECTIVITY:2 >
__dd__Geometry__PoolDetails__PoolSurfacesAll__VertiCableTraySurface         <OpticalSurface f3 m1 t0 v1 pRINDEX:2,REFLECTIVITY:2 >
__dd__Geometry__PoolDetails__NearPoolSurfaces__NearOutInPiperSurface        <OpticalSurface f3 m1 t0 v1 pRINDEX:2,REFLECTIVITY:2 >
__dd__Geometry__PoolDetails__NearPoolSurfaces__NearOutOutPiperSurface       <OpticalSurface f3 m1 t0 v1 pRINDEX:2,REFLECTIVITY:2 >
__dd__Geometry__PoolDetails__NearPoolSurfaces__NearOWSLinerSurface          <OpticalSurface f3 m1 t0 v0.2 pBACKSCATTERCONSTANT:2,SPECULARSPIKECONSTANT:2,REFLECTIVITY:34,SPECULARLOBECONSTANT:2 >
__dd__Geometry__PoolDetails__PoolSurfacesAll__LegInDeadTubSurface           <OpticalSurface f3 m1 t0 v1 pRINDEX:2,REFLECTIVITY:2 >
__dd__Geometry__PoolDetails__NearPoolSurfaces__NearDeadLinerSurface         <OpticalSurface f3 m1 t0 v0.2 pBACKSCATTERCONSTANT:2,SPECULARSPIKECONSTANT:2,REFLECTIVITY:34,SPECULARLOBECONSTANT:2 >

Maybe should translate the finish into Chroma via setting

  • reflect_specular for finish 0 (polished)
  • reflect_diffuse for finish 3 (ground)

materials/include/G4OpticalSurface.hh:

132
133     G4OpticalSurface(const G4String& name,
134              G4OpticalSurfaceModel model = glisur,
135              G4OpticalSurfaceFinish finish = polished,
136              G4SurfaceType type = dielectric_dielectric,
137              G4double value = 1.0);
138         // Constructor of an optical surface object.
139

materials/include/G4SurfaceProperty.hh:

66 enum G4SurfaceType
67 {
68    dielectric_metal,            // dielectric-metal interface
69    dielectric_dielectric,       // dielectric-dielectric interface
70    dielectric_LUT,              // dielectric-Look-Up-Table interface
71    firsov,                      // for Firsov Process
72    x_ray                        // for x-ray mirror process
73 };

Geant4 Surface

processes/optical/src/G4OpBoundaryProcess.cc

DAE/GDML persisted

  • glisur value Polish
  • non-glisur value SigmaAlpha
242 /*
243  * Create opticalsurface element with attributes from G4OpticalSurface*
244  * append to first argument element
245  *
246  * from G4GDMLWriteSolids::OpticalSurfaceWrite
247  */
248 void G4DAEWriteStructure::
249 OpticalSurfaceWrite(xercesc::DOMElement* targetElement,
250                     const G4OpticalSurface* const surf)
251 {
252    xercesc::DOMElement* optElement = NewElement("opticalsurface");
253    G4OpticalSurfaceModel smodel = surf->GetModel();
254    G4double sval = (smodel==glisur) ? surf->GetPolish() : surf->GetSigmaAlpha();
255
256    optElement->setAttributeNode(NewNCNameAttribute("name", surf->GetName()));
257    optElement->setAttributeNode(NewAttribute("model", smodel));
258    optElement->setAttributeNode(NewAttribute("finish", surf->GetFinish()));
259    optElement->setAttributeNode(NewAttribute("type", surf->GetType()));
260    optElement->setAttributeNode(NewAttribute("value", sval));
261
262    G4MaterialPropertiesTable* ptable = surf->GetMaterialPropertiesTable();
263    PropertyWrite( optElement, ptable );
264
265    targetElement->appendChild(optElement);
266 }

Chroma Surface

__device__ int
propagate_at_surface(Photon &p, State &s, curandState &rng, Geometry *geometry,
                     bool use_weights=false)
{
    Surface *surface = geometry->surfaces[s.surface_index];

    if (surface->model == SURFACE_COMPLEX)
        return propagate_complex(p, s, rng, surface, use_weights);
    else if (surface->model == SURFACE_WLS)
        return propagate_at_wls(p, s, rng, surface, use_weights);
    else {
        // use default surface model: do a combination of specular and
        // diffuse reflection, detection, and absorption based on relative
        // probabilties

        // since the surface properties are interpolated linearly, we are
        // guaranteed that they still sum to 1.0.
        float detect = interp_property(surface, p.wavelength, surface->detect);
        float absorb = interp_property(surface, p.wavelength, surface->absorb);
        float reflect_diffuse = interp_property(surface, p.wavelength, surface->reflect_diffuse);
        float reflect_specular = interp_property(surface, p.wavelength, surface->reflect_specular);