//////////////////////////////////////////////////////////////////// /// \class RAT::PosGen_Plane /// /// \brief Generates events on a plane. /// /// \author Phil G Jones /// \author Matthew Mottram -- contact person /// /// REVISION HISTORY:\n /// 2013-10-31 : P. Jones - New file.\n /// /// \details Generate points on a predefined plane. Plane is defined /// by a position, a normal and a max distance from the position. /// //////////////////////////////////////////////////////////////////// #ifndef __RAT_PosGen_Plane__ #define __RAT_PosGen_Plane__ #include #include namespace RAT { class PosGen_Plane : public GLG4PosGen { public: /// Constructor sets the default db name PosGen_Plane( const std::string& dbname = std::string( "plane" ) ) : GLG4PosGen( dbname ), fMaxDisplacement(-1) {} /// Destructor virtual ~PosGen_Plane() {} /// Abstract interface for generating the position virtual void GeneratePosition( G4ThreeVector& argResult ); /// Abstract interface for setting the state virtual void SetState( G4String newValues ); /// Abstract interface for getting the state virtual G4String GetState() const; protected: G4ThreeVector fPosition; ///< Centre of the plane G4ThreeVector fNormal; ///< Normal of the plane G4ThreeVector fX; ///< Arbitary X of the plane G4ThreeVector fY; ///< Arbitary Y of the plane double fMaxDisplacement; ///< Max displacement from the centre }; } // namespace RAT #endif