//////////////////////////////////////////////////////////////////// /// \class RAT::PosGen_Line /// /// \brief Generate event vertices at random points along a line. /// /// \author Stan Seibert /// \author Phil Jones /// \author Matthew Mottram -- contact person /// /// REVISION HISTORY:\n /// /// \details This position generator returns random points distributed uniformly /// along a line segment. The line is defined by supplying the x,y,z /// coordinates of the endpoints /// //////////////////////////////////////////////////////////////////// #ifndef __RAT_PosGen_Line__ #define __RAT_PosGen_Line__ #include #include namespace RAT { class PosGen_Line : public GLG4PosGen { public: /// Constructor sets the default db name PosGen_Line( const std::string& dbname = std::string( "plane" ) ) : GLG4PosGen( dbname ) {} /// Destructor virtual ~PosGen_Line() {} /// 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 fPoint1; G4ThreeVector fPoint2; }; } // namespace RAT #endif