/////////////////////////////////////////////////////////////////////////////// /// \class RAT::Surfaces /// /// \brief Constructs the Surfaces /// /// \author Phil G Jones /// \author Benjamin Land -- contact person /// /// REVISION HISTORY:\n /// 2013-08-01 : P G Jones - New file. \n /// 2014-06-02 : B J Land - Added unified parameters. \n /// /// \details Loads surface properties from ratdb and builds the surfaces. /// Anything other than a Fresnel photon interaction at a boundary /// between two materials (volumes) must be simulated via the use of a /// G4OpticalSurface. These methods construct such optical surfaces /// from database definitions. The geometry building code must however /// place these surfaces if they are to be used c.f. materials. /// /////////////////////////////////////////////////////////////////////////////// #ifndef __RAT_Surfaces__ #define __RAT_Surfaces__ #include #include #include class G4OpticalSurface; namespace RAT { class Surfaces { public: /// Load and construct surfaces static void LoadSurfaces(); /// Get an optical surface by name /// /// @param[in] surfaceName of the surface /// @return pointer to the optical surface if found or NULL static G4OpticalSurface* GetSurface( const std::string& surfaceName ) { return fsSurfaces[surfaceName]; } private: /// Load the properties in the PROPERTY_LIST /// /// @param[in] name of the surface /// @param[in] dbTable that defines the properties static void LoadProperties( const std::string& name, DBLinkPtr dbTable ); /// Checks that the argument specifies a surface property /// /// @param[in] property name of the property /// @return true if property is a surface property static bool IsSurfaceProperty(const std::string& property); static std::map< std::string, G4OpticalSurface* > fsSurfaces; ///< Map of surfaces by name }; } // namespace RAT #endif