//////////////////////////////////////////////////////////////////// /// \class RAT::PosGen_FillRPower /// /// \brief Generate events filling sphere according to radial power. /// /// \author M Mottram -- contact person /// /// REVISION HISTORY:\n /// 2014 June 3: M Mottram - first instance \n /// 2014-09-05: M Mottram - bug fix to generate flat in cos(theta) \n /// /// \details Fill a sphere with events distributed as the nth power /// of radius from a central point. Unlike fill generator, /// named volumes (and their boundaries) are not accounted /// for. Code adapted from PosGen_Fill and PosGen_Plane. /// //////////////////////////////////////////////////////////////////// #ifndef __RAT_PosGen_FillRPower__ #define __RAT_PosGen_FillRPower__ #include #include #include #include class G4VPhysicalVolume; class G4VSolid; namespace RAT { class PosGen_FillRPower : public GLG4PosGen { public: /// Constructor sets the default db name PosGen_FillRPower( const std::string& dbname = std::string( "fillrpower" ) ) : GLG4PosGen( dbname ) {} /// Destructor virtual ~PosGen_FillRPower() {} /// 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 fill double fMaxDisplacement; /// < Max radius double fRPower; /// < Power to scale }; } // namespace RAT #endif