////////////////////////////////////////////////////////////////////
/// \class RAT::PosGen_Point
///
/// \brief Generates events at set point(s).
///
/// \author Phil G Jones
/// \author Matthew Mottram -- contact person
///
/// REVISION HISTORY:\n
/// 11 Jun 2012 : P.Jones - Refactor of GLG4PosGen.
///
/// \details Multiple position points can be added by calling the
/// /generator/pos/set command multiple times e.g:
/// /generator/pos/set 0 0 0
/// /generator/pos/set 1000 0 0
/// For events at the centre and 1m on x axis.
///
////////////////////////////////////////////////////////////////////
#ifndef __RAT_PosGen_Point__
#define __RAT_PosGen_Point__
#include
#include
#include
namespace RAT
{
class PosGen_Point : public GLG4PosGen
{
public:
/// Constructor sets the default db name
PosGen_Point( const std::string& dbname = std::string( "point" ) ) : GLG4PosGen( dbname ) { };
/// Destructor
virtual ~PosGen_Point() { };
/// 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:
std::vector fPositions; ///< List of global positions to generate
};
} // namespace RAT
#endif