//////////////////////////////////////////////////////////////////// /// \class RAT::PosGen_PlaneRPower /// /// \brief Generates events on a plane according to radial power. /// /// \author Matt Mottram -- contact person /// /// REVISION HISTORY:\n /// 2014-05-29 : M Mottram - 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. /// Points distributed with nth power of r. Code adapted from /// PosGen_Plane. /// //////////////////////////////////////////////////////////////////// #ifndef __RAT_PosGen_PlaneRPower__ #define __RAT_PosGen_PlaneRPower__ #include #include namespace RAT { class PosGen_PlaneRPower : public GLG4PosGen { public: /// Constructor sets the default db name PosGen_PlaneRPower( const std::string& dbname = std::string( "planerpower" ) ) : GLG4PosGen( dbname ), fMaxDisplacement(-1) {} /// Destructor virtual ~PosGen_PlaneRPower() {} /// 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 double fRPower; /// < 1/n power to use as a function from central position }; } // namespace RAT #endif