//////////////////////////////////////////////////////////////////// /// \class RAT::PosGen_UFO /// /// \brief Provides the UFO position for generation. /// /// \author Mark Stringer -- contact person /// /// REVISION HISTORY:\n /// 8/02/16 : M.Stringer - First version (copied from PosGen_Laserball) /// 07-02-2017: N. Barros - Introduced BeginOfRun to load the database values /// /// \details Choose the laserball position via SetState string /// /generator/pos/set x y z /// //////////////////////////////////////////////////////////////////// #ifndef __RAT_PosGen_UFO__ #define __RAT_PosGen_UFO__ #include #include #include namespace RAT { class PosGen_UFO : public GLG4PosGen { public: /// Constructor sets the default db name PosGen_UFO( const std::string& dbname = std::string( "posUFO" )); /// Destructor virtual ~PosGen_UFO() { }; /// Initialise parameters from DB void Init(); /// interface for generating the position virtual void GeneratePosition( G4ThreeVector& argResult ); /// interface for setting the state virtual void SetState( G4String /*newValues*/ ); /// interface for getting the state virtual G4String GetState() const; virtual void BeginOfRun(); protected: G4ThreeVector fPosition; ///< laserball position G4bool fInitDB; ///< flag for DB initialisation int fPositionMode; ///< Position mode. 0 to use position from this table }; } // namespace RAT #endif