#ifndef __DRCOPTMIRROR_H__ #define __DRCOPTMIRROR_H__ /*! \brief Representation of a mirror for photons. This volume consists out of two in general flat surfaces which are identical. The division is necessary for dichroic mirrors where other volumes can be coupled to the back side. For a simple mirror use simply a surface and set the reflectivity. \sa DrcSurfAbs */ class DrcOptMirror : public DrcOptDev { protected: //! Flag if propagate is called 1st time. mutable bool m_first; //! Front surface, reflecting DrcSurfAbs* m_surfFront; //! Back surface, opposite of front. DrcSurfAbs* m_surfBack; private: /*! \brief Auxiliary function for assignment operator and copy constructor.. \param d The object to copy. */ void copy(const DrcOptMirror& d); public: //! Constructor. DrcOptMirror(); //! Destructor. virtual ~DrcOptMirror(); /*! \brief Virtual copy constructor. \return Pointer to new allocated memory. */ DrcOptMirror* clone() const; /*! \brief Copy constructor. \param d The object to copy. */ DrcOptMirror(const DrcOptMirror& d); /*! \brief Assignment operator. \param d The object to assign. */ DrcOptMirror& operator=(const DrcOptMirror& d); //! Do not use void addSurface(const DrcSurfAbs& surf); // implements pure virtual base class void propagate(DrcPhoton& ph); bool radiator() const {return false;}; /*! \brief Set front surface which is reflecting \param surf The surface. */ void setFrontSurface(const DrcSurfAbs& surf); /*! \brief Set back surface \param surf The surface. \sa setFrontSurface */ void setBackSurface(const DrcSurfAbs& surf); }; #endif